# Getting started

The Clym API follows the REST API design and is organized into resource-oriented URLs that can be found in the API Reference part of the documentation, returns JSON-encoded responses and uses standard HTTP response code and verbs.

All requests to the Clym API require authentication via an API key that is available in our administrative portals. You can find more information in the Authentication section


# Partner API Structure

In order to integrate with our Partner Portal, the base URL of all API endpoints is

```
https://partners.clym.io/api/portal
```

When calling API endpoints that change a resource, you must provide a `JSON` request body with the `Content-Type: application/json` HTTP header set.&#x20;

When calling API endpoints that perform asset uploading, you must use the multipart/form-data encoding with the `Content-Type: multipart/form-data` HTTP header set and the asset under the `asset` field.

All API endpoints will return `JSON` data with the `Content-Type: application/json` response HTTP header set.

The following status codes can be returned:

| Status code                              | Description                                                                                              |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| <mark style="color:green;">`2xx`</mark>  | Everything worked as expected                                                                            |
| <mark style="color:yellow;">`400`</mark> | The request data was unacceptable, most likely due to missing required params or invalid specified data. |
| <mark style="color:orange;">`401`</mark> | The specified API key is not valid                                                                       |
| <mark style="color:orange;">`403`</mark> | The API key does not have permissions to perform the request.                                            |
| <mark style="color:yellow;">`404`</mark> | The specified API endpoint, resource or requested resource does not exist.                               |
| <mark style="color:yellow;">`429`</mark> | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.         |
| <mark style="color:red;">`5xx`</mark>    | Server errors, something went wrong on Clym's end.                                                       |


# Authorization

