# 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 %}
