> For the complete documentation index, see [llms.txt](https://docs.mavenseed.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mavenseed.com/developers/api/customers.md).

# Customers

## All Customers

<mark style="color:blue;">`GET`</mark> `https://yoursite.mavenseed.com/api/v1/customers`

Retrieve all customers

#### Path Parameters

| Name | Type    | Description            |
| ---- | ------- | ---------------------- |
| page | integer | Results are paginated. |

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Auth token  |

{% tabs %}
{% tab title="200 Returns an array of members. Only the first 20 are returned. Passing the page param will paginate the results.
" %}

```javascript
[
    {
        "id": 1976,
        "first_name": "api",
        "last_name": "test",
        "email": "anothertest@sdsdsd.com",
        "created_at": "2019-10-17T11:20:05.223-04:00",
        "updated_at": "2019-10-17T11:20:05.223-04:00",
        "avatar_data": null,
        "stripe_customer_id": null,
        "vat_number": null,
        "address": null,
        "zipcode": null,
        "city": null,
        "state": null,
        "country": null
    },
    {
        "id": 1974,
        "first_name": "api",
        "last_name": "test",
        "email": "apitest@sdsdsd.com",
        "created_at": "2019-10-16T17:34:43.302-04:00",
        "updated_at": "2019-10-16T17:34:43.302-04:00",
        "avatar_data": null,
        "stripe_customer_id": null,
        "vat_number": null,
        "address": null,
        "zipcode": null,
        "city": null,
        "state": null,
        "country": null
    }
]
```

{% endtab %}
{% endtabs %}

## Show Customer

<mark style="color:blue;">`GET`</mark> `https://yoursite.mavenseed.com/api/v1/customers/:id`

Retrieve a single member

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Auth token  |

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

```javascript
    {
        "id": 33,
        "internal_coupon_id": "englishtea",
        "coupon_type": "coupon",
        "currency": "USD",
        "duration": "once",
        "duration_in_months": null,
        "max_redemptions": null,
        "amount_off": 6000,
        "percent_off": null,
        "redeem_by": null,
        "eligible_types": [
            "orders"
        ],
        "created_at": "2020-05-14T13:47:54.567-04:00",
        "updated_at": "2020-09-08T12:28:49.246-04:00",
        "supported_countries": [],
        "metadata": "{}",
        "coupons_orders_count": 0
    },
```

{% endtab %}

{% tab title="404 " %}

```ruby
null
```

{% endtab %}
{% endtabs %}

## Create Customer

<mark style="color:green;">`POST`</mark> `https://yoursite.mavenseed.com/api/v1/customers`

Create a customer.

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Auth Token  |

#### Request Body

| Name                 | Type   | Description                            |
| -------------------- | ------ | -------------------------------------- |
| first\_name          | string | Customer first name                    |
| last\_name           | string | Customer last name                     |
| email                | string | Email of customer                      |
| avatar\_data         | string | Hash of avatar image data (n/a in API) |
| stripe\_customer\_id | string | Stripe Customer ID                     |
| vat\_number          | string | VAT Business number                    |
| address              | string | Customer address                       |
| zipcode              | string | Customer zipcode                       |
| city                 | string | Customer city                          |
| state                | string | Customer state (2 letter iso code)     |
| country              | string | Customer country (2 letter iso code)   |

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

```ruby
{
    "id": 1976,
    "first_name": "api",
    "last_name": "test",
    "email": "anothertest@sdsdsd.com",
    "created_at": "2019-10-17T11:20:05.223-04:00",
    "updated_at": "2019-10-17T11:20:05.223-04:00",
    "avatar_data": null,
    "stripe_customer_id": null,
    "vat_number": null,
    "address": null,
    "zipcode": null,
    "city": null,
    "state": null,
    "country": null
}
```

{% endtab %}
{% endtabs %}

## Update Customer

<mark style="color:purple;">`PATCH`</mark> `https://yoursite.mavenseed.com/api/v1/customers/:id`

Update a single customer. All of the above properties in create customer are valid.

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Auth token  |

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

```ruby
{
    "id": 1976,
    "first_name": "api",
    "last_name": "test",
    "email": "anothertest@sdsdsd.com",
    "created_at": "2019-10-17T11:20:05.223-04:00",
    "updated_at": "2019-10-17T11:20:05.223-04:00",
    "avatar_data": null,
    "stripe_customer_id": null,
    "vat_number": null,
    "address": null,
    "zipcode": null,
    "city": null,
    "state": null,
    "country": null
}
```

{% endtab %}
{% endtabs %}

## Delete a Customer

<mark style="color:red;">`DELETE`</mark> `https://yoursite.mavenseed.com/api/v1/customers/:id`

Delete a customer.

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | Auth token. |

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

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mavenseed.com/developers/api/customers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
