> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vultlocal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lookup Agent

> Find agent by phone number

<Info>
  Find an agent by their registered phone number. Useful for verifying agents before transactions.
</Info>

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer olive_live_xxx` or `Bearer eyJ...` (JWT)
</ParamField>

### Query Parameters

<ParamField query="phone_number" type="string" required>
  Phone number to search. Accepts local (`0771234567`) or E.164 (`+23277123456`)
</ParamField>

***

## Response

<ResponseField name="found" type="boolean">
  Whether agent was found
</ResponseField>

<ResponseField name="agent" type="object">
  Agent object if found
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://demo.api.vultlocal.com/api/v1/agents/lookup?phone_number=0771234567" \
    -H "Authorization: Bearer olive_live_xxx"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Found theme={null}
  {
    "found": true,
    "agent": {
      "id": "agent_abc123",
      "type": "super_agent",
      "business_name": "ABC Money Services",
      "first_name": "John",
      "last_name": "Doe",
      "phone_number": "+23277123456",
      "status": "active",
      "location": "Freetown CBD"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "found": false,
    "message": "No agent found with this phone number"
  }
  ```
</ResponseExample>

***

## Use Cases

<CardGroup cols={2}>
  <Card title="Agent Verification" icon="check">
    Verify agent identity before funding
  </Card>

  <Card title="Float Transfer" icon="arrow-right">
    Find sub-agent before transferring float
  </Card>
</CardGroup>

***

## Errors

| Status | Code             | Description                        |
| ------ | ---------------- | ---------------------------------- |
| 400    | `MISSING_PHONE`  | phone\_number query param required |
| 401    | `UNAUTHORIZED`   | Invalid API key                    |
| 404    | `NOT_FOUND`      | No agent with this phone           |
| 500    | `INTERNAL_ERROR` | Server error                       |


## OpenAPI

````yaml olive-openapi.json GET /agents/lookup
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /agents/lookup:
    get:
      tags:
        - Agents
      summary: Lookup agent by phone number
      description: Check if a phone number belongs to a registered agent
      parameters:
        - description: Phone number in E.164 format
          name: phone_number
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true

````