# Merchant API

A `merchant` is represented as an object with the following structure:

```javascript
{
  currency: String,
  customerCount: Number,
  country: String,
  createdAt: String,
  creditsEnabled: Boolean,
  currency: String,
  email: String,
  firstName: String,
  landingPageEnabled: Boolean,
  lastName: String,
  merchantId: String,
  merchantName: String,
  myshopifyDomain: String,
  phone: String,
  savedSearchId: String,
  status: String,
  subscriptionProduct: String,
  updatedAt: String
}
```

## Endpoints & Methods

## Get merchant

<mark style="color:blue;">`GET`</mark> `https://public.inveterateapi.com/merchant`

Gets merchant data.

#### Headers

| Name                                                   | Type   | Description                                                                                            |
| ------------------------------------------------------ | ------ | ------------------------------------------------------------------------------------------------------ |
| X-Inveterate-Api-Key<mark style="color:red;">\*</mark> | String | Required to access all protected endpoints on this API. Obtained from merchant's Inveterate dashboard. |

{% tabs %}
{% tab title="200: OK Get merchant success" %}

```json
{
  "data": {
    "merchant": {
      "currency": "USD",
      "customerCount": 2374,
      "country": "United States",
      "createdAt": "2022-01-01T12:00:00.000Z",
      "creditsEnabled": true,
      "currency": "USD",
      "email": "help@inveterate.com",
      "firstName": "Inveterate",
      "landingPageEnabled": true,
      "lastName": "Example",
      "merchantId": "inveterate",
      "merchantName": "Inveterate",
      "myshopifyDomain": "inveterate.myshopify.com",
      "phone": "555-123-4567",
      "savedSearchId": "gid://shopify/Segment/1234567890",
      "status": "ACTIVE",
      "subscriptionProduct": "gid://shopify/Product/1234567890",
      "updatedAt": "2022-01-01T12:00:00.000Z"
    }
  }
  "success": true,
  "errors": []
}
```

{% endtab %}

{% tab title="400: Bad Request All errors" %}

```json
{
  "data": {}
  "success": false,
  "errors": [
    "Invalid API key"
  ]
}
```

{% endtab %}
{% endtabs %}


---

# 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://help.inveterate.com/dev/api-reference-docs/legacy-public-api-reference/merchant-api.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.
