# Get Customer ID by phone number

{% hint style="danger" %}
This API is subject to a strict limitation of 200 requests per minute.
{% endhint %}

<mark style="color:blue;">`GET`</mark> `http://api.ants.tech/access/api/profile/get-customer-id-by-phone`

#### Query Parameters

| Name                                       | Type            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| operator<mark style="color:red;">\*</mark> | String          | <p>The operator that you want to use to find your Customer ID, can be one of these operators:</p><p> - <code>contains</code></p><p> - <code>doesnt\_contain</code></p><p> - <code>end\_with</code></p><p> - <code>equals</code></p><p> - <code>exists</code></p><p> - <code>matches</code></p><p> - <code>not\_end\_with</code></p><p> - <code>not\_equals</code></p><p> - <code>not\_exists</code></p><p> - <code>not\_matches</code></p><p> - <code>not\_start\_with</code></p><p> - <code>start\_with</code></p> |
| phone\_number                              | String          | The phone number you are getting Customer ID from. This parameter is used for most of the operators, except `exists` and `not_exists`.                                                                                                                                                                                                                                                                                                                                                                              |
| phone\_number\[]                           | Array of String | The array of phone numbers if you want to get multiple Customer IDs, only applies to the operators `matches` and `not_matches`.                                                                                                                                                                                                                                                                                                                                                                                     |
| phone\_number                              | null            | The special value for the 2 operators `exists` and `not_exists`.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|                                            | String          | Select pagination (default: 1).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| limit                                      | Number          | Set the results count (default: 25).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

#### Headers

| Name                                            | Type   | Description             |
| ----------------------------------------------- | ------ | ----------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer `<ACCESS_TOKEN>` |

{% tabs %}
{% tab title="200: OK The request is succeeded, the server responds with the customer profile" %}

```json
{
    "code": 200,
    "message": "Success",
    "data": {
        "entries": [
            {
                "customer_id": {
                    "value": "84907089782"
                },
                "phone": {
                    "value": "84907089782"
                }
            }
        ],
        "meta": {
            "total": 1
        }
    },
    "codeMessage": null,
    "duration": "1.872 ms"
}
```

{% endtab %}

{% tab title="403: Forbidden The authorization process is failed, caused by an invalid token, an expired token or a token without the valid scope." %}

```json
{
    "code": 301,
    "message": "Permission denied",
    "data": "You don't have permission to access this request!"
}
```

{% endtab %}

{% tab title="429: Too Many Requests The number of request is exceed the rate limiting, currently we only allow 200 request/minutes for this API." %}

```json
{
  "code": 500,
  "message": "<html>\r\n<head><title>429 Too Many Requests</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>429 Too Many Requests</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n",
  "duration": "0.35 ms"
}
```

{% endtab %}
{% endtabs %}