All requests must be authenticated with an API key that you can obtain by accessing your [Partner Portal](https://partners.clym.io/) account, navigate to the `Integrations / API Keys` section.

For an additional layer of security, you can specify `IP restriction` when creating an API key, so that it can only be used from the specified IP address. You can also specify when this key will expire and no longer be available by using the `Expires on` field.

Once an API key has been obtained, it must be included in the `HTTP Headers` section of all requests, as follows:

```bash
Authorization: Bearer {YOUR_API_KEY}
```

**Example**

```bash
curl --request GET \
  --url https://partners.clym.io/api/portal/domains \
  --header 'Authorization: Bearer {YOUR_API_KEY}'
```


# Error handling

Clym uses conventional HTTP response codes to indicate the success or failure of an API request. Status codes in the `2xx` range indicate success, status codes in the `4xx` range indicate an error on your side, while status codes in the `5xx` range indicate an error on our side.

The error object returned usually has the following pattern.

```json
{
    "error": {
        "code": "DATA.INVALID_NAME",
        "ns": "DATA",
        "message": "The specified name is not valid",
        "status": 400,
        "data": {
            "field": "name"
        }
    }
}
```

* `code` represents the error code, always in uppercase
* `ns`  represents the namespace of that error, such as `DATA` or `PARTNER`  or `INSTANCE`&#x20;
* `message` represents additional information about the error that occurred
* `status` represents the HTTP status code returned
* `data` represents additional structured information about the error.


# Pagination

Most top-level API resources have support for bulk resource fetches through "list" API methods. The number of resources returned by the API endpoint and the current page of the result can both be sent specified in the query string section, as described:

**Query parameters**

| Name    | Type                | Description                       |
| ------- | ------------------- | --------------------------------- |
| `limit` | number `default 10` | Number of results to be retrieved |
| `page`  | number `default 1`  | Current page in the result set.   |

**Response**

```json
{
  "meta": {
    "current_page": 2,  // tells the current page in the result set
    "next_page": 3,     // optional, present if there are additional resources available
    "prev_page": 1      // optional, present if there is a previous page to go to
  },
  "result": []          // array of resources accessed
}
```

**Example**

```bash
curl --request GET \
  --url https://partners.clym.io/api/portal/domains?limit=30&page=2 \
  --header 'Authorization: {YOUR_API_KEY}'
```

```json
{
    "meta": {
        "current_page": 2,
        "next_page": 3,
        "prev_page": 1
    },
    "result": [
        {
            "id": "....."
        }
    ]
}
```


# Asset uploading

The asset uploading flow is split into three separate API calls:

{% stepper %}
{% step %}

### Create a signed upload URL

For example, if you want to upload a `logo` image for a property, you first need to perform an API call to sign an asset, specifying the type of asset and its MIME type. The resulting object will contain an upload URL.

```bash
curl --request POST \
  --url 'https://partners.clym.io/api/portal/instance/property/sign-asset?merchant_id={yourMerchantId}' \
  --header 'Authorization: Bearer {YourAPIKey}' \
  --header 'Content-Type: application/json' \
  --data '{
	"type": "logo",
	"mime": "image/png"
}'
// Result should be
{
  "result": {
    "url": "https://eu1.clym.io/api/u/CPKWkh3HWt7hN....."
  }
}
```

{% endstep %}

{% step %}

### Upload the asset&#x20;

Once you've received the signed upload URL, you can now use it to upload your asset. The signed URL should look like: `https://{instance}.clym.io/api/u/{uploadSignature}`&#x20;

The HTTP request should be a `multipart/form-data` request with the asset under the `asset` field name. An example can be viewed below.

```bash
curl --request POST \
  --url https://eu1.clym.io/api/u/CPKWkh3HWt7hN..... \
  --header 'Content-Type: multipart/form-data' \
  --form asset=@/Users/clym/my-logo.png
// Result should be
{
  "result": {
    "id": "38f305efa9b447839...", // the asset id
    "url": "...."                // the URL of the asset
  }
}
```

{% endstep %}

{% step %}

### Use the uploaded asset id

Once you've received the asset id, you can then use it to attach it to the resource you want to use.

In the example above, we want to assign the uploaded asset to the `logo` field of a property. For that, we would need to perform the following API call:

```bash
curl --request PUT \
  --url 'https://partners.clym.io/api/portal/instance/property?merchant_id={yourMerchantId}' \
  --header 'Authorization: Bearer {YourAPIKey}' \
  --header 'Content-Type: application/json' \
  --data '{ "logo": "38f305efa9b447839.." }'
```

{% endstep %}
{% endstepper %}


# Webhooks

Webhooks allow you to subscribe to certain events from either our Partner Portal or your dedicated instance. When one of the configured events is triggered by our system, an HTTP `POST` request will be initiated to the configured webhook URL with information about the event that was triggered as well as specific event parameters. The HTTP request payload will contain a JSON object.

Webhooks can be configured in your Partner Portal account.

### Authorization

Clym webhook requests are signed using the webhook secret (available in your account) and is placed under the `X-Clym-Signature` HTTP header. The signature itself is composed of two parts: `timestamp` and `hmac_sha256(timestamp)` and has the following format:&#x20;

```javascript
X-Clym-Signature: {unixTimestamp}.{hmac.sha256(unixTimestamp, webhookSecret)}
```

A simple way of verifying the authenticity of the request is by extracting the timestamp from the signature, re-creating the HMAC hash using your webhook secret and compare the two values. An example can be found below:

```javascript
const crypto = require('crypto');
function verifySignature(header, secret) {
 try {
   const timestamp = header.slice(0, 13);     // unix millisecond timestamp 
   const ts = new Date(parseInt(timestamp));
   if (isNaN(ts)) return false;
   // Verify time drift, do not allow requests older than 30 seconds.
   if ((Date.now() - ts) > 30000) return false;     
   const headerSignature = header.slice(14);
   const verifySignature = crypto.createHmac('sha256', secret)
          .update(timestamp)
          .digest('hex');
   return verifySignature === headerSignature;
 } catch (e) {
   return false;
 }
}
```

Each webhook has its own secret that can (and should) be rotated regularly.

### Payload structure

The payload of a webhook is a JSON object that contains the following properties:

* `event` - the event code that occurred
* `params` - an object with the event parameters
* `entity` - the entity information that was changed/affected.
  * `kind` - the kind of entity that was affected (eg: `account`, `domain`, `partnerMerchant`, etc.)
  * `data` - object containing the full (or partial) representation of the affected entity

The following example shows the HTTP headers and payload of a `merchant.created` event:

```bash
X-Clym-Signature: 1753103241469.00d67a9c70aa1b575fdec79d6b9d86be70695f583c6a19ff67f5e16225ee8a59
User-Agent: clym.io-webhook
Content-Type: application/json

{
   "event": "merchant.created"
   "params": {
     "id": "65baac66a33746e99a73d74c4rdsifb7",
     "merchant_id": "my-merchant-id"
   },
   "entity": {
     "type": "partnerMerchant",
     "data": {
       "id": "65baac66a33746e99a73d74c4rdsifb7",
       "merchant_id": "my-merchant-id",
       "created_at": "2025-05-02T11:00:00.000Z"
     }
   }
}
```

### Delivery

Clym tries to deliver the webhook shortly after the event was triggered. In the event that your server is unable to properly return a `200 OK` status code for a webhook request, our system will retry the delivery up to **5** times with a **3-minute** delay between  requests. You can also manually retry webhook triggers from your Clym Partner Portal account.


# API Reference

The following endpoints allow you to interact with the Clym Portal partner API endpoints as well as with your dedicated instance (if applicable).


# Domains

The following endpoints allow you to view and manage your partner domains.

## GET /portal/domains

> Get domains

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}},"Domain":{"description":"The domain representation","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string","format":"uri"},"status":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"instance_property_id":{"type":"string"},"instance_company_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"activated_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"email":{"type":"integer","format":"email"},"company_trade_name":{"type":"string"},"company_id_number":{"type":"string"},"has_scripts":{"type":"boolean"},"has_dsar":{"type":"boolean"},"has_docs":{"type":"boolean"},"has_accessibility":{"type":"boolean"},"display_company":{"type":"boolean"},"display_dpo":{"type":"boolean"},"has_clym_logo":{"type":"boolean"},"widget_version":{"type":"integer"},"instance_id":{"type":"integer"},"system_segment_id":{"type":"integer"},"default_notice_type":{"type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"source":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"partner_id":{"type":"string"},"privacy_widget":{"type":"string","description":"Privacy widget script tag to embed on the domain page."},"privacy_center_link":{"type":"string","description":"Footer link to open privacy widget"},"privacy_dnt_link":{"type":"string","description":"Footer link to open data subject requests on privacy widget"},"merchants":{"type":"array","description":"An array of merchant ids associated with this domain","items":{"type":"string"}},"instance":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hostname":{"type":"string"}}},"property":{"$ref":"#/components/schemas/Property"},"subscription":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["NEW","ACTIVE","TRIAL","GRACE","PENDING_CANCEL","PENDING_CHANGE","PENDING_ACTIVE","INACTIVE"]},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"price":{"type":"object","properties":{"id":{"type":"number"},"frequency":{"type":"string","enum":["MONTH","YEAR"]},"currency":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"price_amount":{"type":"number"},"price_list":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"code":{"type":"string"}}},"product":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"name":{"type":"string"}}}}}}}}},"Property":{"type":"object","description":"Contains the domain details.","properties":{"id":{"type":"string"},"name":{"type":"string","format":"uri"},"company":{"$ref":"#/components/schemas/Company"}}},"Company":{"type":"object","description":"Company owning a set of domains.","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"address":{"type":"object","properties":{"country":{"type":"string"},"city":{"type":"string"},"address":{"type":"string"},"postal_code":{"type":"string"},"phone_number":{"type":"string"}}},"owner":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}},"paths":{"/portal/domains":{"get":{"summary":"Get domains","parameters":[{"in":"query","name":"search","schema":{"type":"string"},"description":"Search by hostname, domain ID, or property ID"},{"in":"query","name":"id","schema":{"type":"string"},"description":"Retrieve a specific domain by ID"},{"in":"query","name":"status","schema":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"description":"Filter by domain status"},{"in":"query","name":"is_active","schema":{"type":"boolean"},"description":"Filter by active/inactive domains"},{"in":"query","name":"source","schema":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"description":"Filter by domain creation source"},{"in":"query","name":"has_scripts","schema":{"type":"boolean"},"description":"Filter by script management status"},{"in":"query","name":"has_dsar","schema":{"type":"boolean"},"description":"Filter by Data Subject Request functionality"},{"in":"query","name":"has_docs","schema":{"type":"boolean"},"description":"Filter by legal documents display"},{"in":"query","name":"has_accessibility","schema":{"type":"boolean"},"description":"Filter by accessibility functionality"},{"in":"query","name":"display_company","schema":{"type":"boolean"},"description":"Filter by company information display"},{"in":"query","name":"display_dpo","schema":{"type":"boolean"},"description":"Filter by DPO information display"},{"in":"query","name":"company_trade_name","schema":{"type":"string"},"description":"Search by company trade name"},{"in":"query","name":"company_id_number","schema":{"type":"string"},"description":"Filter by company ID number"},{"in":"query","name":"instance_company_id","schema":{"type":"string"},"description":"Filter by instance company ID"},{"in":"query","name":"instance_property_id","schema":{"type":"string"},"description":"Filter by instance property ID"},{"in":"query","name":"instance_id","schema":{"type":"string"},"description":"Filter by instance ID"},{"in":"query","name":"widget_version","schema":{"type":"integer"},"description":"Filter by widget version"},{"in":"query","name":"product_id","schema":{"type":"array","items":{"type":"string"}},"description":"Filter by product ID(s)","style":"form","explode":true},{"in":"query","name":"price_list_id","schema":{"type":"string"},"description":"Filter by price list ID"},{"in":"query","name":"merchant_id","schema":{"type":"string"},"description":"Filter by merchant ID"},{"in":"query","name":"subscription_status","schema":{"type":"string","enum":["NEW","ACTIVE","TRIAL","GRACE","PENDING_CANCEL","PENDING_CHANGE","PENDING_ACTIVE","INACTIVE"]},"description":"Filter by subscription status"},{"in":"query","name":"is_active_subscription","schema":{"type":"boolean"},"description":"Filter by active subscriptions"},{"in":"query","name":"has_subscription","schema":{"type":"boolean"},"description":"Filter domains with/without subscriptions"},{"in":"query","name":"referral_partner_id","schema":{"type":"string"},"description":"Filter by referral partner ID"},{"in":"query","name":"created_at_start","schema":{"type":"string","format":"date-time"},"description":"Filter domains created after this date"},{"in":"query","name":"created_at_end","schema":{"type":"string","format":"date-time"},"description":"Filter domains created before this date"},{"in":"query","name":"activated_at_start","schema":{"type":"string","format":"date-time"},"description":"Filter domains activated after this date"},{"in":"query","name":"activated_at_end","schema":{"type":"string","format":"date-time"},"description":"Filter domains activated before this date"},{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Results per page"}],"responses":{"200":{"description":"An array with all partner domains","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}}}}}}}}
```

## Create domain

> Create a new domain in your partner account. Note that some fields are required and some are optional, depending on the onboarding configuration setup for your partner. To find out more, reach out to your partner account manager.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains":{"post":{"summary":"Create domain","description":"Create a new domain in your partner account. Note that some fields are required and some are optional, depending on the onboarding configuration setup for your partner. To find out more, reach out to your partner account manager.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","format":"uri","description":"The domain to be registered"},"product":{"type":"string","description":"The billing product code for this domain. Available under /products"},"price_list":{"type":"string","description":"The billing price list code for this domain"},"company_name":{"type":"string","description":"The company legal name"},"company_trade_name":{"type":"string","description":"The company trade name if different from the company (legal) name"},"company_id_number":{"type":"string","description":"Internal company ID number"},"company_setup":{"type":"boolean","default":false,"description":"When set to true, a new company will be created and company_name will not be used as company uniqueness"},"account_email":{"type":"string","format":"email","description":"The email account of the domain owner. This email address will be used for all transactional emails (including onboarding emails)."},"account_first_name":{"type":"string","description":"The first name of the individual owning the domain"},"account_last_name":{"type":"string","description":"The last name of the individual owning the domain"},"phone_number":{"type":"string","description":"The phone number of the individual owning the domain"},"vat_number":{"type":"string","description":"Company VAT number"},"registration_number":{"type":"string","description":"Company registration number"},"country":{"type":"string","description":"Company country code in ISO 3166-1 alpha-2"},"state":{"type":"string","description":"Company state code in ISO 3166-1 alpha-2"},"city":{"type":"string","description":"Company city"},"address":{"type":"string","description":"Company address"},"address_2":{"type":"string","description":"Secondary address line"},"postal_code":{"type":"string","description":"Company postal code"},"primary_color":{"type":"string","description":"Domain primary color in hex format"},"has_scripts":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not handle any kind of consent/cookie management and will not block any scripts."},"has_dsar":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not allow any Data Subject Request creation"},"has_docs":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not display any legal documents"},"has_accessibility":{"type":"boolean","default":true,"description":"Optional, when disabled, the widget will not have any accessibility functionality enabled."},"display_dpo":{"type":"boolean","default":true,"description":"Optional, when disabled, the DPO information in the widget will be hidden"},"display_company":{"type":"boolean","default":true,"description":"Optional, when disabled, the Company tab in the widget will be hidden"},"subdomains":{"type":"array","description":"Optional, if specified, additional subdomains to be created to the property","items":{"type":"string","format":"uri"},"maxItems":100},"default_notice_type":{"description":"Optional default widget notification type to be used by the widget","type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"send_intro":{"type":"boolean","description":"Determine if the system will send the customized email or not"},"action":{"type":"string","enum":["SCAN","SCAN_INVITE","CREATE_SILENT"]},"merchant_id":{"type":"string","description":"The merchant id to be assigned to this domain","maxLength":204},"referral_partner_id":{"type":"string","description":"The ID of the partner who referred this domain"},"criterias":{"type":"array","description":"Company criteria identifiers","items":{"type":"string"}},"sector_id":{"type":"string","description":"Business sector identifier"},"industry_id":{"type":"string","description":"Industry classification identifier"}},"required":["domain","company_name","account_email"]}}}},"responses":{"200":{"description":"Domain added to the partner account","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string","format":"uri"},"status":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"instance_property_id":{"type":"string"},"instance_company_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"email":{"type":"integer","format":"email"},"company_trade_name":{"type":"string"},"company_id_number":{"type":"string"},"has_scripts":{"type":"boolean"},"has_dsar":{"type":"boolean"},"has_docs":{"type":"boolean"},"has_accessibility":{"type":"boolean"},"display_company":{"type":"boolean"},"display_dpo":{"type":"boolean"},"default_notice_type":{"type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"source":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"partner_id":{"type":"string"},"privacy_widget":{"type":"string","description":"Privacy widget script tag to embed on the domain page."},"privacy_center_link":{"type":"string","description":"Footer link to open privacy widget"},"privacy_dnt_link":{"type":"string","description":"Footer link to open data subject requests on privacy widget"}}}}}}}}}}}
```

## Get domain

> Retrieve information about a single domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Domain":{"description":"The domain representation","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string","format":"uri"},"status":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"instance_property_id":{"type":"string"},"instance_company_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"activated_at":{"type":"string","format":"date-time"},"is_active":{"type":"boolean"},"email":{"type":"integer","format":"email"},"company_trade_name":{"type":"string"},"company_id_number":{"type":"string"},"has_scripts":{"type":"boolean"},"has_dsar":{"type":"boolean"},"has_docs":{"type":"boolean"},"has_accessibility":{"type":"boolean"},"display_company":{"type":"boolean"},"display_dpo":{"type":"boolean"},"has_clym_logo":{"type":"boolean"},"widget_version":{"type":"integer"},"instance_id":{"type":"integer"},"system_segment_id":{"type":"integer"},"default_notice_type":{"type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]},"source":{"type":"string","enum":["API","IMPORT","PORTAL","WIDGET_SCAN","WIDGET_REGISTRATION"]},"partner_id":{"type":"string"},"privacy_widget":{"type":"string","description":"Privacy widget script tag to embed on the domain page."},"privacy_center_link":{"type":"string","description":"Footer link to open privacy widget"},"privacy_dnt_link":{"type":"string","description":"Footer link to open data subject requests on privacy widget"},"merchants":{"type":"array","description":"An array of merchant ids associated with this domain","items":{"type":"string"}},"instance":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hostname":{"type":"string"}}},"property":{"$ref":"#/components/schemas/Property"},"subscription":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["NEW","ACTIVE","TRIAL","GRACE","PENDING_CANCEL","PENDING_CHANGE","PENDING_ACTIVE","INACTIVE"]},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"price":{"type":"object","properties":{"id":{"type":"number"},"frequency":{"type":"string","enum":["MONTH","YEAR"]},"currency":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"price_amount":{"type":"number"},"price_list":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"code":{"type":"string"}}},"product":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string"},"name":{"type":"string"}}}}}}}}},"Property":{"type":"object","description":"Contains the domain details.","properties":{"id":{"type":"string"},"name":{"type":"string","format":"uri"},"company":{"$ref":"#/components/schemas/Company"}}},"Company":{"type":"object","description":"Company owning a set of domains.","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"address":{"type":"object","properties":{"country":{"type":"string"},"city":{"type":"string"},"address":{"type":"string"},"postal_code":{"type":"string"},"phone_number":{"type":"string"}}},"owner":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}},"paths":{"/portal/domains/{domainId}":{"get":{"summary":"Get domain","description":"Retrieve information about a single domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The partner domain information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}}}}}}}
```

## Update domain

> Update information about a domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}":{"put":{"summary":"Update domain","description":"Update information about a domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_name":{"type":"string","description":"The company legal name"},"company_trade_name":{"type":"string","description":"The company trade name if different from the company (legal) name"},"company_id_number":{"type":"string","description":"Internal company ID number"},"country":{"type":"string","description":"Company country code in ISO 3166-1 alpha-2"},"state":{"type":"string","description":"Company state code in ISO 3166-1 alpha-2"},"city":{"type":"string","description":"Company city"},"address":{"type":"string","description":"Company address"},"address_2":{"type":"string","description":"Secondary address line"},"postal_code":{"type":"string","description":"Company postal code"},"primary_color":{"type":"string","description":"Domain primary color"},"has_scripts":{"type":"boolean","description":"Optional, when disabled, the widget will not handle any kind of consent/cookie management and will not block any scripts."},"has_dsar":{"type":"boolean","description":"Optional, when disabled, the widget will not allow any Data Subject Request creation"},"has_docs":{"type":"boolean","description":"Optional, when disabled, the widget will not display any legal documents"},"has_accessibility":{"type":"boolean","description":"Optional, when disabled, the widget will not have any accessibility functionality enabled."},"display_dpo":{"type":"boolean","description":"Optional, when disabled, the DPO information in the widget will be hidden"},"display_company":{"type":"boolean","description":"Optional, when disabled, the Company tab in the widget will be hidden"},"default_notice_type":{"description":"Optional default widget notification type to be used by the widget","type":"string","enum":["CLASSIC","DISCRETE","FOOTER","TOP"]}}}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string"}}}}}}}}}}}}}
```

