# Customers

These keys are specified to use as defined in docs, they are case-sensitive. Any change in these keys may cause issues during data sync&#x20;

### Authentication&#x20;

\
Use your token provided inside converted.in after on boarding process to authenticate the request using form-data body

![](/files/mBVuDLjC4nZ79kwBti5c)

<mark style="color:green;">`POST`</mark> `YOUR_BASEURL/convertedin/customers`

#### Request Body

| Name                                        | Type    | Description                  |
| ------------------------------------------- | ------- | ---------------------------- |
| par\_page<mark style="color:red;">\*</mark> | integer | limit per page (default 100) |
| page<mark style="color:red;">\*</mark>      | integer | page number                  |
| token<mark style="color:red;">\*</mark>     | string  |                              |

{% tabs %}
{% tab title="200 " %}

```
{
    "current_page": 1,
    "data":  [
        {
            "id": 1739,
            "email": "salehmoharam@gmail.com",
            "first_name": "صالح",
            "last_name": "عادل",
            "orders_count": 23,
            "total_spent": 184,
            "currency": "EGP",
            "phone": "01000000001",
            "registered_at": "2020-10-12 10:00:00",
            "gender": "male" // male, female, unknown
        }
    ],
    "from": 1,
    "last_page": 25,
    "per_page": 100,
    "to": 100,
    "total": 2442
}
```

{% endtab %}
{% endtabs %}

| key            | Description                                                              | Validation Rules              |
| -------------- | ------------------------------------------------------------------------ | ----------------------------- |
| id             | customer id on your database linked to his orders                        | **Required**                  |
| email          | customer unique email                                                    | **Required**                  |
| first\_name    | customer first name                                                      | **Required**                  |
| last\_name     | customer last/family name                                                | **Required**                  |
| orders\_count  | customer successful orders count                                         | **Required**                  |
| total\_spent   | customer total money spent on orders                                     | **Required**                  |
| currency       | customer currency in ISO code (USD, EUR)                                 | **Required**                  |
| phone          | customer phone number                                                    | Not required                  |
| registered\_at | customer registration date, Format: Y-m-d H:i:s, ex: 2020-12-15 19:00:00 | **Required**                  |
| gender         | customer gender ('male','female','unknown')                              | Not required, **Recommended** |

### Response

```json
{
    "data": [
        {
            "id": 207119551,
            "email": "bob.norman@hostmail.com",
            "accepts_marketing": false,
            "created_at": "2021-10-01T16:52:26-04:00",
            "updated_at": "2021-10-01T16:52:26-04:00",
            "first_name": "Bob",
            "last_name": "Norman",
            "orders_count": 1,
            "state": "disabled",
            "total_spent": "199.65",
            "last_order_id": 450789469,
            "verified_email": true,
            "phone": "+16136120707",
            "last_order_name": "#1001",
            "currency": "USD",
            "addresses": [
                {
                    "id": 207119551,
                    "customer_id": 207119551,
                    "first_name": null,
                    "last_name": null,
                    "company": null,
                    "address1": "Chestnut Street 92",
                    "address2": "",
                    "city": "Louisville",
                    "province": "Kentucky",
                    "country": "United States",
                    "zip": "40202",
                    "phone": "555-625-1199",
                    "name": "",
                    "province_code": "KY",
                    "country_code": "US",
                    "country_name": "United States",
                    "default": true
                }
            ],
            "default_address": {
                "id": 207119551,
                "customer_id": 207119551,
                "first_name": null,
                "last_name": null,
                "company": null,
                "address1": "Chestnut Street 92",
                "address2": "",
                "city": "Louisville",
                "province": "Kentucky",
                "country": "United States",
                "zip": "40202",
                "phone": "555-625-1199",
                "name": "",
                "province_code": "KY",
                "country_code": "US",
                "country_name": "United States",
                "default": true
            }
        }
    ],
    "total": 1000,
    "per_page": 100,
    "current_page": 1,
    "last_page": 10,
    "from": 1,
    "to": 100
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.converted.in/api-1/customers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
