Create an external entity
curl --request POST \
--url https://clarus-api.com/api/external_entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "external_entities",
"attributes": {
"entity_type": "product",
"code": "SHOP-SKU-1",
"description": "Red Widget",
"external_system_reference1": "gid://shopify/Product/123",
"integration_id": 12
}
}
}
'import requests
url = "https://clarus-api.com/api/external_entities"
payload = { "data": {
"type": "external_entities",
"attributes": {
"entity_type": "product",
"code": "SHOP-SKU-1",
"description": "Red Widget",
"external_system_reference1": "gid://shopify/Product/123",
"integration_id": 12
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'external_entities',
attributes: {
entity_type: 'product',
code: 'SHOP-SKU-1',
description: 'Red Widget',
external_system_reference1: 'gid://shopify/Product/123',
integration_id: 12
}
}
})
};
fetch('https://clarus-api.com/api/external_entities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 501,
"entity_type": "product",
"code": "SHOP-SKU-1",
"description": "Red Widget",
"external_system_reference1": "gid://shopify/Product/123",
"external_system_reference2": null,
"external_system_reference3": null,
"integration_id": 12
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}External Entities
Create an external entity
Create an external entity referencing an item in an external system (e.g. a Shopify product or a carrier).
POST
/
api
/
external_entities
Create an external entity
curl --request POST \
--url https://clarus-api.com/api/external_entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "external_entities",
"attributes": {
"entity_type": "product",
"code": "SHOP-SKU-1",
"description": "Red Widget",
"external_system_reference1": "gid://shopify/Product/123",
"integration_id": 12
}
}
}
'import requests
url = "https://clarus-api.com/api/external_entities"
payload = { "data": {
"type": "external_entities",
"attributes": {
"entity_type": "product",
"code": "SHOP-SKU-1",
"description": "Red Widget",
"external_system_reference1": "gid://shopify/Product/123",
"integration_id": 12
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'external_entities',
attributes: {
entity_type: 'product',
code: 'SHOP-SKU-1',
description: 'Red Widget',
external_system_reference1: 'gid://shopify/Product/123',
integration_id: 12
}
}
})
};
fetch('https://clarus-api.com/api/external_entities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 501,
"entity_type": "product",
"code": "SHOP-SKU-1",
"description": "Red Widget",
"external_system_reference1": "gid://shopify/Product/123",
"external_system_reference2": null,
"external_system_reference3": null,
"integration_id": 12
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "external_entities",
"attributes": {
"entity_type": "product",
"code": "SHOP-SKU-1",
"external_system_reference1": "gid://shopify/Product/123",
"integration_id": 12
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
entity_type | Yes | carrier, product, shipping_rate, or warehouse |
code | Yes | Display code (e.g. external SKU) |
external_system_reference1 | Yes | Primary external system identifier |
integration_id | No | Owning integration |
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
Created successfully
Created record
⌘I