## Delete domain

> Completely delete the domain and all associated functionality from your partner account

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}":{"delete":{"summary":"Delete domain","description":"Completely delete the domain and all associated functionality from your partner account","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain deletion confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}}}}}}}}}
```

## Deactivate domain

> Deactivate an active domain, changing its status to INACTIVE. The domain will be excluded from the list of partner domains.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/deactivate":{"post":{"summary":"Deactivate domain","description":"Deactivate an active domain, changing its status to INACTIVE. The domain will be excluded from the list of partner domains.","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Activate domain

> Activate a deactivated domain. The domain will be included in the list of partner domains.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/activate":{"post":{"summary":"Activate domain","description":"Activate a deactivated domain. The domain will be included in the list of partner domains.","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Invite domain

> Send an invitation email to start the onboarding process for the specified domain. The email will be sent to the email address of the account owner and the domain status will change to INVITED. Once we start receiving the first page views, the domain status will change to ACTIVE

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/invite":{"post":{"summary":"Invite domain","description":"Send an invitation email to start the onboarding process for the specified domain. The email will be sent to the email address of the account owner and the domain status will change to INVITED. Once we start receiving the first page views, the domain status will change to ACTIVE","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"send_intro":{"type":"boolean","description":"Determine if the system will send the customized intro email or not."}}}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Get subdomains

> Retrieves all the previously created subdomains of the specified domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Subdomain":{"description":"Subdomain of a domain.","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"instance_domain_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"domain_id":{"type":"string"},"instance_id":{"type":"string"}}}}},"paths":{"/portal/domains/{domainId}/subdomains":{"get":{"summary":"Get subdomains","description":"Retrieves all the previously created subdomains of the specified domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of the domain's subdomains","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/Subdomain"}}}}}}}}}}}}
```

## Create subdomain

> Adds a new subdomain to the specified domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Subdomain":{"description":"Subdomain of a domain.","type":"object","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"instance_domain_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"domain_id":{"type":"string"},"instance_id":{"type":"string"}}}}},"paths":{"/portal/domains/{domainId}/subdomains":{"post":{"summary":"Create subdomain","description":"Adds a new subdomain to the specified domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subdomain":{"type":"string","format":"uri","description":"The full hostname of the subdomain to be added"}},"required":["subdomain"]}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subdomain"}}}}}}}}}
```

## Delete subdomain

> Removes the specified subdomain from the specified domain

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/subdomains/{subdomain}":{"delete":{"summary":"Delete subdomain","description":"Removes the specified subdomain from the specified domain","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}},{"name":"subdomain","in":"path","description":"The previously-created subdomain hostname","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}}}}}}}}}
```

## Change product

