> For the complete documentation index, see [llms.txt](https://shiply-integration-apis.gitbook.io/shiply-integration-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shiply-integration-apis.gitbook.io/shiply-integration-documentation/integration-apis/recipients/find-recipients-by-phone-number.md).

# Find recipients by phone number

```php
POST /recipient/findRecipientByPhoneNumber
```

This API is used to find recipients information by searching using their phone numbers.

{% hint style="info" %}
**Note:** The results displayed for recipients are limited to **only those you have previously interacted with**.
{% endhint %}

#### Headers

<table><thead><tr><th width="374">Key</th><th>Value</th></tr></thead><tbody><tr><td>Accept</td><td>application/json</td></tr><tr><td>Content-Type</td><td>application/json</td></tr></tbody></table>

#### Request body

{% code lineNumbers="true" %}

```json
{
    "phone_number": "0599222111",
    "Shiply_API_KEY": "your_api_key"
}
```

{% endcode %}

#### Response body

{% tabs %}
{% tab title="Success" %}
Status code: <mark style="color:green;">200 OK</mark>&#x20;

{% code lineNumbers="true" %}

```json
{
    "success": true,
    "recipients": [
        {
            "id": 1463937,
            "address_id": 1470985,
            "first_name": "test",
            "last_name": null,
            "note": null,
            "phone": "0599222111",
            "phone2": null,
            "is_blocked": 0,
            "recipient_info_id": null,
            "created_at": "2025-03-10 14:57:31",
            "updated_at": "2025-03-10 14:57:31",
            "address": {
                "id": 1470985,
                "city_id": 1,
                "village_id": 331,
                "street_name": "Rafedia",
                "location_updated_at": null,
                "additional_information": null,
                "order": 0,
                "created_at": "2025-03-10 14:57:31",
                "updated_at": "2025-03-10 14:57:31",
                "location_updated_by_user_id": null,
                "hasLocation": false,
                "city": {
                    "id": 1,
                    "name": "القدس",
                    "deleted_at": null
                },
                "village": {
                    "id": 331,
                    "city_id": 1,
                    "name": "القدس",
                    "driver_region_id": 2,
                    "region_id": 2,
                    "region_type": 2,
                    "note": "ملاحظه القريه",
                    "is_closed": 0,
                    "deleted_at": null
                }
            }
        },
        {
            "id": 1463935,
            "address_id": 1470983,
            "first_name": "test",
            "last_name": null,
            "note": null,
            "phone": "0599222111",
            "phone2": null,
            "is_blocked": 0,
            "recipient_info_id": null,
            "created_at": "2025-03-10 14:56:51",
            "updated_at": "2025-03-10 14:56:51",
            "address": {
                "id": 1470983,
                "city_id": 1,
                "village_id": 331,
                "street_name": "Rafedia",
                "location_updated_at": null,
                "additional_information": null,
                "order": 0,
                "created_at": "2025-03-10 14:56:51",
                "updated_at": "2025-03-10 14:56:51",
                "location_updated_by_user_id": null,
                "hasLocation": false,
                "city": {
                    "id": 1,
                    "name": "القدس",
                    "deleted_at": null
                },
                "village": {
                    "id": 331,
                    "city_id": 1,
                    "name": "القدس",
                    "driver_region_id": 2,
                    "region_id": 2,
                    "region_type": 2,
                    "note": "ملاحظه القريه",
                    "is_closed": 0,
                    "deleted_at": null
                }
            }
        },
        {
            "id": 1463933,
            "address_id": 1470981,
            "first_name": "test",
            "last_name": null,
            "note": null,
            "phone": "0599222111",
            "phone2": null,
            "is_blocked": 0,
            "recipient_info_id": null,
            "created_at": "2025-03-10 14:04:52",
            "updated_at": "2025-03-10 14:04:52",
            "address": {
                "id": 1470981,
                "city_id": 1,
                "village_id": 331,
                "street_name": "Rafedia",
                "location_updated_at": null,
                "additional_information": null,
                "order": 0,
                "created_at": "2025-03-10 14:04:52",
                "updated_at": "2025-03-10 14:04:52",
                "location_updated_by_user_id": null,
                "hasLocation": false,
                "city": {
                    "id": 1,
                    "name": "القدس",
                    "deleted_at": null
                },
                "village": {
                    "id": 331,
                    "city_id": 1,
                    "name": "القدس",
                    "driver_region_id": 2,
                    "region_id": 2,
                    "region_type": 2,
                    "note": "ملاحظه القريه",
                    "is_closed": 0,
                    "deleted_at": null
                }
            }
        },
        {
            "id": 1462990,
            "address_id": 1470030,
            "first_name": "test",
            "last_name": null,
            "note": null,
            "phone": "0599222111",
            "phone2": null,
            "is_blocked": 0,
            "recipient_info_id": null,
            "created_at": "2025-01-25 13:29:20",
            "updated_at": "2025-01-25 13:29:20",
            "address": {
                "id": 1470030,
                "city_id": 1,
                "village_id": 331,
                "street_name": "Rafedia",
                "location_updated_at": null,
                "additional_information": null,
                "order": 0,
                "created_at": "2025-01-25 13:29:20",
                "updated_at": "2025-01-25 13:29:20",
                "location_updated_by_user_id": null,
                "hasLocation": false,
                "city": {
                    "id": 1,
                    "name": "القدس",
                    "deleted_at": null
                },
                "village": {
                    "id": 331,
                    "city_id": 1,
                    "name": "القدس",
                    "driver_region_id": 2,
                    "region_id": 2,
                    "region_type": 2,
                    "note": "ملاحظه القريه",
                    "is_closed": 0,
                    "deleted_at": null
                }
            }
        },
        {
            "id": 1462944,
            "address_id": 1469981,
            "first_name": "test",
            "last_name": null,
            "note": null,
            "phone": "0599222111",
            "phone2": null,
            "is_blocked": 0,
            "recipient_info_id": null,
            "created_at": "2025-01-15 16:20:10",
            "updated_at": "2025-01-15 16:20:10",
            "address": {
                "id": 1469981,
                "city_id": 3,
                "village_id": 1,
                "street_name": "Rafedia",
                "location_updated_at": null,
                "additional_information": null,
                "order": 0,
                "created_at": "2025-01-15 16:20:10",
                "updated_at": "2025-01-15 16:20:10",
                "location_updated_by_user_id": null,
                "hasLocation": false,
                "city": {
                    "id": 3,
                    "name": "نابلس",
                    "deleted_at": null
                },
                "village": {
                    "id": 1,
                    "city_id": 3,
                    "name": "نابلس",
                    "driver_region_id": 1,
                    "region_id": 1,
                    "region_type": 1,
                    "note": null,
                    "is_closed": 0,
                    "deleted_at": null
                }
            }
        }
    ]
}
```

{% endcode %}

The response includes a maximum to 5 recipients records and their information.

**Note:** The response may include an empty array which indicates that there is no results for the entered phone number.
{% endtab %}

{% tab title="Fail" %}
Status code: <mark style="color:green;">200 OK</mark>

{% code lineNumbers="true" %}

```json
{
    "success": false,
    "errors": [
        "recipient not found"
    ]
}
```

{% endcode %}

This response is returned when there is no recipients with the provided phone number.
{% endtab %}

{% tab title="Unauthorized" %}
Status code: <mark style="color:green;">200 OK</mark>

{% code lineNumbers="true" %}

```json
{
    "success": false,
    "errors": [
        "unauthorized"
    ]
}
```

{% endcode %}

This response is returned when the <mark style="color:blue;">Shiply\_API\_KEY</mark> is not included in the request body.
{% endtab %}
{% endtabs %}