> Changes the product and price list of the domain's subscription.

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/domains/{domainId}/subscription/product":{"post":{"summary":"Change product","description":"Changes the product and price list of the domain's subscription.","parameters":[{"name":"domainId","in":"path","description":"Domain id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","description":"The target product code, available in the /products section"},"price_list":{"type":"string","description":"The target price list code, available in the /products section"}},"required":["product"]}}}},"responses":{"200":{"description":"Subscription product change acknowledgement","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"changed":{"type":"boolean"}},"required":["result"]}}}}}}}}}}}
```

## Bulk change product

> Changes the product and price list in bulk, for up to \*100\* domains at once

```json
{"openapi":"3.0.3","info":{"title":"Partner Domain API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Error":{"description":"An error object","type":"object","properties":{"code":{"type":"string","description":"An error code"},"ns":{"type":"string","description":"An error namespace"},"message":{"type":"string","description":"Additional error message information"},"status":{"type":"number"},"data":{"type":"object"}}}}},"paths":{"/portal/domains/bulk/subscription/product":{"post":{"summary":"Bulk change product","description":"Changes the product and price list in bulk, for up to *100* domains at once","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"object","required":["id","product"],"properties":{"id":{"type":"string","description":"The target domain id"},"product":{"type":"string","description":"The target product code, available in the /products section"},"price_list":{"type":"string","description":"The target price list code, available in the /products section"}}}},"required":["domains"]}}}},"responses":{"200":{"description":"Subscription product change acknowledgement","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"changed":{"type":"array","description":"Domains with valid subscription changed","items":{"type":"object","required":["domain_id","changed"],"properties":{"domain_id":{"type":"string"},"changed":{"type":"boolean"}}}},"failed":{"type":"array","description":"Domains that encountered an error","items":{"type":"object","properties":{"domain_id":{"type":"string"},"error":{"$ref":"#/components/schemas/Error"}}}}},"required":["result"]}}}}}}}}}}}
```


# Merchants

The following endpoints allow you to view and manage your merchant records.

## Get merchants

> Retrieves a list of merchants available for your partner account. Merchants can also be filtered based on metadata information, using query string keys \`meta.{key}={value}\`, such as \`?meta.iso\_id=2\`

```json
{"openapi":"3.0.3","info":{"title":"Partner Merchant API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}},"Merchant":{"description":"A merchant object","type":"object","properties":{"id":{"type":"string","description":"The Clym internal ID of the resource"},"merchant_id":{"type":"string","description":"The external merchant ID"},"company_name":{"type":"string","description":"An optional company name attached to this merchant"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"state":{"type":"string","description":"Country state/province/region"},"city":{"type":"string","description":"City"},"address":{"type":"string","description":"Address"},"postal_code":{"type":"string","description":"Postal code"},"iso_id":{"type":"string","description":"An ISO identifier"},"description":{"type":"string","description":"An optional description of the merchant"},"created_at":{"type":"string","format":"date-time"},"registered_at":{"type":"string","format":"date-time"},"partner_id":{"type":"string"},"product":{"type":"object","description":"The default product associated to this merchant","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}},"price_list":{"type":"object","description":"The default price list associated to this merchant","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}}},"addons":{"type":"array","description":"An optional array of add-on products associated with this merchant","items":{"type":"object","properties":{"id":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"product":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"support_url":{"type":"string"}}}}}},"domain":{"type":"object","description":"Once registered, the domain information that has been tied to the merchant entity","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"activated_at":{"type":"string","format":"date-time"},"email":{"type":"string","format":"email"},"source":{"type":"string"}}},"meta":{"type":"object","description":"An optional object containing previously-set metadata for a merchant."}}}}},"paths":{"/portal/merchants":{"get":{"summary":"Get merchants","description":"Retrieves a list of merchants available for your partner account. Merchants can also be filtered based on metadata information, using query string keys `meta.{key}={value}`, such as `?meta.iso_id=2`","parameters":[{"in":"query","name":"id","schema":{"type":"string"},"description":"Retrieve a specific merchant by ID or merchant_id"},{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"description":"Retrieve multiple merchants by their IDs"},{"in":"query","name":"merchant_id","schema":{"type":"string"},"description":"Filter by merchant ID (exact match)"},{"in":"query","name":"search","schema":{"type":"string"},"description":"Search by merchant_id or associated domain hostname"},{"in":"query","name":"is_registered","schema":{"type":"boolean"},"description":"Filter by whether a domain is linked to the merchant"},{"in":"query","name":"created_at_start","schema":{"type":"string","format":"date-time"},"description":"Filter merchants created after this date"},{"in":"query","name":"created_at_end","schema":{"type":"string","format":"date-time"},"description":"Filter merchants created before this date"},{"in":"query","name":"registered_at_start","schema":{"type":"string","format":"date-time"},"description":"Filter merchants registered after this date"},{"in":"query","name":"registered_at_end","schema":{"type":"string","format":"date-time"},"description":"Filter merchants registered before this date"},{"in":"query","name":"activated_at_start","schema":{"type":"string","format":"date-time"},"description":"Filter by domain activation date (after)"},{"in":"query","name":"activated_at_end","schema":{"type":"string","format":"date-time"},"description":"Filter by domain activation date (before)"},{"in":"query","name":"domain_status","schema":{"type":"string","enum":["NEW","SCANNED","INVITED","ACTIVE","INACTIVE"]},"description":"Filter by associated domain status"},{"in":"query","name":"domain_id","schema":{"type":"string"},"description":"Filter by domain ID"},{"in":"query","name":"domain_partner_id","schema":{"type":"string"},"description":"Filter by domain partner ID"},{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Results per page"}],"responses":{"200":{"description":"An array with all partner merchants","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Merchant"}}}}}}}}}}}}
```

## Create merchant

> Create a new merchant in your partner account

```json
{"openapi":"3.0.3","info":{"title":"Partner Merchant API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/merchants":{"post":{"summary":"Create merchant","description":"Create a new merchant in your partner account","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"merchant_id":{"type":"string","maxLength":204,"description":"Your merchant id"},"company_name":{"type":"string","description":"The company name"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"state":{"type":"string","description":"Country state/province/region"},"city":{"type":"string","description":"City"},"address":{"type":"string","description":"Address"},"postal_code":{"type":"string","description":"Postal code"},"description":{"type":"string","description":"An optional description for this merchant"},"iso_id":{"type":"string","description":"Optional ISO identifier"},"product":{"type":"string","description":"The default billing product code for this merchant. This will act as the default product for the domain associated with this merchant"},"price_list":{"type":"string","description":"The default billing price list code for this merchant. This will act as the default price list for the domain associated with this merchant"},"addons":{"type":"array","description":"An array of add-on products to be assigned to this merchant and the future domain associated with this merchant","items":{"type":"object","properties":{"addon":{"type":"string"},"start_date":{"type":"string","format":"date-time"}}}},"meta":{"type":"object","description":"Optional key-value object containing merchant metadata"}},"required":["merchant_id"]}}}},"responses":{"200":{"description":"Merchant added to the partner account","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string"},"merchant_id":{"type":"string"},"company_name":{"type":"string"},"meta":{"type":"object"},"created_at":{"type":"string","format":"date-time"}}}}}}}}}}}}}
```

## Get merchant

> Retrieve information about a single merchant

```json
{"openapi":"3.0.3","info":{"title":"Partner Merchant API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Merchant":{"description":"A merchant object","type":"object","properties":{"id":{"type":"string","description":"The Clym internal ID of the resource"},"merchant_id":{"type":"string","description":"The external merchant ID"},"company_name":{"type":"string","description":"An optional company name attached to this merchant"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"state":{"type":"string","description":"Country state/province/region"},"city":{"type":"string","description":"City"},"address":{"type":"string","description":"Address"},"postal_code":{"type":"string","description":"Postal code"},"iso_id":{"type":"string","description":"An ISO identifier"},"description":{"type":"string","description":"An optional description of the merchant"},"created_at":{"type":"string","format":"date-time"},"registered_at":{"type":"string","format":"date-time"},"partner_id":{"type":"string"},"product":{"type":"object","description":"The default product associated to this merchant","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}},"price_list":{"type":"object","description":"The default price list associated to this merchant","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}}},"addons":{"type":"array","description":"An optional array of add-on products associated with this merchant","items":{"type":"object","properties":{"id":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"product":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"support_url":{"type":"string"}}}}}},"domain":{"type":"object","description":"Once registered, the domain information that has been tied to the merchant entity","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"activated_at":{"type":"string","format":"date-time"},"email":{"type":"string","format":"email"},"source":{"type":"string"}}},"meta":{"type":"object","description":"An optional object containing previously-set metadata for a merchant."}}}}},"paths":{"/portal/merchants/{merchantId}":{"get":{"summary":"Get merchant","description":"Retrieve information about a single merchant","parameters":[{"name":"merchantId","in":"path","description":"Merchant id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The partner domain information","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Merchant"}}}}}}}}}}}
```

## Update merchant

> Update information about a merchant

```json
{"openapi":"3.0.3","info":{"title":"Partner Merchant API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Merchant":{"description":"A merchant object","type":"object","properties":{"id":{"type":"string","description":"The Clym internal ID of the resource"},"merchant_id":{"type":"string","description":"The external merchant ID"},"company_name":{"type":"string","description":"An optional company name attached to this merchant"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"state":{"type":"string","description":"Country state/province/region"},"city":{"type":"string","description":"City"},"address":{"type":"string","description":"Address"},"postal_code":{"type":"string","description":"Postal code"},"iso_id":{"type":"string","description":"An ISO identifier"},"description":{"type":"string","description":"An optional description of the merchant"},"created_at":{"type":"string","format":"date-time"},"registered_at":{"type":"string","format":"date-time"},"partner_id":{"type":"string"},"product":{"type":"object","description":"The default product associated to this merchant","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}},"price_list":{"type":"object","description":"The default price list associated to this merchant","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}}},"addons":{"type":"array","description":"An optional array of add-on products associated with this merchant","items":{"type":"object","properties":{"id":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"product":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"support_url":{"type":"string"}}}}}},"domain":{"type":"object","description":"Once registered, the domain information that has been tied to the merchant entity","properties":{"id":{"type":"string"},"hostname":{"type":"string"},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"activated_at":{"type":"string","format":"date-time"},"email":{"type":"string","format":"email"},"source":{"type":"string"}}},"meta":{"type":"object","description":"An optional object containing previously-set metadata for a merchant."}}}}},"paths":{"/portal/merchants/{merchantId}":{"put":{"summary":"Update merchant","description":"Update information about a merchant","parameters":[{"name":"merchantId","in":"path","description":"Merchant id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"merchant_id":{"type":"string","description":"The new merchant id to use"},"company_name":{"type":"string","description":"The company legal name to use"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"state":{"type":"string","description":"Country state/province/region"},"city":{"type":"string","description":"City"},"address":{"type":"string","description":"Address"},"postal_code":{"type":"string","description":"Postal code"},"description":{"type":"string","description":"Optional merchant description"},"meta":{"type":"object","description":"Optional key-value object containing merchant metadata"},"domain_id":{"type":"string","nullable":true,"description":"The domain id to attach to this merchant. If set to null, it will unassign the domain from the merchant."},"domain_partner_id":{"type":"string","nullable":true,"description":"If set, it will assign the specified domain partner to the merchant"},"iso_id":{"type":"string","nullable":true,"description":"Optional ISO identifier"},"product":{"type":"string","description":"The default billing product code for this merchant. This will act as the default product for the domain associated with this merchant"},"price_list":{"type":"string","description":"The default billing price list code for this merchant. This will act as the default price list for the domain associated with this merchant"},"addons":{"type":"array","description":"An array of add-on products to be assigned to this merchant and the future domain associated with this merchant","items":{"type":"object","properties":{"addon":{"type":"string"},"start_date":{"type":"string","format":"date-time"}}}}}}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Merchant"}}}}}}}}}}}
```

## Delete merchant

> Completely delete the merchant and associated domain (if any) from your partner account

```json
{"openapi":"3.0.3","info":{"title":"Partner Merchant API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/merchants/{merchantId}":{"delete":{"summary":"Delete merchant","description":"Completely delete the merchant and associated domain (if any) from your partner account","parameters":[{"name":"merchantId","in":"path","description":"Merchant id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Merchant deletion confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}}}}}}}}}
```

## Bulk create merchants

> Create up to 200 merchants in bulk with a single API call. If product, price list and addons is specified in the root body (outside merchants), they will act as default data for all items in the merchants\[] array

```json
{"openapi":"3.0.3","info":{"title":"Partner Merchant API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Error":{"description":"An error object","type":"object","properties":{"code":{"type":"string","description":"An error code"},"ns":{"type":"string","description":"An error namespace"},"message":{"type":"string","description":"Additional error message information"},"status":{"type":"number"},"data":{"type":"object"}}}}},"paths":{"/portal/merchants/bulk/create":{"post":{"summary":"Bulk create merchants","description":"Create up to 200 merchants in bulk with a single API call. If product, price list and addons is specified in the root body (outside merchants), they will act as default data for all items in the merchants[] array","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"merchants":{"type":"array","items":{"anyOf":[{"type":"string","description":"Merchant id"},{"type":"object","properties":{"merchant_id":{"type":"string","description":"Merchant id"},"company_name":{"type":"string","description":"Company name"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"state":{"type":"string","description":"Country state/province/region"},"city":{"type":"string","description":"City"},"address":{"type":"string","description":"Address"},"postal_code":{"type":"string","description":"Postal code"},"iso_id":{"type":"string","description":"An ISO identifier"},"description":{"type":"string","description":"Additional merchant description"},"product":{"type":"string","description":"The default billing product code for this merchant. This will act as the default product for the domain associated with this merchant"},"price_list":{"type":"string","description":"The default billing price list code for this merchant. This will act as the default price list for the domain associated with this merchant"},"addons":{"type":"array","description":"An array of add-on products to be assigned to this merchant and the future domain associated with this merchant","items":{"type":"object","properties":{"addon":{"type":"string"},"start_date":{"type":"string","format":"date-time"}}}},"meta":{"type":"object","description":"Optional key-value object containing merchant metadata"}},"required":["merchant_id"]}]}},"product":{"type":"string","description":"The default billing product code for this merchant. This will act as the default product for the domain associated with this merchant"},"price_list":{"type":"string","description":"The default billing price list code for this merchant. This will act as the default price list for the domain associated with this merchant"},"addons":{"type":"array","description":"An array of add-on products to be assigned to this merchant and the future domain associated with this merchant","items":{"type":"object","properties":{"addon":{"type":"string"},"start_date":{"type":"string","format":"date-time"}}}}},"required":["merchants"]}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"merchant_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}},"failed":{"type":"array","items":{"type":"object","properties":{"merchant_id":{"type":"string"},"error":{"$ref":"#/components/schemas/Error"}}}}}}}}}}}}}}}}
```

## Bulk delete merchants

> Delete up to 200 merchants in bulk with a single API call

```json
{"openapi":"3.0.3","info":{"title":"Partner Merchant API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Error":{"description":"An error object","type":"object","properties":{"code":{"type":"string","description":"An error code"},"ns":{"type":"string","description":"An error namespace"},"message":{"type":"string","description":"Additional error message information"},"status":{"type":"number"},"data":{"type":"object"}}}}},"paths":{"/portal/merchants/bulk/delete":{"post":{"summary":"Bulk delete merchants","description":"Delete up to 200 merchants in bulk with a single API call","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"merchants":{"type":"array","items":{"type":"string","description":"Merchant id"}}},"required":["merchants"]}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"deleted":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"merchant_id":{"type":"string"}}}},"failed":{"type":"array","items":{"type":"object","properties":{"merchant_id":{"type":"string"},"error":{"$ref":"#/components/schemas/Error"}}}}}}}}}}}}}}}}
```


# Products

The following endpoints allow you to view the products and price lists configured for your partner account.

## GET /portal/products

> Get products

```json
{"openapi":"3.0.3","info":{"title":"Partner Products API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Product":{"description":"A product object","type":"object","properties":{"id":{"type":"string","description":"The product id"},"type":{"type":"string","enum":["SUBSCRIPTION","ONE_OFF"],"description":"The product type"},"code":{"type":"string","description":"The product code"},"name":{"type":"string","description":"The product name"},"prices":{"type":"array","description":"A list of product prices available","items":{"type":"object","properties":{"id":{"type":"number","description":"The product price id"},"frequency":{"type":"string","description":"The price frequency","enum":["MONTH","YEAR"]},"price_list":{"type":"object","description":"The price list","properties":{"id":{"type":"number","description":"The price list id"},"code":{"type":"string","description":"The price list code"}}}}}},"children":{"type":"array","description":"Optional available add-on products","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"support_url":{"type":"string"}}}},"features":{"type":"array","description":"Optional available product features","items":{"type":"object","description":"The feature object","properties":{"code":{"type":"string","description":"The feature code"},"name":{"type":"string","description":"The feature name"},"type":{"type":"string","description":"The feature type","enum":["BOOLEAN","MAX_VALUE"]},"value":{"oneOf":[{"type":"number"},{"type":"string"}]}}}}}}}},"paths":{"/portal/products":{"get":{"summary":"Get products","responses":{"200":{"description":"An array with all available partner products","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}}}}}}}
```

## Get product

> Retrieve information about a single product

```json
{"openapi":"3.0.3","info":{"title":"Partner Products API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Product":{"description":"A product object","type":"object","properties":{"id":{"type":"string","description":"The product id"},"type":{"type":"string","enum":["SUBSCRIPTION","ONE_OFF"],"description":"The product type"},"code":{"type":"string","description":"The product code"},"name":{"type":"string","description":"The product name"},"prices":{"type":"array","description":"A list of product prices available","items":{"type":"object","properties":{"id":{"type":"number","description":"The product price id"},"frequency":{"type":"string","description":"The price frequency","enum":["MONTH","YEAR"]},"price_list":{"type":"object","description":"The price list","properties":{"id":{"type":"number","description":"The price list id"},"code":{"type":"string","description":"The price list code"}}}}}},"children":{"type":"array","description":"Optional available add-on products","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"},"support_url":{"type":"string"}}}},"features":{"type":"array","description":"Optional available product features","items":{"type":"object","description":"The feature object","properties":{"code":{"type":"string","description":"The feature code"},"name":{"type":"string","description":"The feature name"},"type":{"type":"string","description":"The feature type","enum":["BOOLEAN","MAX_VALUE"]},"value":{"oneOf":[{"type":"number"},{"type":"string"}]}}}}}}}},"paths":{"/portal/products/{productId}":{"get":{"summary":"Get product","description":"Retrieve information about a single product","parameters":[{"name":"productId","in":"path","description":"Product id or code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The partner product information","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Product"}}}}}}}}}}}
```


# Instance

The following API endpoints allow you to directly interact with your dedicated instance and manage company information, end-user access, receipt records and property/widget configuration.

{% hint style="info" %}
This section is only available for partners with dedicated instances.
{% endhint %}


# Access

The following endpoints allow you to view and manage end-user access to the specified merchant/domain as well as instantly provision credentials for end-users to access our portal.

## Get access

> Retrieves all users that have access to the merchant's company

```json
{"openapi":"3.0.3","info":{"title":"Instance Access Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}},"UserAccess":{"description":"An instance company-level user access","type":"object","properties":{"id":{"type":"string","description":"The user id"},"email":{"type":"string","description":"The user email address","format":"email"},"first_name":{"type":"string","description":"The user first name, optional"},"last_name":{"type":"string","description":"The user last name, optional"},"role":{"description":"The user's role in the company.","type":"string","enum":["OWNER","ADMIN"]},"is_active":{"type":"boolean","description":"Access is active or not"},"created_by":{"type":"object","description":"The user that granted access to this user, optional.","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}},"paths":{"/portal/instance/access/users":{"get":{"summary":"Get access","description":"Retrieves all users that have access to the merchant's company","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"An array with all users","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"$ref":"#/components/schemas/UserAccess"}}}}}}}}}}}}
```

## Grant access

> Grant company access to the specified user with the specified role. The system will send an invitation email to the newly created user.

```json
{"openapi":"3.0.3","info":{"title":"Instance Access Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"UserAccess":{"description":"An instance company-level user access","type":"object","properties":{"id":{"type":"string","description":"The user id"},"email":{"type":"string","description":"The user email address","format":"email"},"first_name":{"type":"string","description":"The user first name, optional"},"last_name":{"type":"string","description":"The user last name, optional"},"role":{"description":"The user's role in the company.","type":"string","enum":["OWNER","ADMIN"]},"is_active":{"type":"boolean","description":"Access is active or not"},"created_by":{"type":"object","description":"The user that granted access to this user, optional.","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}},"paths":{"/portal/instance/access/users":{"post":{"summary":"Grant access","description":"Grant company access to the specified user with the specified role. The system will send an invitation email to the newly created user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The target email address"},"role":{"type":"string","enum":["OWNER","ADMIN"],"description":"The role the user will be granted in the company."}},"required":["email","role"]}}}},"responses":{"200":{"description":"Merchant added to the partner account","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/UserAccess"}}}}}}}}}}}
```

## Provision access

> Instantly provision the specified user and role in the company and return a magic link. This performs just-in-time user access creation or access updating.

```json
{"openapi":"3.0.3","info":{"title":"Instance Access Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/access/users/provision":{"post":{"summary":"Provision access","description":"Instantly provision the specified user and role in the company and return a magic link. This performs just-in-time user access creation or access updating.","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email account of the user you want to provision"},"role":{"description":"The role to assign to the specified user","type":"string","enum":["OWNER","ADMIN"]},"access_switch":{"type":"boolean","default":true,"description":"Set this field to false to disable switching between companies for the target user."}},"required":["email","role"]}}}},"responses":{"200":{"description":"The user access information and authentication information","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"id":{"type":"string","description":"The provisioned account id"},"email":{"type":"string","format":"email","description":"The provisioned account email"},"role":{"type":"string","description":"The provisioned account role","enum":["OWNER","ADMIN"]},"is_active":{"type":"boolean"},"login_url":{"type":"string","format":"uri","description":"The magic link that can be returned to the user in order for them to authenticate to their account."}}}}}}}}}}}}}
```

## Get access

> Retrieve information about a user's access

```json
{"openapi":"3.0.3","info":{"title":"Instance Access Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"UserAccess":{"description":"An instance company-level user access","type":"object","properties":{"id":{"type":"string","description":"The user id"},"email":{"type":"string","description":"The user email address","format":"email"},"first_name":{"type":"string","description":"The user first name, optional"},"last_name":{"type":"string","description":"The user last name, optional"},"role":{"description":"The user's role in the company.","type":"string","enum":["OWNER","ADMIN"]},"is_active":{"type":"boolean","description":"Access is active or not"},"created_by":{"type":"object","description":"The user that granted access to this user, optional.","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}},"paths":{"/portal/instance/access/users/{userId}":{"get":{"summary":"Get access","description":"Retrieve information about a user's access","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"name":"userId","in":"path","description":"User id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The user access information","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/UserAccess"}}}}}}}}}}}
```

## Update access

> Update access information for the specified user

```json
{"openapi":"3.0.3","info":{"title":"Instance Access Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/access/users/{userId}":{"put":{"summary":"Update access","description":"Update access information for the specified user","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"name":"userId","in":"path","description":"User id","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"description":"The new role to assign to the user","type":"string","enum":["OWNER","ADMIN"]},"is_active":{"type":"boolean","description":"Enables or disables the user's access in the company."}}}}}},"responses":{"200":{"description":"Acknowledgement that request was successful.","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Delete access

> Removes the specified user's access in the company.

```json
{"openapi":"3.0.3","info":{"title":"Instance Access Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/access/users/{userId}":{"delete":{"summary":"Delete access","description":"Removes the specified user's access in the company.","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"name":"userId","in":"path","description":"User id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User access deletion confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```


# Data

The following endpoints allow you to view system data used in configuring company and property settings.

## Get countries

> Retrieves a list of available countries and their states

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}}}},"paths":{"/portal/instance/company/countries":{"get":{"summary":"Get countries","description":"Retrieves a list of available countries and their states","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result with an array of countries and optional states","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":2,"maxLength":2,"description":"The ISO-3166 alpha-2 country code"},"name":{"type":"string","description":"The country name"},"continent_id":{"type":"string","description":"The 2-letter continent code"},"states":{"type":"array","description":"An optional array of country states, regions or areas","items":{"type":"object","properties":{"id":{"type":"string","description":"The 2-letter state code"},"name":{"type":"string","description":"The state name"}}}}}}}}}}}}}}}}}
```

## Get sectors

> Retrieves a list of available system sectors

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}}}},"paths":{"/portal/instance/company/sectors":{"get":{"summary":"Get sectors","description":"Retrieves a list of available system sectors","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result with an array of sectors","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The sector ID"},"name":{"type":"string","description":"The sector name"},"description":{"type":"string","description":"The sector description"}}}}}}}}}}}}}}
```

## Get industries

> Retrieves a list of available system industries

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}}}},"paths":{"/portal/instance/company/industries":{"get":{"summary":"Get industries","description":"Retrieves a list of available system industries","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result with an array of industries","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The industry ID"},"name":{"type":"string","description":"The industry name"},"description":{"type":"string","description":"The industry description"}}}}}}}}}}}}}}
```

## Get criteria groups

> Retrieves a list of available system criteria groups

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}}}},"paths":{"/portal/instance/company/criteria-groups":{"get":{"summary":"Get criteria groups","description":"Retrieves a list of available system criteria groups","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result with an array of criterias","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The criteria group id"},"name":{"type":"string","description":"The criteria group name"},"description":{"type":"string","description":"The criteria description"},"applied_to":{"description":"The target entity applied by this criteria group.","type":"string","enum":["USER","COMPANY"]},"criterias":{"type":"array","description":"An array of available criteria options","items":{"type":"object","properties":{"id":{"type":"number","description":"The criteria id"},"name":{"type":"string","description":"The criteria name"},"value":{"type":"string","description":"The criteria value"}}}}}}}}}}}}}}}}}
```


# Company

The following endpoints allow you to view and manage the company information attached to the specified merchant/domain.

## Get company

> Retrieves information about the current company

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Company":{"type":"object","description":"The company object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"primary_color":{"type":"string","minLength":7,"maxLength":7},"country_id":{"type":"string","description":"The ISO-3166 Alpha-2 country code for this company"},"state_id":{"type":"string","description":"The state code for the company, if applied"},"industry_id":{"type":"number","description":"The company's industry, if applied"},"sector_id":{"type":"number","description":"The company's sector, if applied"},"criterias":{"description":"The company's custom criterias, if applied","type":"array","items":{"type":"number"}},"vat_number":{"type":"string","description":"The new company VAT number"},"registration_number":{"type":"string","description":"The new company registration number"},"logo_url":{"type":"string","format":"uri","description":"The URL of the company's logo image on dark background"},"logo_light_url":{"type":"string","format":"uri","description":"The URL of the company's logo image on light background"},"default_language":{"type":"object","description":"The company's default language","properties":{"id":{"type":"string","description":"The language id"},"code":{"type":"string","description":"The language code"},"name":{"type":"string","description":"The language name"}}},"contact_information":{"type":"object","description":"The company's contact information","properties":{"email":{"type":"string","description":"The primary contact email address","format":"email"},"phone_number":{"type":"string","description":"The primary contact phone number"},"fax_number":{"type":"string","description":"The primary fax number"}}},"offices":{"description":"An array of offices and addresses for the company","type":"array","items":{"type":"object","properties":{"is_main":{"type":"boolean","description":"Marks the given office as the main office, should be set only once in the array"},"id":{"type":"number","description":"Optional, specified only if we want to update an existing office. If not specified, the system will create a new office"},"name":{"type":"string","description":"A description name of the office"},"address":{"$ref":"#/components/schemas/Address"}}}},"representatives":{"description":"An array of copany representatives","type":"array","items":{"$ref":"#/components/schemas/Representative"}},"bank_accounts":{"type":"array","description":"A list of company bank accounts","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string","description":"The bank account name"},"account_number":{"type":"string","description":"The bank account number"}}}}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}},"Representative":{"type":"object","description":"The data processing officer/representative object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["PERSON","ORGANIZATION"],"description":"The type of DPO configured"},"email":{"type":"string","format":"email","description":"The contact email address of the DPO"},"company_name":{"type":"string","description":"The company name, only for when we have an organization"},"first_name":{"type":"string","description":"The DPO first name"},"last_name":{"type":"string","description":"The DPO last name"},"position":{"type":"string","description":"The official position of the DPO within the company, available for persons and data representatives"},"description":{"type":"string","description":"The DPO short description"},"avatar_url":{"type":"string","format":"uri","description":"The DPO avatar URL, if available"},"category":{"type":"string","description":"The DPO category"},"jurisdiction":{"type":"array","description":"The DPO jurisdiction, available for data representatives","items":{"type":"string"}},"address":{"$ref":"#/components/schemas/Address"},"created_at":{"type":"string","format":"date-time"}}}}},"paths":{"/portal/instance/company":{"get":{"summary":"Get company","description":"Retrieves information about the current company","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"The company information","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/Company"}}}}}}}}}}}
```

## Update company

> Change company information and settings

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"CompanyForm":{"type":"object","properties":{"name":{"type":"string","description":"The new company name"},"email":{"type":"string","format":"email","description":"The new company email"},"lang":{"type":"string","description":"The new default language for the company"},"vat_number":{"type":"string","description":"The new company VAT number"},"registration_number":{"type":"string","description":"The new company registration number"},"primary_color":{"type":"string","description":"The hex-encoded color to be applied for this company"},"country_id":{"type":"string","description":"The ISO-3166 Alpha-2 country code for this company, available via the /company/countries API call"},"state_id":{"type":"string","description":"The state code for the company, if applied, available via the /company/countries API call"},"industry_id":{"type":"number","description":"The company's industry, available via the /company/industries API call"},"sector_id":{"type":"number","description":"The company's sector, available via the /company/sectors API call"},"criterias":{"description":"The company's custom criteria groups, available via the /company/criteria-groups API call","type":"array","items":{"type":"number"}},"logo_url":{"type":"string","description":"A previously-uploaded image id that will act as the company's logo image on dark background"},"logo_light_url":{"type":"string","description":"A previously-uploaded image id that will act as the company's logo image on light background"},"offices":{"description":"An array of offices and addresses for the company","type":"array","items":{"type":"object","properties":{"is_main":{"type":"boolean","description":"Marks the given office as the main office, should be set only once in the array"},"id":{"type":"number","description":"Optional, specified only if we want to update an existing office. If not specified, the system will create a new office"},"name":{"type":"string","description":"A description name of the office"},"address":{"$ref":"#/components/schemas/Address"}}}},"bank_accounts":{"type":"array","description":"Specify the list of bank accounts for the company","items":{"type":"object","properties":{"id":{"type":"number","description":"Optional, specified only if we want to update an existing bank account. If not specified, the system will create a new one."},"name":{"type":"string","description":"The bank account name"},"account_number":{"type":"string","description":"The bank account number"}}}},"contact_information":{"type":"object","description":"Specify primary company contact information","properties":{"email":{"type":"string","description":"The primary contact email address","format":"email"},"phone_number":{"type":"string","description":"The primary contact phone number"},"fax_number":{"type":"string","description":"The primary fax number"}}}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}}}},"paths":{"/portal/instance/company":{"put":{"summary":"Update company","description":"Change company information and settings","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyForm"}}}},"responses":{"200":{"description":"Company information updated","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Prepare upload

> This API endpoint is used when you want to upload a logo image to the company. This will generate a signed upload URL you can use.

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/company/sign-asset":{"post":{"summary":"Prepare upload","description":"This API endpoint is used when you want to upload a logo image to the company. This will generate a signed upload URL you can use.","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"The type of asset you want to prepare the upload for","type":"string","enum":["logo_light","logo"]},"mime":{"type":"string","description":"The mime type of the image you want to upload"}},"required":["type","mime"]}}}},"responses":{"200":{"description":"Result with an upload URL you can use","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"The upload URL to be used to upload the image."}}}}}}}}}}}}}
```

## Delete asset

> This API endpoint is used when you want to remove a previously uploaded asset from the company.

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/company/image/{type}":{"delete":{"summary":"Delete asset","description":"This API endpoint is used when you want to remove a previously uploaded asset from the company.","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"in":"path","name":"type","required":true,"schema":{"type":"string","enum":["logo","logo_light"]}}],"responses":{"200":{"description":"Request completed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Create representative

> Create a new company-level representative

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"RepresentativeForm":{"type":"object","description":"The representative form","properties":{"type":{"description":"The type of representative to configure","type":"string","enum":["PERSON","ORGANIZATION"]},"category":{"description":"The representative category","type":"string","enum":["DPO","REPRESENTATIVE","DATA_REPRESENTATIVE"]},"company_name":{"description":"The company name if the representative is an organization","type":"string"},"first_name":{"description":"The person's first name if the representative is a person","type":"string"},"last_name":{"description":"The person's last name if the representative is a person","type":"string"},"position":{"description":"The representative's position within the company","type":"string"},"description":{"description":"A short representative description","type":"string"},"email":{"type":"string","format":"email","description":"The representative's email address"},"jurisdiction":{"type":"array","description":"The representative's jurisdiction in case of a data representative","items":{"type":"string","enum":["UK","EU","CH"]}},"country":{"type":"string","description":"The representative's 2-letter country code"},"state":{"type":"string","description":"The representative's state"},"city":{"type":"string","description":"The representative's city"},"address":{"type":"string","description":"The representative's address"},"address_2":{"type":"string","description":"The representative's address 2"},"postal_code":{"type":"string","description":"The representative's postal code"},"phone_number":{"type":"string","description":"The representative's phone number"},"avatar_url":{"type":"string","description":"A previously signed and uploaded asset id"}}},"Representative":{"type":"object","description":"The data processing officer/representative object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["PERSON","ORGANIZATION"],"description":"The type of DPO configured"},"email":{"type":"string","format":"email","description":"The contact email address of the DPO"},"company_name":{"type":"string","description":"The company name, only for when we have an organization"},"first_name":{"type":"string","description":"The DPO first name"},"last_name":{"type":"string","description":"The DPO last name"},"position":{"type":"string","description":"The official position of the DPO within the company, available for persons and data representatives"},"description":{"type":"string","description":"The DPO short description"},"avatar_url":{"type":"string","format":"uri","description":"The DPO avatar URL, if available"},"category":{"type":"string","description":"The DPO category"},"jurisdiction":{"type":"array","description":"The DPO jurisdiction, available for data representatives","items":{"type":"string"}},"address":{"$ref":"#/components/schemas/Address"},"created_at":{"type":"string","format":"date-time"}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}}}},"paths":{"/portal/instance/company/representatives":{"post":{"summary":"Create representative","description":"Create a new company-level representative","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepresentativeForm","required":["type","category","email"]}}}},"responses":{"200":{"description":"Result with the representative information","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/Representative"}}}}}}}}}}}
```

## Update representative

> Update a previously created company-level representative

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"RepresentativeForm":{"type":"object","description":"The representative form","properties":{"type":{"description":"The type of representative to configure","type":"string","enum":["PERSON","ORGANIZATION"]},"category":{"description":"The representative category","type":"string","enum":["DPO","REPRESENTATIVE","DATA_REPRESENTATIVE"]},"company_name":{"description":"The company name if the representative is an organization","type":"string"},"first_name":{"description":"The person's first name if the representative is a person","type":"string"},"last_name":{"description":"The person's last name if the representative is a person","type":"string"},"position":{"description":"The representative's position within the company","type":"string"},"description":{"description":"A short representative description","type":"string"},"email":{"type":"string","format":"email","description":"The representative's email address"},"jurisdiction":{"type":"array","description":"The representative's jurisdiction in case of a data representative","items":{"type":"string","enum":["UK","EU","CH"]}},"country":{"type":"string","description":"The representative's 2-letter country code"},"state":{"type":"string","description":"The representative's state"},"city":{"type":"string","description":"The representative's city"},"address":{"type":"string","description":"The representative's address"},"address_2":{"type":"string","description":"The representative's address 2"},"postal_code":{"type":"string","description":"The representative's postal code"},"phone_number":{"type":"string","description":"The representative's phone number"},"avatar_url":{"type":"string","description":"A previously signed and uploaded asset id"}}},"Representative":{"type":"object","description":"The data processing officer/representative object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["PERSON","ORGANIZATION"],"description":"The type of DPO configured"},"email":{"type":"string","format":"email","description":"The contact email address of the DPO"},"company_name":{"type":"string","description":"The company name, only for when we have an organization"},"first_name":{"type":"string","description":"The DPO first name"},"last_name":{"type":"string","description":"The DPO last name"},"position":{"type":"string","description":"The official position of the DPO within the company, available for persons and data representatives"},"description":{"type":"string","description":"The DPO short description"},"avatar_url":{"type":"string","format":"uri","description":"The DPO avatar URL, if available"},"category":{"type":"string","description":"The DPO category"},"jurisdiction":{"type":"array","description":"The DPO jurisdiction, available for data representatives","items":{"type":"string"}},"address":{"$ref":"#/components/schemas/Address"},"created_at":{"type":"string","format":"date-time"}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}}}},"paths":{"/portal/instance/company/representatives/{id}":{"put":{"summary":"Update representative","description":"Update a previously created company-level representative","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","description":"The representative id"}},{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepresentativeForm"}}}},"responses":{"200":{"description":"Result with the DPO information","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/Representative"}}}}}}}}}}}
```

## Delete representative

> Deletes a previously created company-level representative

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/company/representatives/{id}":{"delete":{"summary":"Delete representative","description":"Deletes a previously created company-level representative","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","description":"The representative id"}},{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result with the DPO information","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}}}}}}}}}
```

## Prepare upload

> This API endpoint is used when you want to upload a profile image to the representative. This will generate a signed upload URL you can use.

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/company/representatives/sign-asset":{"post":{"summary":"Prepare upload","description":"This API endpoint is used when you want to upload a profile image to the representative. This will generate a signed upload URL you can use.","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mime"],"properties":{"mime":{"type":"string","description":"The mime type of the image you want to upload"}}}}}},"responses":{"200":{"description":"Result with an upload URL you can use","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"The upload URL to be used to upload the image."}}}}}}}}}}}}}
```


# Records

The following endpoints allow you to view consent records for the specified merchant/domain company or property.

## Get records

> Retrieve a list of consent records generated by properties within this company

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}},"Record":{"description":"A consent record object","type":"object","properties":{"receipt_id":{"type":"string"},"receipt_type":{"type":"string","enum":["COOKIE_CONSENT","AGE_CONFIRMATION","WIRETAPPING","VPPA"]},"receipt_status":{"type":"string","enum":["ALLOWED","DENIED","PARTIAL"]},"country":{"type":"string"},"region":{"type":"string"},"jurisdiction":{"type":"string"},"meta":{"type":"object"},"data_collection":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"string"}},"consent_type":{"type":"string"},"name":{"type":"string"}}}},"partners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"usage":{"type":"string"},"url":{"type":"string"}}}},"processors":{"type":"array","items":{"type":"object"}},"purposes":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"is_primary":{"type":"boolean"},"is_profiling":{"type":"boolean"},"legal_base":{"type":"string"},"legal_description":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"termination":{"type":"string"}}}}}}},"data_controller":{"type":"object","properties":{"name":{"type":"string"},"logo":{"type":"string","format":"uri"},"phone_number":{"type":"string"},"url":{"type":"string"},"email":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"}}},"signature":{"type":"string"},"subject":{"type":"string"},"subject_auth":{"type":"string"},"subject_data":{"type":"object"},"property_id":{"type":"string","description":"The property that created this record"},"created_at":{"type":"string","format":"date-time","description":"The creation date of this record"}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}}}},"paths":{"/portal/instance/company/records":{"get":{"summary":"Get records","description":"Retrieve a list of consent records generated by properties within this company","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"in":"query","name":"property_id","schema":{"type":"string","description":"Filter results by the given property id"}},{"in":"query","name":"receipt_type","schema":{"type":"string","enum":["COOKIE_CONSENT","AGE_CONFIRMATION","WIRETAPPING","VPPA"],"description":"Filter results by the given receipt type"}},{"in":"query","name":"receipt_status","schema":{"type":"string","enum":["ALLOWED","DENIED","PARTIAL"],"description":"Filter results based on the receipt status"}}],"responses":{"200":{"description":"Result with an array of records","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Record"}}}}}}}}}}}}
```

## Get record

> Retrieve the information of a receipt record

```json
{"openapi":"3.0.3","info":{"title":"Instance Company Partner API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Record":{"description":"A consent record object","type":"object","properties":{"receipt_id":{"type":"string"},"receipt_type":{"type":"string","enum":["COOKIE_CONSENT","AGE_CONFIRMATION","WIRETAPPING","VPPA"]},"receipt_status":{"type":"string","enum":["ALLOWED","DENIED","PARTIAL"]},"country":{"type":"string"},"region":{"type":"string"},"jurisdiction":{"type":"string"},"meta":{"type":"object"},"data_collection":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"string"}},"consent_type":{"type":"string"},"name":{"type":"string"}}}},"partners":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"usage":{"type":"string"},"url":{"type":"string"}}}},"processors":{"type":"array","items":{"type":"object"}},"purposes":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"is_primary":{"type":"boolean"},"is_profiling":{"type":"boolean"},"legal_base":{"type":"string"},"legal_description":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"termination":{"type":"string"}}}}}}},"data_controller":{"type":"object","properties":{"name":{"type":"string"},"logo":{"type":"string","format":"uri"},"phone_number":{"type":"string"},"url":{"type":"string"},"email":{"type":"string"},"address":{"$ref":"#/components/schemas/Address"}}},"signature":{"type":"string"},"subject":{"type":"string"},"subject_auth":{"type":"string"},"subject_data":{"type":"object"},"property_id":{"type":"string","description":"The property that created this record"},"created_at":{"type":"string","format":"date-time","description":"The creation date of this record"}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}}}},"paths":{"/portal/instance/company/records/{id}":{"get":{"summary":"Get record","description":"Retrieve the information of a receipt record","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string","description":"The consent record id"}}],"responses":{"200":{"description":"Result record information","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/Record"}}}}}}}}}}}
```


# Property

The following endpoints allow you to view and manage the specified merchant/domain's property configuration and widget settings.

## Get property

> Retrieve the property information and configuration

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Property":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The property name"},"border_radius":{"type":"string","description":"The border radius applied on UI elements in the widget and governance portal","enum":["ROUND","ROUNDED","SHARP"]},"text_color":{"type":"string","description":"The text color to apply on UI elements","enum":["AUTO","LIGHT","DARK"]},"widget_position":{"type":"string","description":"The side of the page the widget will position itself","enum":["LEFT","RIGHT"]},"widget_font":{"type":"string","description":"The custom font that will be applied to the widget"},"primary_color":{"type":"string","description":"The primary color of the widget and governance portal"},"default_notice_type":{"type":"string","description":"The default notice type used by the widget","enum":["CLASSIC","DISCRETE","FOOTER","TOP","TCF","NOT_SPECIFIED"]},"has_scripts":{"type":"boolean","description":"If set to false, the widget will not handle any kind of consent/cookie management and will not block any scripts"},"has_dsar":{"type":"boolean","description":"If set to false, the widget and governance portal will not handle any kind of data subject requests."},"has_docs":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any legal documents"},"has_accessibility":{"type":"boolean","description":"If set to false, the widget will not provide any accessibility functionality"},"display_dpo":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any representative information"},"display_company":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any company information"},"has_continuous_scanning":{"type":"boolean","description":"Specifies if the widget has continuous scanning enabled"},"has_welcome_message":{"type":"boolean","description":"Specifies if we display the welcome message in the widget"},"has_accessibility_icon":{"type":"boolean","description":"The widget will use the accessibility icon for jurisdictions that do not require cookie consent"},"accessibility_phone":{"type":"boolean","description":"The accessibility phone number configured for the accessibility widget"},"widget_icon":{"type":"string","description":"The default widget opening icon"},"logo_url":{"type":"string","format":"uri","description":"The property logo on dark background"},"logo_light_url":{"type":"string","format":"uri","description":"The property logo on light background"},"description":{"type":"string","description":"The widget's welcome message displayed"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/PropertyDomain"}},"representatives":{"type":"array","items":{"$ref":"#/components/schemas/Representative"}},"default_language":{"type":"object","description":"The default language of the widget","properties":{"id":{"type":"string","description":"The language id"},"code":{"type":"string","description":"The language code"},"name":{"type":"string","description":"The language name"}}},"features":{"type":"object","description":"Object containing enabled features and functionality for this property"}}},"PropertyDomain":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_primary":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Representative":{"type":"object","description":"The data processing officer/representative object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["PERSON","DATA_REPRESENTATIVE","ORGANIZATION"],"description":"The type of DPO configured"},"email":{"type":"string","format":"email","description":"The contact email address of the DPO"},"company_name":{"type":"string","description":"The company name, only for when we have an organization"},"first_name":{"type":"string","description":"The DPO first name"},"last_name":{"type":"string","description":"The DPO last name"},"position":{"type":"string","description":"The official position of the DPO within the company, available for persons and data representatives"},"description":{"type":"string","description":"The DPO short description"},"avatar_url":{"type":"string","format":"uri","description":"The DPO avatar URL, if available"},"category":{"type":"string","description":"The DPO category"},"jurisdiction":{"type":"array","description":"The DPO jurisdiction, available for data representatives","items":{"type":"string"}},"address":{"$ref":"#/components/schemas/Address"},"created_at":{"type":"string","format":"date-time"}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}}}},"paths":{"/portal/instance/property":{"get":{"summary":"Get property","description":"Retrieve the property information and configuration","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result with an array of records","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/Property"}}}}}}}}}}}
```

## Update property

> Change property information and configuration

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"PropertyForm":{"type":"object","properties":{"border_radius":{"type":"string","description":"The new border radius applied on UI elements in the widget and governance portal","enum":["ROUND","ROUNDED","SHARP"]},"text_color":{"type":"string","description":"The new text color to apply on UI elements","enum":["AUTO","LIGHT","DARK"]},"widget_position":{"type":"string","description":"The new side of the page the widget will position itself","enum":["LEFT","RIGHT"]},"widget_font":{"type":"string","description":"Specify the custom font that will be applied to the widget"},"primary_color":{"type":"string","description":"The new primary color of the widget and governance portal"},"default_notice_type":{"type":"string","description":"The new default notice type to be used by the widget","enum":["CLASSIC","DISCRETE","FOOTER","TOP","TCF","NOT_SPECIFIED"]},"has_scripts":{"type":"boolean","description":"If set to false, the widget will not handle any kind of consent/cookie management and will not block any scripts"},"has_dsar":{"type":"boolean","description":"If set to false, the widget and governance portal will not handle any kind of data subject requests."},"has_docs":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any legal documents"},"has_accessibility":{"type":"boolean","description":"If set to false, the widget will not provide any accessibility functionality"},"display_dpo":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any representative information"},"display_company":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any company information"},"has_continuous_scanning":{"type":"boolean","description":"Specifies if the widget has continuous scanning enabled"},"has_welcome_message":{"type":"boolean","description":"Specifies if the welcome message should be displayed in the widget"},"has_accessibility_icon":{"type":"boolean","description":"The widget will use the accessibility icon for jurisdictions that do not require cookie consent"},"accessibility_phone":{"type":"boolean","description":"The accessibility phone number configured for the accessibility widget"},"widget_icon":{"type":"string","description":"The default widget opening icon"},"description":{"type":"string","description":"The new welcome message used by the widget"},"lang":{"type":"string","description":"The new default language code of the widget"},"logo_url":{"type":"string","format":"uri","description":"The previously uploaded logo id"},"logo_light_url":{"type":"string","format":"uri","description":"The previously uploaded light logo id"}}},"Property":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The property name"},"border_radius":{"type":"string","description":"The border radius applied on UI elements in the widget and governance portal","enum":["ROUND","ROUNDED","SHARP"]},"text_color":{"type":"string","description":"The text color to apply on UI elements","enum":["AUTO","LIGHT","DARK"]},"widget_position":{"type":"string","description":"The side of the page the widget will position itself","enum":["LEFT","RIGHT"]},"widget_font":{"type":"string","description":"The custom font that will be applied to the widget"},"primary_color":{"type":"string","description":"The primary color of the widget and governance portal"},"default_notice_type":{"type":"string","description":"The default notice type used by the widget","enum":["CLASSIC","DISCRETE","FOOTER","TOP","TCF","NOT_SPECIFIED"]},"has_scripts":{"type":"boolean","description":"If set to false, the widget will not handle any kind of consent/cookie management and will not block any scripts"},"has_dsar":{"type":"boolean","description":"If set to false, the widget and governance portal will not handle any kind of data subject requests."},"has_docs":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any legal documents"},"has_accessibility":{"type":"boolean","description":"If set to false, the widget will not provide any accessibility functionality"},"display_dpo":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any representative information"},"display_company":{"type":"boolean","description":"If set to false, the widget and governance portal will not display any company information"},"has_continuous_scanning":{"type":"boolean","description":"Specifies if the widget has continuous scanning enabled"},"has_welcome_message":{"type":"boolean","description":"Specifies if we display the welcome message in the widget"},"has_accessibility_icon":{"type":"boolean","description":"The widget will use the accessibility icon for jurisdictions that do not require cookie consent"},"accessibility_phone":{"type":"boolean","description":"The accessibility phone number configured for the accessibility widget"},"widget_icon":{"type":"string","description":"The default widget opening icon"},"logo_url":{"type":"string","format":"uri","description":"The property logo on dark background"},"logo_light_url":{"type":"string","format":"uri","description":"The property logo on light background"},"description":{"type":"string","description":"The widget's welcome message displayed"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/PropertyDomain"}},"representatives":{"type":"array","items":{"$ref":"#/components/schemas/Representative"}},"default_language":{"type":"object","description":"The default language of the widget","properties":{"id":{"type":"string","description":"The language id"},"code":{"type":"string","description":"The language code"},"name":{"type":"string","description":"The language name"}}},"features":{"type":"object","description":"Object containing enabled features and functionality for this property"}}},"PropertyDomain":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_primary":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"Representative":{"type":"object","description":"The data processing officer/representative object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["PERSON","DATA_REPRESENTATIVE","ORGANIZATION"],"description":"The type of DPO configured"},"email":{"type":"string","format":"email","description":"The contact email address of the DPO"},"company_name":{"type":"string","description":"The company name, only for when we have an organization"},"first_name":{"type":"string","description":"The DPO first name"},"last_name":{"type":"string","description":"The DPO last name"},"position":{"type":"string","description":"The official position of the DPO within the company, available for persons and data representatives"},"description":{"type":"string","description":"The DPO short description"},"avatar_url":{"type":"string","format":"uri","description":"The DPO avatar URL, if available"},"category":{"type":"string","description":"The DPO category"},"jurisdiction":{"type":"array","description":"The DPO jurisdiction, available for data representatives","items":{"type":"string"}},"address":{"$ref":"#/components/schemas/Address"},"created_at":{"type":"string","format":"date-time"}}},"Address":{"type":"object","description":"The address object","properties":{"id":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"state":{"type":"string"},"address":{"type":"string","maxLength":50},"address_2":{"type":"string","maxLength":50},"postal_code":{"type":"string","maxLength":15},"phone_number":{"type":"string","maxLength":13}}}}},"paths":{"/portal/instance/property":{"put":{"summary":"Update property","description":"Change property information and configuration","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyForm"}}}},"responses":{"200":{"description":"Result with an array of records","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/Property"}}}}}}}}}}}
```

## Send instructions

> This API endpoint is used to send implementation instructions to the specified email address

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/property/send-instructions":{"post":{"summary":"Send instructions","description":"This API endpoint is used to send implementation instructions to the specified email address","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","description":"The email address to send the implementation instructions"},"message":{"type":"string","description":"Additional information to be included in the email"}}}}}},"responses":{"200":{"description":"Request completed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Sign asset

> Prepares a signed URL for a logo, logo\_light or favicon to be uploaded for the property.

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/property/sign-asset":{"post":{"summary":"Sign asset","description":"Prepares a signed URL for a logo, logo_light or favicon to be uploaded for the property.","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"The asset type you want to upload","enum":["logo","logo_light","favicon"]},"mime":{"type":"string","description":"The mime type of the asset you want to upload"}},"required":["type","mime"]}}}},"responses":{"200":{"description":"Result with the added property domain","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The signed upload URL to be used"}}}}}}}}}}}}}
```

## Delete asset

> This API endpoint is used when you want to remove a previously uploaded asset from the property.

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/property/image/{type}":{"delete":{"summary":"Delete asset","description":"This API endpoint is used when you want to remove a previously uploaded asset from the property.","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"in":"path","name":"type","required":true,"schema":{"type":"string","enum":["logo","logo_light","favicon"]}}],"responses":{"200":{"description":"Request completed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object"}}}}}}}}}}}
```

## Get domains

> Retrieve a list of available domains for this property

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"Pagination":{"type":"object","description":"Pagination metadata","properties":{"current_page":{"type":"number"},"next_page":{"type":"number"},"prev_page":{"type":"number"}}},"PropertyDomain":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_primary":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}},"paths":{"/portal/instance/property/domains":{"get":{"summary":"Get domains","description":"Retrieve a list of available domains for this property","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result with an array of property domains","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"meta":{"$ref":"#/components/schemas/Pagination"},"result":{"$ref":"#/components/schemas/PropertyDomain"}}}}}}}}}}}
```

## Create domain

> Create a new domain for this property

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}},"schemas":{"PropertyDomain":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_primary":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}}}},"paths":{"/portal/instance/property/domains":{"post":{"summary":"Create domain","description":"Create a new domain for this property","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","format":"uri","description":"The full domain hostname to be added"}},"required":["name"]}}}},"responses":{"200":{"description":"Result with the added property domain","content":{"application/json":{"schema":{"type":"object","required":["result"],"properties":{"result":{"$ref":"#/components/schemas/PropertyDomain"}}}}}}}}}}}
```

## Delete domain

> Deletes the specified property domain

```json
{"openapi":"3.0.3","info":{"title":"Instance Property API","version":"1.0"},"servers":[{"url":"https://partners.clym.io/api"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key generated in Clym Partner Portal."}}},"paths":{"/portal/instance/property/domains/{id}":{"delete":{"summary":"Delete domain","description":"Deletes the specified property domain","parameters":[{"in":"query","name":"merchant_id","schema":{"type":"string","description":"Either a merchant ID or a domain ID is required"}},{"in":"query","name":"domain_id","schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string","description":"The property domain id"}}],"responses":{"200":{"description":"Request completed successfully","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```


# Webhook Reference

The following webhook events are available and can be used to configure webhooks in your Clym Portal account.


# Merchants

The following webhooks are triggered by merchant changes.

<details>

<summary><mark style="color:green;"><code>merchant.created</code></mark></summary>

This event is triggered when a new merchant was created.

#### Payload

```json
{
  "event": "merchant.created",
  "params": {
    "id": "string",
    "partner_id": "string",
    "merchant_id": "string",
    "company_name": "string", // optional
    "description": "string", // optional
     "meta": {}, // optional
  },
  "entity": {
    "kind": "partnerMerchant",
    "data": {
      "id": "string",
      "merchant_id": "string",
      "company_name": "string", // optional
      "description": "string",
      "meta": {}, // optional
      "domain_partner_id": "string", // optional
      "created_at": "string, date-time"
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>merchant.updated</code></mark></summary>

This event is triggered when the merchant information has been updated.

#### Payload

```json
{
  "event": "merchant.updated",
  "params": {
    "id": "string",
    "partner_id": "string",
    "merchant_id": "string",
    "company_name": "string", // optional
    "description": "string", // optional
    "meta": {} // optional
  },
  "entity": {
    "kind": "partnerMerchant",
    "data": {
      "id": "string",
      "merchant_id": "string",
      "company_name": "string", // optional
      "description": "string",
      "meta": {}, // optional
      "domain_partner_id": "string", // optional
      "created_at": "string, date-time"
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>merchant.deleted</code></mark></summary>

This event is triggered when a merchant was deleted.

#### Payload

```json
{
  "event": "merchant.deleted",
  "params": {
    "id": "string",
    "merchant_id": "string",
    "domain_partner_id": "string" // optional
  },
  "entity": {
    "kind": "partnerMerchant",
    "data": {
      "id": "string",
      "merchant_id": "string",
      "company_name": "string", // optional
      "description": "string",
      "meta": {}, // optional
      "domain_partner_id": "string", // optional
      "created_at": "string, date-time"
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>merchant.registered</code></mark></summary>

This event is triggered when a domain was registered to a merchant or when a merchant was assigned to a domain.

#### Payload

```json
{
  "event": "merchant.registered",
  "params": {
    "id": "string",
    "merchant_id": "string",
    "domain_partner_id": "string",
    "domain": "string",
    "subscription_id": "string",
    "status": "string"
  },
  "entity": {
    "kind": "partnerMerchant",
    "data": {
      "id": "string",
      "merchant_id": "string",
      "company_name": "string", // optional
      "description": "string",
      "meta": {}, // optional
      "domain_partner_id": "string", // optional
      "created_at": "string, date-time"
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>merchant.bulk.created</code></mark></summary>

This event is triggered when merchants have been created in bulk.

#### Payload

```json
{
  "event": "merchant.bulk.created",
  "params": {
    "merchants": ["string"]
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>merchant.bulk.deleted</code></mark></summary>

This event is triggered when merchants have been deleted in bulk.

#### Payload

```json
{
  "event": "merchant.bulk.deleted",
  "params": {
    "merchants": ["string"]
  }
}
```

</details>


# Domains

The following webhooks are triggered by domain records.

<details>

<summary><mark style="color:green;"><code>domain.created</code></mark></summary>

This event is triggered when a new domain was created in your partner account.

#### Payload

```json
{
  "event": "domain.created",
  "params": {
    "domain_id": "string",
    "domain": "string",
    "action": "string",
    "source": "string",
    "status": "string",
    "country": "string",
    "state": "string",   // optional
    "city": "string", // optional
    "address": "string", // optional
    "postal_code": "string", //optional
    "vat_number": "string", // optional
    "product_id": number,
    "price_list_id": number,
    "has_docs": boolean,
    "has_dsar": boolean,
    "has_scripts": boolean,
    "has_accessibility": boolean,
    "display_dpo": boolean,
    "display_company": boolean,    
    "send_intro": boolean,
    "company_name": "string",
    "company_trade_name": "string", // optional
    "account_email": "string",
    "account_first_name": "string", // optional
    "account_last_name": "string", // optional
    "subscription_id": "string",
    "merchant_id": "string"  // optional
  },
  "entity": {
    "kind": "domain",
    "data": {
      "id": "string",
      "hostname": "string",
      "status": "string",
      "has_scripts": boolean,
      "has_dsar": boolean,
      "has_docs": boolean,
      "has_accessibility": boolean,
      "display_dpo": boolean,
      "display_company": boolean,
      "instance_property_id": "string",
      "instance_company_id": "string",
      "instance": {
        "id": number,
        "name": "string",
        "hostname": "string",
        "region": "string"
      },
      "created_at": "string",
      "updated_at": "string"     
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>domain.deactivated</code></mark></summary>

This event is triggered when a domain was deactivated.

#### Payload

```json
{
  "event": "domain.deactivated",
  "params": {
    "domain": "string",
    "domain_id": "string"
  },
  "entity": {
    "kind": "domain",
    "data": {
      "id": "string",
      "hostname": "string",
      "status": "string",
      "has_scripts": boolean,
      "has_dsara": boolean,
      "has_docs": boolean,
      "has_accessibility": boolean,
      "display_dpo": boolean,
      "display_company": boolean,
      "instance_property_id": "string",
      "instance_company_id": "string",
      "instance": {
        "id": number,
        "name": "string",
        "hostname": "string",
        "region": "string"
      },
      "created_at": "string",
      "updated_at": "string"     
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>domain.deleted</code></mark></summary>

This event is triggered when a domain was permanently deleted from our systems.

#### Payload

```json
{
  "event": "domain.deleted",
  "params": {
    "id": "string",
    "domain": "string",
    "property_id": "string",
    "company_id": "string",
    "subscriptions": ["string"]
  }
}
```

</details>


# Properties

The following webhooks are triggered by instance-level property records.

<details>

<summary><mark style="color:green;"><code>property.updated</code></mark></summary>

This event is triggered when the instance-level property information has changed.

#### Payload

```json
{
  "event": "property.updated",
  "params": {
    "property_id": "string",
     // additional changed properties
  },
  "entity": {
    "kind": "property",
    "data": {
      "id": "string",
      "name": "string",
      "description": "string",
      "status": "string",
      "widget_font": "string",
      "widget_position": "string",
      "border_radius": "string",
      "primary_color": "string",
      "text_color": "string",
      "has_scripts": boolean,
      "has_dsar": boolean,
      "has_docs": boolean,
      "has_accessibility": boolean,
      "has_accessibility_icon": boolean,
      "display_dpo": boolean,
      "display_company": boolean,
      "has_welcome_message": boolean,
      "has_continuous_scanning": boolean,
      "company_id": "string",
      "activated_at": "string",
      "created_at": "string"
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>property.activated</code></mark></summary>

This event is triggered when the Clym script was first loaded to the property and the property was activated.

#### Payload

```json
{
  "event": "property.activated",
  "params": {
    "property_id": "string",
    "domain_name": "string"
  },
  "entity": {
    "kind": "property",
    "data": {
      "id": "string",
      "name": "string",
      "description": "string",
      "status": "string",
      "widget_font": "string",
      "widget_position": "string",
      "border_radius": "string",
      "primary_color": "string",
      "text_color": "string",
      "has_scripts": boolean,
      "has_dsar": boolean,
      "has_docs": boolean,
      "has_accessibility": boolean,
      "has_accessibility_icon": boolean,
      "display_dpo": boolean,
      "display_company": boolean,
      "has_welcome_message": boolean,
      "has_continuous_scanning": boolean,
      "company_id": "string",
      "activated_at": "string",
      "created_at": "string"
    }
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>property.activation.reminder.day2</code></mark></summary>

This event is triggered when an instance property will receive an activation reminder that their website is not active since 2 days ago.

#### Payload

```json
{
  "event": "property.activation.reminder.day2",
  "params": {
    "property_id": "string",
    "email": "string",
    "first_name": "string", // optional
    "website_url": "string",
    "domain_name": "string",
    "widget_embed_code": "string",
    "approval_url": "string"
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>property.activation.reminder.day7</code></mark></summary>

This event is triggered when an instance property will receive an activation reminder that their website is not active since 7 days ago.

#### Payload

```json
{
  "event": "property.activation.reminder.day7",
  "params": {
    "property_id": "string",
    "email": "string",
    "first_name": "string", // optional
    "website_url": "string",
    "domain_name": "string",
    "widget_embed_code": "string",
    "approval_url": "string"
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>property.activation.reminder.day14</code></mark></summary>

This event is triggered when an instance property will receive an activation reminder that their website is not active since 14 days ago.

#### Payload

```json
{
  "event": "property.activation.reminder.day14",
  "params": {
    "property_id": "string",
    "email": "string",
    "first_name": "string", // optional
    "website_url": "string",
    "domain_name": "string",
    "widget_embed_code": "string",
    "approval_url": "string"
  }
}
```

</details>

<details>

<summary><mark style="color:green;"><code>property.activation.reminder.day30</code></mark></summary>

This event is triggered when an instance property will receive an activation reminder that their website is not active since 30 days ago.

#### Payload

```json
{
  "event": "property.activation.reminder.day30",
  "params": {
    "property_id": "string",
    "email": "string",
    "first_name": "string", // optional
    "website_url": "string",
    "domain_name": "string",
    "widget_embed_code": "string",
    "approval_url": "string"
  }
}
```

</details>


