MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Money All money values should be provided in cents.
Example: If an item is $19.99 the API expects 1999.

Pagination

Any endpoints that have pagination will have a pagination object in the following format:

    "pagination": {
        "total": 123,     // total number of results
        "count": 10,      // number of results on the current page
        "perPage": 10,    // number of results requested per page
        "currentPage": 1, // the current page of results
        "totalPages": 13  // total number of pages of results
    }
    

Errors

All endpoints will return errors, along with the relevant response code, in the following formats:

4xx Validation Errors

    {
        "message": "error message",
        "errors": {
            "param": [
                "error with the param"
            ]
        },
        "error": "Error description."
    }
    

409 Conflict

      {
        "error_type": "API_ERROR",
        "error_code": "AUTHENTICATION_ERROR",
        "detail": "No database found for this shop!"
      }
    

500 Internal Error

    {
        "message": "Whoops!"
    }
    

Idempotency

All shop-specific POST, PATCH, and PUT endpoints accept optional idempotency keys. The use of idempotency keys is suggested to avoid the potential double-processing of any endpoints in the case of network retries.

To make a POST/PATCH/PUT request idempotent, supply a unique x-idempotency-key header on your request. Any subsequent network requests with the same idempotency key within a 48-hour timespan will not be reprocessed. Note that idempotency keys must be unique across URLs. i.e. if you submit a Create Product request with an idempotency key and then submit an Add Inventory Level request with the same idempotency key, the Add Inventory Level request will be ignored.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

All endpoints require a token but there are two different types of tokens. The tax, categories, and create an account endpoints require a partner token while all other endpoints require a shop token. A header must be added, as shown below, with your api key which will be provided by CommentSold.

All tokens expire after 24 hours.

Partner Token

Header

    "x-api-key": "the-key-you-received-from-cs"
    

Request

POST https://tokens.cs-api.com/tokenize

    {
        "payload": {
            "audience": "openapi",
            "partner_id": "your-partner-id"
        }
    }
    

Shop Token

Header

    "x-api-key": "the-key-you-received-from-cs"
    

Request

POST https://tokens.cs-api.com/tokenize

    {
        "payload": {
            "audience": "openapi",
            "shop": "the-shop-id",
            "partner_id": "your-partner-id"
        }
    }
    

Account

Creating Commentsold Accounts

requires authentication

Retrieve a CS Admin URL to be used to load an iframe. The URL is only valid for 10 seconds but once the iframe is loaded it can be used until the session ends.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/accounts/loginLink" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page\": \"PRODUCT_LIST\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/accounts/loginLink';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'page' => 'PRODUCT_LIST',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/accounts/loginLink"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": "PRODUCT_LIST"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "url": "{baseAPIUrl}/v1/{shop}/accounts/login/{hash}"
}
 

Disconnect shop

requires authentication

Permanently revokes your api access for the shop (caution).

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/accounts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/accounts';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/accounts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


null
 

Request   

DELETE v1/{shop}/accounts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Update shop address

requires authentication

Updates the address for the shop

Example request:
curl --request PATCH \
    "https://openapi.commentsold.com/v1/ullam/shop" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"shop_name\": \"h\",
    \"company_name\": \"MyShop\",
    \"company_phone\": \"(978)555-5555\",
    \"street_address\": \"132 Fake St.\",
    \"city\": \"Detroit\",
    \"country_code\": \"US\",
    \"state\": \"MI\",
    \"zip\": \"32133-1312\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/shop';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'shop_name' => 'h',
            'company_name' => 'MyShop',
            'company_phone' => '(978)555-5555',
            'street_address' => '132 Fake St.',
            'city' => 'Detroit',
            'country_code' => 'US',
            'state' => 'MI',
            'zip' => '32133-1312',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/shop"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "shop_name": "h",
    "company_name": "MyShop",
    "company_phone": "(978)555-5555",
    "street_address": "132 Fake St.",
    "city": "Detroit",
    "country_code": "US",
    "state": "MI",
    "zip": "32133-1312"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


null
 

Request   

PATCH v1/{shop}/shop

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

shop_name   string  optional  

Name for the shop. Must be between 1 and 255 characters. Example: h

company_name   string  optional  

Must be between 1 and 255 characters. Example: MyShop

company_phone   string  optional  

Must be between 1 and 255 characters. Example: (978)555-5555

street_address   string  optional  

Must not be greater than 255 characters. Example: 132 Fake St.

city   string  optional  

Must not be greater than 255 characters. Example: Detroit

country_code   string  optional  

Must be 2 characters. Example: US

state   string  optional  

Must not be greater than 100 characters. Example: MI

zip   string  optional  

Example: 32133-1312

GET v1/{shop}/shop/shopify-location

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/shop/shopify-location" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/shop/shopify-location';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/shop/shopify-location"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request   

GET v1/{shop}/shop/shopify-location

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

POST v1/{shop}/shop/shopify-location

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/shop/shopify-location" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/shop/shopify-location';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/shop/shopify-location"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST v1/{shop}/shop/shopify-location

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

POST v1/{shop}/shop/shopify-disconnect

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/shop/shopify-disconnect" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/shop/shopify-disconnect';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/shop/shopify-disconnect"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST v1/{shop}/shop/shopify-disconnect

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Create an account.

requires authentication

Partner Token

Create a commentsold account.

The shop creation itself happens asynchronously and you are notified via webhook when it completes.

Webhook Payload
        {
            "topic": "account_created",
            "shop": "ShopName",
            "success": true
        }
        

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/accounts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"shop_id\": \"h\",
    \"shop_name\": \"h\",
    \"company_name\": \"MyShop\",
    \"company_phone\": \"(978)555-5555\",
    \"street_address\": \"132 Fake St.\",
    \"city\": \"Detroit\",
    \"state\": \"MI\",
    \"country_code\": \"US\",
    \"zip\": \"32133-1312\",
    \"first_name\": \"Fred\",
    \"last_name\": \"Ness\",
    \"email\": \"abc@email.com\",
    \"webhook_url\": \"http:\\/\\/kautzer.info\\/qui-ad-quisquam-excepturi-sunt-dolor\",
    \"account_type\": \"shop\",
    \"no_customer_emails\": true
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/accounts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'shop_id' => 'h',
            'shop_name' => 'h',
            'company_name' => 'MyShop',
            'company_phone' => '(978)555-5555',
            'street_address' => '132 Fake St.',
            'city' => 'Detroit',
            'state' => 'MI',
            'country_code' => 'US',
            'zip' => '32133-1312',
            'first_name' => 'Fred',
            'last_name' => 'Ness',
            'email' => 'abc@email.com',
            'webhook_url' => 'http://kautzer.info/qui-ad-quisquam-excepturi-sunt-dolor',
            'account_type' => 'shop',
            'no_customer_emails' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/accounts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "shop_id": "h",
    "shop_name": "h",
    "company_name": "MyShop",
    "company_phone": "(978)555-5555",
    "street_address": "132 Fake St.",
    "city": "Detroit",
    "state": "MI",
    "country_code": "US",
    "zip": "32133-1312",
    "first_name": "Fred",
    "last_name": "Ness",
    "email": "abc@email.com",
    "webhook_url": "http:\/\/kautzer.info\/qui-ad-quisquam-excepturi-sunt-dolor",
    "account_type": "shop",
    "no_customer_emails": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


null
 

Request   

POST v1/accounts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

shop_id   string   

A unique identifier for the shop. Must match the regex /^[0-9a-z]+$/. Must be between 1 and 64 characters. Example: h

shop_name   string   

Name for the shop. Must be between 1 and 255 characters. Example: h

company_name   string   

Must be between 1 and 255 characters. Example: MyShop

company_phone   string   

Must be between 1 and 255 characters. Example: (978)555-5555

street_address   string   

Must not be greater than 255 characters. Example: 132 Fake St.

city   string   

Must not be greater than 255 characters. Example: Detroit

state   string   

Must not be greater than 100 characters. Example: MI

country_code   string   

Must be 2 characters. Example: US

zip   string   

Example: 32133-1312

first_name   string   

Must not be greater than 255 characters. Example: Fred

last_name   string   

Must not be greater than 255 characters. Example: Ness

email   string   

Must be a valid email address. Must not be greater than 100 characters. Example: abc@email.com

webhook_url   string   

Must be a valid URL. Must be between 8 and 255 characters. Example: http://kautzer.info/qui-ad-quisquam-excepturi-sunt-dolor

account_type   string  optional  

Must not be greater than 192 characters. Example: shop

no_customer_emails   boolean  optional  

Example: true

Request Authorize URL

requires authentication

Request a URL to redirect customers to prompt them for OAuth authorization.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/accounts/authorizeUrl" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"scopes\": [
        \"all\"
    ],
    \"redirect_uri\": \"https:\\/\\/example.com\\/oauth\\/callback\",
    \"external_shop_id\": \"my-store\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/accounts/authorizeUrl';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'scopes' => [
                'all',
            ],
            'redirect_uri' => 'https://example.com/oauth/callback',
            'external_shop_id' => 'my-store',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/accounts/authorizeUrl"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "scopes": [
        "all"
    ],
    "redirect_uri": "https:\/\/example.com\/oauth\/callback",
    "external_shop_id": "my-store"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "url": "{baseAPIUrl}/admin/setup/{partnerId}/permissions/authorization?query={hash}"
}
 

Request   

POST v1/accounts/authorizeUrl

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

scopes   string[]   
Must be one of:
  • all
redirect_uri   string   

A URL you control where the user will be redirected after approving or disapproving the request. Must be a valid URL. Must match the regex #^https?://[a-z0-9-_!@#$%^&*()+=|.~?/]+$#i. Example: https://example.com/oauth/callback

external_shop_id   string   

The unique shop identifier in the external service to be connected to CommentSold. Example: my-store

Allocations

Allocations for dropship products.

Start allocations for dropship products

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/dropshipping/allocations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_ids\": [
        28
    ]
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/dropshipping/allocations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'product_ids' => [
                28,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/dropshipping/allocations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_ids": [
        28
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "successfully_allocated_products": [
        1,
        3,
        4
    ],
    "unsuccessfully_allocated_products": [
        2,
        5
    ]
}
 

Request   

POST v1/{shop}/dropshipping/allocations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

product_ids   integer[]   

Must be at least 1.

Restock allocations for dropship products

requires authentication

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/dropshipping/allocations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_ids\": [
        28
    ]
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/dropshipping/allocations';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'product_ids' => [
                28,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/dropshipping/allocations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_ids": [
        28
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "successfully_restocked_products": [
        1,
        3,
        4
    ],
    "unsuccessfully_restocked_products": [
        2,
        5
    ]
}
 

Request   

PUT v1/{shop}/dropshipping/allocations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

product_ids   integer[]   

Must be at least 1.

Catalog

Create, update, delete, and retrieve products and variants

Get paginated products list

requires authentication

Returns a paginated list of products

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/products?page=7&perPage=7&searchTerm=ullam&sort[]=ullam&filters[]=ullam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
            'searchTerm' => 'ullam',
            'sort[0]' => 'ullam',
            'filters[0]' => 'ullam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products"
);

const params = {
    "page": "7",
    "perPage": "7",
    "searchTerm": "ullam",
    "sort[0]": "ullam",
    "filters[0]": "ullam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request   

GET v1/{shop}/catalog/products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

page   integer  optional  

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

searchTerm   string  optional  

String to search for. Example: ullam

sort   string[]  optional  

JSON encoded object ({id: "field_identifier", desc: true}) for sorting. Currently only support single sort.

filters   string[]  optional  

JSON encoded array of object ([{filter: "name", operator: "modifier/operator", value: "value"}]) for filtering.

Attach tags to products

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/products/attach-tags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_ids\": [],
    \"tag_ids\": []
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products/attach-tags';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'product_ids' => [],
            'tag_ids' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products/attach-tags"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_ids": [],
    "tag_ids": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST v1/{shop}/catalog/products/attach-tags

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

product_ids   object   
tag_ids   object   

Detach tags from products

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/products/detach-tags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_ids\": [],
    \"tag_ids\": []
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products/detach-tags';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'product_ids' => [],
            'tag_ids' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products/detach-tags"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_ids": [],
    "tag_ids": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST v1/{shop}/catalog/products/detach-tags

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

product_ids   object   
tag_ids   object   

Favorite product

requires authentication

Mark or unmark the product as a shop favorite

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/catalog/products/1/favorite" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"favorite\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products/1/favorite';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'favorite' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products/1/favorite"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "favorite": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT v1/{shop}/catalog/products/{product_id}/favorite

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

Body Parameters

favorite   boolean   

True to favorite, false to unfavorite. Example: false

CSV Export

requires authentication

Starts an asynchronous job to export products to CSV. Accepts the same filters as GET /catalog/products.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/products/csv-export" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filters\": [
        {
            \"name\": \"favorite\",
            \"operator\": \"=\",
            \"value\": \"yes\"
        },
        {
            \"name\": \"has_video\",
            \"operator\": \"=\",
            \"value\": \"no\"
        }
    ],
    \"email\": \"monserrate.kautzer@example.net\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products/csv-export';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'filters' => [
                [
                    'name' => 'favorite',
                    'operator' => '=',
                    'value' => 'yes',
                ],
                [
                    'name' => 'has_video',
                    'operator' => '=',
                    'value' => 'no',
                ],
            ],
            'email' => 'monserrate.kautzer@example.net',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products/csv-export"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filters": [
        {
            "name": "favorite",
            "operator": "=",
            "value": "yes"
        },
        {
            "name": "has_video",
            "operator": "=",
            "value": "no"
        }
    ],
    "email": "monserrate.kautzer@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST v1/{shop}/catalog/products/csv-export

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

filters   object  optional  

Optional array of JSON encoded filters. .

email   string   

Email address to send the file link to when the export is finished. Must be a valid email address. Example: monserrate.kautzer@example.net

CSV Import

requires authentication

Starts an asynchronous job to import products CSV file.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/products/csv-import" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "duplicate=ignore"\
    --form "margin=8"\
    --form "products=@/tmp/phpIPG8ol" 
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products/csv-import';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'duplicate',
                'contents' => 'ignore'
            ],
            [
                'name' => 'margin',
                'contents' => '8'
            ],
            [
                'name' => 'products',
                'contents' => fopen('/tmp/phpIPG8ol', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products/csv-import"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('duplicate', 'ignore');
body.append('margin', '8');
body.append('products', document.querySelector('input[name="products"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request   

POST v1/{shop}/catalog/products/csv-import

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

products   file   

A CSV file containing the products to be imported. Must be a file. Example: /tmp/phpIPG8ol

duplicate   string   

Text specifying how the duplicate skus should be handled. Example: ignore

Must be one of:
  • error
  • prefix
  • ignore
  • update
margin   number  optional  

Margin (if any) to apply, in percent. Must be at least 0. Must not be greater than 99.9. Example: 8

CSV Import progress

requires authentication

Returns the current progress of CSV Import Job.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/products/csv-import/progress" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products/csv-import/progress';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products/csv-import/progress"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request   

GET v1/{shop}/catalog/products/csv-import/progress

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Delete multiple products

requires authentication

Delete multiple products from the catalog (this has dire consequences)

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/catalog/products/batch" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_ids\": [
        28
    ]
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/products/batch';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'product_ids' => [
                28,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/products/batch"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_ids": [
        28
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


null
 

Request   

DELETE v1/{shop}/catalog/products/batch

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

product_ids   integer[]   

Must be at least 1.

Get product allocations

requires authentication

Returns a paginated collection of allocations (list format).

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/allocations?perPage=7&sortOrder=ullam&brands[]=ullam&status[]=ullam&minAllocationAvailability=7&maxAllocationAvailability=7&minMsrp=7&maxMsrp=7&search=ullam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sortOrder\": \"end_date:asc\",
    \"perPage\": 7,
    \"minAllocationAvailability\": 7,
    \"maxAllocationAvailability\": 7,
    \"minMsrp\": 7,
    \"maxMsrp\": 7,
    \"search\": \"ullam\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/allocations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'perPage' => '7',
            'sortOrder' => 'ullam',
            'brands[0]' => 'ullam',
            'status[0]' => 'ullam',
            'minAllocationAvailability' => '7',
            'maxAllocationAvailability' => '7',
            'minMsrp' => '7',
            'maxMsrp' => '7',
            'search' => 'ullam',
        ],
        'json' => [
            'sortOrder' => 'end_date:asc',
            'perPage' => 7,
            'minAllocationAvailability' => 7,
            'maxAllocationAvailability' => 7,
            'minMsrp' => 7,
            'maxMsrp' => 7,
            'search' => 'ullam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations"
);

const params = {
    "perPage": "7",
    "sortOrder": "ullam",
    "brands[0]": "ullam",
    "status[0]": "ullam",
    "minAllocationAvailability": "7",
    "maxAllocationAvailability": "7",
    "minMsrp": "7",
    "maxMsrp": "7",
    "search": "ullam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sortOrder": "end_date:asc",
    "perPage": 7,
    "minAllocationAvailability": 7,
    "maxAllocationAvailability": 7,
    "minMsrp": 7,
    "maxMsrp": 7,
    "search": "ullam"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


responses/dropshipping/catalog/allocations/index.json
 

Request   

GET v1/{shop}/catalog/allocations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

perPage   integer  optional  

The number of products per page. Example: 7

sortOrder   string  optional  

The field to sort by. Example: ullam

brands   string[]  optional  

A list of brands to filter by.

status   string[]  optional  

A list of statuses to filter by.

minAllocationAvailability   integer  optional  

Minimum allocation availability. Example: 7

maxAllocationAvailability   integer  optional  

Maximum allocation availability. Example: 7

minMsrp   integer  optional  

Minimum Manufacturers Suggested Retail Price (MSRP). Example: 7

maxMsrp   integer  optional  

Maximum Manufacturers Suggested Retail Price (MSRP). Example: 7

search   string  optional  

The product name or SKU for search purposes. Example: ullam

Body Parameters

sortOrder   string  optional  

Example: end_date:asc

Must be one of:
  • end_date:desc
  • end_date:asc
  • product_name:desc
  • product_name:asc
perPage   integer  optional  

Example: 7

brands   object  optional  
status   object  optional  
minAllocationAvailability   integer  optional  

Example: 7

maxAllocationAvailability   integer  optional  

Example: 7

minMsrp   integer  optional  

Example: 7

maxMsrp   integer  optional  

Example: 7

search   string  optional  

Example: ullam

Schedule allocations

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/schedule?allocation_ids[]=7&start_date=ullam&end_date=ullam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"allocation_ids\": [],
    \"start_date\": \"2003-05-26\",
    \"end_date\": \"2054-05-26\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/allocations/schedule';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'allocation_ids[0]' => '7',
            'start_date' => 'ullam',
            'end_date' => 'ullam',
        ],
        'json' => [
            'allocation_ids' => [],
            'start_date' => '2003-05-26',
            'end_date' => '2054-05-26',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/schedule"
);

const params = {
    "allocation_ids[0]": "7",
    "start_date": "ullam",
    "end_date": "ullam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "allocation_ids": [],
    "start_date": "2003-05-26",
    "end_date": "2054-05-26"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"records_affected": 2, "existing_allocation_products": [{"id": 3, "name": "Test Product Name"}
 

Request   

POST v1/{shop}/catalog/allocations/schedule

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

allocation_ids   integer[]   

An array of allocation IDs that should be scheduled.

start_date   date   

The date in the future when you would like the allocation to start. Example: ullam

end_date   date   

The date in the future when you would like the allocation to stop. Example: ullam

Body Parameters

allocation_ids   object   
start_date   string   

Must be a valid date. Must be a date after or equal to today. Must be a date before 2024-06-07 16:54:46. Example: 2003-05-26

end_date   string   

Must be a valid date. Must be a date after tomorrow. Example: 2054-05-26

Stop allocations

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/stop?allocation_ids[]=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"allocation_ids\": []
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/allocations/stop';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'allocation_ids[0]' => '7',
        ],
        'json' => [
            'allocation_ids' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/stop"
);

const params = {
    "allocation_ids[0]": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "allocation_ids": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "records_affected": 2
}
 

Request   

POST v1/{shop}/catalog/allocations/stop

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

allocation_ids   integer[]   

An array of allocation IDs that should be stopped.

Body Parameters

allocation_ids   object   

Extend allocations

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/extend?allocation_ids[]=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"allocation_ids\": []
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/allocations/extend';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'allocation_ids[0]' => '7',
        ],
        'json' => [
            'allocation_ids' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/extend"
);

const params = {
    "allocation_ids[0]": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "allocation_ids": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "records_affected": 2
}
 

Request   

POST v1/{shop}/catalog/allocations/extend

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

allocation_ids   integer[]   

An array of allocation IDs that should be extended.

Body Parameters

allocation_ids   object   

Restock allocations

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/restock?allocation_ids[]=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"allocation_ids\": []
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/allocations/restock';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'allocation_ids[0]' => '7',
        ],
        'json' => [
            'allocation_ids' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/allocations/restock"
);

const params = {
    "allocation_ids[0]": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "allocation_ids": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "records_affected": 2
}
 

Request   

POST v1/{shop}/catalog/allocations/restock

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

allocation_ids   integer[]   

An array of allocation IDs that should be restocked.

Body Parameters

allocation_ids   object   

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/tags/search?searchTerm=ullam&maxResults=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchTerm\": \"ullam\",
    \"maxResults\": 7
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/tags/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'searchTerm' => 'ullam',
            'maxResults' => '7',
        ],
        'json' => [
            'searchTerm' => 'ullam',
            'maxResults' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/tags/search"
);

const params = {
    "searchTerm": "ullam",
    "maxResults": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchTerm": "ullam",
    "maxResults": 7
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Create new tag

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/tags/create" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tag_name\": \"ullam\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/tags/create';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tag_name' => 'ullam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/tags/create"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tag_name": "ullam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST v1/{shop}/catalog/tags/create

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

tag_name   string   

Example: ullam

Get recently used tags (last 10).

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/tags/recently-used" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/tags/recently-used';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/tags/recently-used"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request   

GET v1/{shop}/catalog/tags/recently-used

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Get shop attributes

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/attributes?searchTerm=ullam&maxResults=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchTerm\": \"hhslthlhsnouzpipndpprqsrltys\",
    \"maxResults\": 10
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/attributes';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'searchTerm' => 'ullam',
            'maxResults' => '7',
        ],
        'json' => [
            'searchTerm' => 'hhslthlhsnouzpipndpprqsrltys',
            'maxResults' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/attributes"
);

const params = {
    "searchTerm": "ullam",
    "maxResults": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchTerm": "hhslthlhsnouzpipndpprqsrltys",
    "maxResults": 10
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Returns an array of attribute strings):


[
    "color",
    "size",
    "material"
]
 

Request   

GET v1/{shop}/catalog/attributes

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

searchTerm   string  optional  

String to search for. Example: ullam

maxResults   integer  optional  

Maximum number of results to return. Default is 10 Example: 7

Body Parameters

searchTerm   string  optional  

Must be at least 1 character. Example: hhslthlhsnouzpipndpprqsrltys

maxResults   integer  optional  

Must be at least 1. Must not be greater than 1000. Example: 10

Get shop attribute values by attribute name

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/attributes/ullam/values?searchTerm=ullam&maxResults=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchTerm\": \"hhslthlhsnouzpipndpprqsrltys\",
    \"maxResults\": 10
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/attributes/ullam/values';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'searchTerm' => 'ullam',
            'maxResults' => '7',
        ],
        'json' => [
            'searchTerm' => 'hhslthlhsnouzpipndpprqsrltys',
            'maxResults' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/attributes/ullam/values"
);

const params = {
    "searchTerm": "ullam",
    "maxResults": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchTerm": "hhslthlhsnouzpipndpprqsrltys",
    "maxResults": 10
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Returns an array of attribute value strings for the specified attribute):


[
    "red",
    "green",
    "blue"
]
 

Request   

GET v1/{shop}/catalog/attributes/{attribute}/values

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

attribute   string   

The attribute. Example: ullam

Query Parameters

searchTerm   string  optional  

String to search for. Example: ullam

maxResults   integer  optional  

Maximum number of results to return. Default is 10 Example: 7

Body Parameters

searchTerm   string  optional  

Must be at least 1 character. Example: hhslthlhsnouzpipndpprqsrltys

maxResults   integer  optional  

Must be at least 1. Must not be greater than 1000. Example: 10

Get brands

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/brands?searchTerm=ullam&maxResults=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchTerm\": \"hhslthlhsnouzpipndpprqsrltys\",
    \"maxResults\": 10
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/brands';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'searchTerm' => 'ullam',
            'maxResults' => '7',
        ],
        'json' => [
            'searchTerm' => 'hhslthlhsnouzpipndpprqsrltys',
            'maxResults' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/brands"
);

const params = {
    "searchTerm": "ullam",
    "maxResults": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchTerm": "hhslthlhsnouzpipndpprqsrltys",
    "maxResults": 10
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Returns an array of brand strings):


[
    "brand1",
    "brand2"
]
 

Request   

GET v1/{shop}/catalog/brands

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

searchTerm   string  optional  

String to search for. Example: ullam

maxResults   integer  optional  

Maximum number of results to return. Default is 10 Example: 7

Body Parameters

searchTerm   string  optional  

Must be at least 1 character. Example: hhslthlhsnouzpipndpprqsrltys

maxResults   integer  optional  

Must be at least 1. Must not be greater than 1000. Example: 10

Get brand styles

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/brand_styles?searchTerm=ullam&maxResults=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchTerm\": \"hhslthlhsnouzpipndpprqsrltys\",
    \"maxResults\": 10
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/brand_styles';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'searchTerm' => 'ullam',
            'maxResults' => '7',
        ],
        'json' => [
            'searchTerm' => 'hhslthlhsnouzpipndpprqsrltys',
            'maxResults' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/brand_styles"
);

const params = {
    "searchTerm": "ullam",
    "maxResults": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchTerm": "hhslthlhsnouzpipndpprqsrltys",
    "maxResults": 10
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Returns an array of brand style strings):


[
    "style1",
    "style2"
]
 

Request   

GET v1/{shop}/catalog/brand_styles

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

searchTerm   string  optional  

String to search for. Example: ullam

maxResults   integer  optional  

Maximum number of results to return. Default is 10 Example: 7

Body Parameters

searchTerm   string  optional  

Must be at least 1 character. Example: hhslthlhsnouzpipndpprqsrltys

maxResults   integer  optional  

Must be at least 1. Must not be greater than 1000. Example: 10

Get collections

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/collections?searchTerm=ullam&maxResults=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchTerm\": \"hhslthlhsnouzpipndpprqsrltys\",
    \"maxResults\": 10
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/collections';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'searchTerm' => 'ullam',
            'maxResults' => '7',
        ],
        'json' => [
            'searchTerm' => 'hhslthlhsnouzpipndpprqsrltys',
            'maxResults' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/collections"
);

const params = {
    "searchTerm": "ullam",
    "maxResults": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchTerm": "hhslthlhsnouzpipndpprqsrltys",
    "maxResults": 10
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

GET v1/{shop}/catalog/collections

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

searchTerm   string  optional  

String to search for. Example: ullam

maxResults   integer  optional  

Maximum number of results to return. Default is 10 Example: 7

Body Parameters

searchTerm   string  optional  

Must be at least 1 character. Example: hhslthlhsnouzpipndpprqsrltys

maxResults   integer  optional  

Must be at least 1. Must not be greater than 1000. Example: 10

Get warehouse locations

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/locations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/locations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/locations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 3,
            "name": null,
            "street_address": "863 Anjali Mountain Apt. 531",
            "state": "WI",
            "zip": null,
            "is_default": null,
            "local_pickup_enabled": null
        },
        {
            "id": 4,
            "name": null,
            "street_address": "4274 Fritz Plaza Apt. 234",
            "state": "MT",
            "zip": null,
            "is_default": null,
            "local_pickup_enabled": null
        }
    ]
}
 

Request   

GET v1/{shop}/catalog/locations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Response

Response Fields

id   integer   

Unique identifier of the warehouse.

name   string   

Name of the warehouse.

street_address   integer   

Warehouse street address.

state   string   

Warehouse address state.

zip   string   

Warehouse address zip code.

is_default   boolean   

Whether the warehouse is the shop default location.

local_pickup_enabled   boolean   

Whether the location allows local pickup.

List of gift with purchase offers

requires authentication

List of all gift with purchase offers

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request   

GET v1/{shop}/catalog/gwp-offers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Add gift with purchase offer

requires authentication

Add a new gift with purchase offer

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"gift_title\": \"hhslthlh\",
    \"cart_subtotal\": 65,
    \"product_id\": 7,
    \"description\": \"Veniam porro molestiae assumenda nemo qui.\",
    \"is_enabled\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'gift_title' => 'hhslthlh',
            'cart_subtotal' => 65,
            'product_id' => 7,
            'description' => 'Veniam porro molestiae assumenda nemo qui.',
            'is_enabled' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "gift_title": "hhslthlh",
    "cart_subtotal": 65,
    "product_id": 7,
    "description": "Veniam porro molestiae assumenda nemo qui.",
    "is_enabled": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST v1/{shop}/catalog/gwp-offers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

gift_title   string  optional  

Must not be greater than 255 characters. Example: hhslthlh

cart_subtotal   number   

Must be at least 0.01. Example: 65

product_id   integer  optional  

Example: 7

description   string  optional  

Example: Veniam porro molestiae assumenda nemo qui.

is_enabled   boolean  optional  

Example: false

get gift with purchase offer

requires authentication

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Request   

GET v1/{shop}/catalog/gwp-offers/{giftWithPurchaseProduct_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

giftWithPurchaseProduct_id   integer   

The ID of the giftWithPurchaseProduct. Example: 7

Update gift with purchase offer

requires authentication

Update an existing gift with purchase offer

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"gift_title\": \"hhslthlh\",
    \"cart_subtotal\": 65,
    \"product_id\": 7,
    \"description\": \"Veniam porro molestiae assumenda nemo qui.\",
    \"is_enabled\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'gift_title' => 'hhslthlh',
            'cart_subtotal' => 65,
            'product_id' => 7,
            'description' => 'Veniam porro molestiae assumenda nemo qui.',
            'is_enabled' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "gift_title": "hhslthlh",
    "cart_subtotal": 65,
    "product_id": 7,
    "description": "Veniam porro molestiae assumenda nemo qui.",
    "is_enabled": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT v1/{shop}/catalog/gwp-offers/{giftWithPurchaseProduct_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

giftWithPurchaseProduct_id   integer   

The ID of the giftWithPurchaseProduct. Example: 7

Body Parameters

gift_title   string  optional  

Must not be greater than 255 characters. Example: hhslthlh

cart_subtotal   number   

Must be at least 0.01. Example: 65

product_id   integer  optional  

Example: 7

description   string  optional  

Example: Veniam porro molestiae assumenda nemo qui.

is_enabled   boolean  optional  

Example: false

Delete gift with purchase offer

requires authentication

Delete an existing gift with purchase offer

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/catalog/gwp-offers/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE v1/{shop}/catalog/gwp-offers/{giftWithPurchaseProduct_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

giftWithPurchaseProduct_id   integer   

The ID of the giftWithPurchaseProduct. Example: 7

Categories

Categories available to be added to products.

Update category for products

requires authentication

Update the products to have the provided category. The existing category for the products will be overwritten.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/product_categories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"category_id\": 7,
    \"product_ids\": [
        7
    ]
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/product_categories';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'category_id' => 7,
            'product_ids' => [
                7,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/product_categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "category_id": 7,
    "product_ids": [
        7
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


null
 

Request   

POST v1/{shop}/product_categories

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

category_id   integer  optional  

A CommentSold category id or null to unset the category for the products. Example: 7

product_ids   integer[]   

An array of CommentSold product ids.

Get paginated category list

requires authentication

Partner Token

Returns a paginated list of categories. If a parent_id is supplied then it returns the children of the parent otherwise it returns the root categories.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/categories/473?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/categories/473';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/categories/473"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 7,
            "title": "Monserrate Kautzer",
            "full_path": "Monserrate Kautzer"
        },
        {
            "id": 8,
            "title": "Dr. Jillian Connelly",
            "full_path": "Dr. Jillian Connelly"
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

GET v1/categories/{category?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

category   string  optional  

Example: 473

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Response

Response Fields

id   integer   

The category unique identifier.

title   string   

The category title.

full_path   string   

The full path name including the categories' ancestors.

Get paginated category list

requires authentication

Partner Token

Returns a paginated list of categories. If a parent_id is supplied then results are restricted to children of the parent otherwise it returns any matching categories.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/categories/search/ullam?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"term\": \"ullam\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/categories/search/ullam';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
        'json' => [
            'term' => 'ullam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/categories/search/ullam"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "term": "ullam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 9,
            "title": "Monserrate Kautzer",
            "full_path": "Monserrate Kautzer"
        },
        {
            "id": 10,
            "title": "Dr. Jillian Connelly",
            "full_path": "Dr. Jillian Connelly"
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

POST v1/categories/search/{category?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

category   string  optional  

Example: ullam

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Body Parameters

term   string   

The search term to filter the results by. (space delimited) Example: ullam

Response

Response Fields

id   integer   

The category unique identifier.

title   string   

The category title.

full_path   string   

The full path name including the categories' ancestors.

Customers

View and search for customers

Get paginated customer list

requires authentication

Returns a paginated list of customers.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/customers?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filter\": \"[{\\\"search\\\": \\\"email\\\", \\\"op\\\": \\\"=\\\", \\\"value\\\": \\\"example@commentsold.com\\\"}]\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/customers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
        'json' => [
            'filter' => '[{"search": "email", "op": "=", "value": "example@commentsold.com"}]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/customers"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": "[{\"search\": \"email\", \"op\": \"=\", \"value\": \"example@commentsold.com\"}]"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 20,
            "name": "Lessie Satterfield",
            "email": "chet.langosh@gmail.com",
            "street_address": "2521 Mertz Prairie",
            "city": "Margretview",
            "state": "Alabama",
            "zip": "94459-3790",
            "country_code": "US",
            "phone_number": "5305820378",
            "external_id": null,
            "created_at": 1715810088,
            "updated_at": 1715982888
        },
        {
            "id": 21,
            "name": "Leonard Hegmann",
            "email": "josiane.kutch@koepp.com",
            "street_address": "17095 Runolfsson Common",
            "city": "South Lauraville",
            "state": "Alabama",
            "zip": "15408-2243",
            "country_code": "US",
            "phone_number": "15262023601",
            "external_id": null,
            "created_at": 1715810088,
            "updated_at": 1715982888
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

GET v1/{shop}/customers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Body Parameters

filter   string  optional  

An optional array of filters. Each entry should be a JSON object containing: {"search": keyValue, "op": comparisonOperator, "value": valueToCompareAgainst} Valid search values are: id, email, name, created_at, updated_at. Valid comparisons are =, !=, <, <=, >, >=, contains, starts_with, ends_with. Valid values to search are strings or integers. Example: [{"search": "email", "op": "=", "value": "example@commentsold.com"}]

Response

Response Fields

id   integer   

The customer unique identifier.

name   Null or string   

The customer full name.

email   Null or string   

The customer email address.

street_address   Null or string   

The customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

phone_number   Null or string   

The customer phone number.

external_id   Null or string   

The external customer unique identifier provided to the API.

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

Add customer

requires authentication

Add a new customer

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/customers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"external_customer_id\": \"AA743AB\",
    \"name\": \"Ted Jackson\",
    \"street_address\": \"132 Fake St.\",
    \"apartment\": \"Apt 5\",
    \"city\": \"Detroit\",
    \"state\": \"MI\",
    \"zip\": \"32133-1312\",
    \"country_code\": \"US\",
    \"phone_number\": \"978-555-5555\",
    \"email\": \"monserrate.kautzer@example.net\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/customers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'external_customer_id' => 'AA743AB',
            'name' => 'Ted Jackson',
            'street_address' => '132 Fake St.',
            'apartment' => 'Apt 5',
            'city' => 'Detroit',
            'state' => 'MI',
            'zip' => '32133-1312',
            'country_code' => 'US',
            'phone_number' => '978-555-5555',
            'email' => 'monserrate.kautzer@example.net',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/customers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "external_customer_id": "AA743AB",
    "name": "Ted Jackson",
    "street_address": "132 Fake St.",
    "apartment": "Apt 5",
    "city": "Detroit",
    "state": "MI",
    "zip": "32133-1312",
    "country_code": "US",
    "phone_number": "978-555-5555",
    "email": "monserrate.kautzer@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 22,
        "name": "Elvera Wuckert",
        "email": "isobel82@gmail.com",
        "street_address": "6139 Olson Plaza Suite 673",
        "city": "Lake Marta",
        "state": "Alabama",
        "zip": "59390",
        "country_code": "US",
        "phone_number": "15451982262",
        "external_id": null,
        "created_at": 1715810088,
        "updated_at": 1715982888
    }
}
 

Request   

POST v1/{shop}/customers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

external_customer_id   string   

Customer id in the external system. Must be at least 1 character. Example: AA743AB

name   string   

Must be between 1 and 255 characters. Example: Ted Jackson

street_address   string   

Must not be greater than 255 characters. Example: 132 Fake St.

apartment   string  optional  

Must not be greater than 100 characters. Example: Apt 5

city   string   

Must not be greater than 255 characters. Example: Detroit

state   string   

Must not be greater than 100 characters. Example: MI

zip   string   

Example: 32133-1312

country_code   string   

Must be 2 characters. Example: US

phone_number   string  optional  

Must not be greater than 100 characters. Example: 978-555-5555

email   string  optional  

Must be a valid email address. Must not be greater than 100 characters. Example: monserrate.kautzer@example.net

Response

Response Fields

id   integer   

The customer unique identifier.

name   Null or string   

The customer full name.

email   Null or string   

The customer email address.

street_address   Null or string   

The customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

phone_number   Null or string   

The customer phone number.

external_id   Null or string   

The external customer unique identifier provided to the API.

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

Get customer by CommentSold customer id

requires authentication

Returns a customer for the given CommentSold customer id.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/customers/ullam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/customers/ullam';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/customers/ullam"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 23,
        "name": "Isobel Murray",
        "email": "fritz.murphy@fahey.com",
        "street_address": "35315 Marvin Island Apt. 155",
        "city": "Dominicstad",
        "state": "Alabama",
        "zip": "27499-2367",
        "country_code": "US",
        "phone_number": "5673529115",
        "external_id": null,
        "created_at": 1715810088,
        "updated_at": 1715982888
    }
}
 

Example response (404, Customer not found):


null
 

Request   

GET v1/{shop}/customers/{customerId}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

customerId   string   

Example: ullam

Response

Response Fields

id   integer   

The customer unique identifier.

name   Null or string   

The customer full name.

email   Null or string   

The customer email address.

street_address   Null or string   

The customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

phone_number   Null or string   

The customer phone number.

external_id   Null or string   

The external customer unique identifier provided to the API.

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

Update customer

requires authentication

Update an existing customer

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/customers/473" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Ted Jackson\",
    \"street_address\": \"132 Fake St.\",
    \"apartment\": \"Apt 5\",
    \"city\": \"Detroit\",
    \"state\": \"MI\",
    \"zip\": \"32133-1312\",
    \"country_code\": \"US\",
    \"phone_number\": \"978-555-5555\",
    \"email\": \"monserrate.kautzer@example.net\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/customers/473';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Ted Jackson',
            'street_address' => '132 Fake St.',
            'apartment' => 'Apt 5',
            'city' => 'Detroit',
            'state' => 'MI',
            'zip' => '32133-1312',
            'country_code' => 'US',
            'phone_number' => '978-555-5555',
            'email' => 'monserrate.kautzer@example.net',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/customers/473"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Ted Jackson",
    "street_address": "132 Fake St.",
    "apartment": "Apt 5",
    "city": "Detroit",
    "state": "MI",
    "zip": "32133-1312",
    "country_code": "US",
    "phone_number": "978-555-5555",
    "email": "monserrate.kautzer@example.net"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 24,
        "name": "Kelley Medhurst",
        "email": "lavinia.hessel@gmail.com",
        "street_address": "66053 Murazik Row Suite 438",
        "city": "Welchchester",
        "state": "Alabama",
        "zip": "59390",
        "country_code": "US",
        "phone_number": "15275601803",
        "external_id": null,
        "created_at": 1715810088,
        "updated_at": 1715982888
    }
}
 

Example response (404, Customer not found):


null
 

Request   

POST v1/{shop}/customers/{customerId}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

customerId   string   

Example: 473

Body Parameters

name   string   

Must be between 1 and 255 characters. Example: Ted Jackson

street_address   string   

Must not be greater than 255 characters. Example: 132 Fake St.

apartment   string  optional  

Must not be greater than 100 characters. Example: Apt 5

city   string   

Must not be greater than 255 characters. Example: Detroit

state   string   

Must not be greater than 100 characters. Example: MI

zip   string   

Example: 32133-1312

country_code   string   

Must be 2 characters. Example: US

phone_number   string  optional  

Must not be greater than 100 characters. Example: 978-555-5555

email   string  optional  

Must be a valid email address. Must not be greater than 100 characters. Example: monserrate.kautzer@example.net

Response

Response Fields

id   integer   

The customer unique identifier.

name   Null or string   

The customer full name.

email   Null or string   

The customer email address.

street_address   Null or string   

The customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

phone_number   Null or string   

The customer phone number.

external_id   Null or string   

The external customer unique identifier provided to the API.

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

requires authentication

Returns a paginated list of customers.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/customers/search?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"term\": \"ullam\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/customers/search';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
        'json' => [
            'term' => 'ullam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/customers/search"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "term": "ullam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 25,
            "name": "Katarina Hamill",
            "email": "dominic61@nolan.com",
            "street_address": "6594 Rempel Ramp",
            "city": "Lake Marta",
            "state": "Alabama",
            "zip": "59390",
            "country_code": "US",
            "phone_number": "5719468970",
            "external_id": null,
            "created_at": 1715810088,
            "updated_at": 1715982888
        },
        {
            "id": 26,
            "name": "Leonel Quitzon",
            "email": "gutkowski.kailyn@yahoo.com",
            "street_address": "62206 Mann Drives Suite 154",
            "city": "Maximushaven",
            "state": "Alabama",
            "zip": "75037",
            "country_code": "US",
            "phone_number": "5417209947",
            "external_id": null,
            "created_at": 1715810088,
            "updated_at": 1715982888
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Response

Response Fields

id   integer   

The customer unique identifier.

name   Null or string   

The customer full name.

email   Null or string   

The customer email address.

street_address   Null or string   

The customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

phone_number   Null or string   

The customer phone number.

external_id   Null or string   

The external customer unique identifier provided to the API.

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

Get customer by external identifier

requires authentication

Returns a customer for the given external customer id.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/customers/externalId/ullam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/customers/externalId/ullam';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/customers/externalId/ullam"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 27,
        "name": "Providenci Ritchie",
        "email": "feeney.addison@yahoo.com",
        "street_address": "508 Lavinia Island",
        "city": "East Dortha",
        "state": "Alabama",
        "zip": "61102",
        "country_code": "US",
        "phone_number": "5438572247",
        "external_id": null,
        "created_at": 1715810088,
        "updated_at": 1715982888
    }
}
 

Example response (404, Customer not found):


null
 

Request   

GET v1/{shop}/customers/externalId/{externalId}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

externalId   string   

The externalId. Example: ullam

Response

Response Fields

id   integer   

The customer unique identifier.

name   Null or string   

The customer full name.

email   Null or string   

The customer email address.

street_address   Null or string   

The customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

phone_number   Null or string   

The customer phone number.

external_id   Null or string   

The external customer unique identifier provided to the API.

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

Fulfillment

Shipping info

Add tracking

requires authentication

Add tracking information to a list of line items

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/fulfillment/addTracking" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"line_item_ids\": [
        28
    ],
    \"shipping_info\": {
        \"carrier\": \"h\",
        \"tracking_number\": \"h\",
        \"amount_charged_to_shop\": 65,
        \"label_fee\": 38
    }
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/fulfillment/addTracking';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'line_item_ids' => [
                28,
            ],
            'shipping_info' => [
                'carrier' => 'h',
                'tracking_number' => 'h',
                'amount_charged_to_shop' => 65,
                'label_fee' => 38,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/fulfillment/addTracking"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "line_item_ids": [
        28
    ],
    "shipping_info": {
        "carrier": "h",
        "tracking_number": "h",
        "amount_charged_to_shop": 65,
        "label_fee": 38
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Returns a unique identifier for the shipping label):


[
    123
]
 

Request   

POST v1/{shop}/fulfillment/addTracking

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

line_item_ids   integer[]   

Must be at least 1.

shipping_info   object   

Fulfillment information to be associated with each line item.

carrier   string   

Shipping carrier, i.e. USPS, UPS, FedEx, etc. Must be between 1 and 10 characters. Example: h

tracking_number   string   

The tracking number provided by the carrier. Must be between 1 and 255 characters. Example: h

amount_charged_to_shop   number   

The amount, in cents, that the shop was charged for the shipping label. Must be at least 0. Example: 65

label_fee   number   

The fee (if any), in cents, that was charged to the shop on top of the actual cost of the shipping label. Must be at least 0. Example: 38

InventoryLevels

Retrieving and managing inventory levels

Get inventory Levels list

requires authentication

Returns a paginated list of inventory levels

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/inventory_levels?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/inventory_levels';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/inventory_levels"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "variant_id": 210,
            "product_id": 95,
            "total_available_quantity": 10,
            "created_at": 1715982887990,
            "updated_at": 1715982887990
        },
        {
            "variant_id": 211,
            "product_id": 96,
            "total_available_quantity": 10,
            "created_at": 1715982888001,
            "updated_at": 1715982888001
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

GET v1/{shop}/inventory_levels

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Response

Response Fields

variant_id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

total_available_quantity   integer   

Total quantity available for the variant.

created_at   Null or int   

Unix timestamp in milliseconds of the creation date if available

updated_at   Null or int   

Unix timestamp in milliseconds of the last modified date if available

Get an inventory level

requires authentication

Returns an inventory level for the given id

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/inventory_levels/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/inventory_levels/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/inventory_levels/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "variant_id": 212,
        "product_id": 97,
        "total_available_quantity": 10,
        "created_at": 1715982888019,
        "updated_at": 1715982888019
    }
}
 

Example response (404, Variant not found):


null
 

Request   

GET v1/{shop}/inventory_levels/{variant_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

variant_id   integer   

The ID of the variant. Example: 1

Response

Response Fields

variant_id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

total_available_quantity   integer   

Total quantity available for the variant.

created_at   Null or int   

Unix timestamp in milliseconds of the creation date if available

updated_at   Null or int   

Unix timestamp in milliseconds of the last modified date if available

Add inventory

requires authentication

Add quantity to the inventory level for a variant

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/inventory_levels/1/add" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"relative_quantity\": 1,
    \"note\": \"ullam\",
    \"updated_at\": 7
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/inventory_levels/1/add';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'relative_quantity' => 1,
            'note' => 'ullam',
            'updated_at' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/inventory_levels/1/add"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "relative_quantity": 1,
    "note": "ullam",
    "updated_at": 7
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Variant not found):


null
 

Request   

PUT v1/{shop}/inventory_levels/{variant_id}/add

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

variant_id   integer   

The ID of the variant. Example: 1

Body Parameters

relative_quantity   number   

A numeric quantity adjustment. Must be between 1 and 500000000. Example: 1

note   string  optional  

Optional note describing the reason for the change. Example: ullam

updated_at   integer  optional  

Optional timestamp that the adjustment occurred (for use when syncing quantity with multiple services). Example: 7

Subtract inventory

requires authentication

Remove quantity from the inventory level for a variant

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/inventory_levels/1/subtract" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"relative_quantity\": 1,
    \"note\": \"ullam\",
    \"updated_at\": 7
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/inventory_levels/1/subtract';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'relative_quantity' => 1,
            'note' => 'ullam',
            'updated_at' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/inventory_levels/1/subtract"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "relative_quantity": 1,
    "note": "ullam",
    "updated_at": 7
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Variant not found):


null
 

Request   

PUT v1/{shop}/inventory_levels/{variant_id}/subtract

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

variant_id   integer   

The ID of the variant. Example: 1

Body Parameters

relative_quantity   number   

A numeric quantity adjustment. Must be between 1 and 500000000. Example: 1

note   string  optional  

Optional note describing the reason for the change. Example: ullam

updated_at   integer  optional  

Optional timestamp that the adjustment occurred (for use when syncing quantity with multiple services). Example: 7

Set inventory on-shelf quantity

requires authentication

Set on-shelf (available + held in carts) quantity absolutely for a variant (use with extreme caution)

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/inventory_levels/1/set_absolute_shelf_quantity" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"absolute_quantity\": 0,
    \"note\": \"ullam\",
    \"updated_at\": 7
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/inventory_levels/1/set_absolute_shelf_quantity';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'absolute_quantity' => 0,
            'note' => 'ullam',
            'updated_at' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/inventory_levels/1/set_absolute_shelf_quantity"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "absolute_quantity": 0,
    "note": "ullam",
    "updated_at": 7
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Variant not found):


null
 

Request   

PUT v1/{shop}/inventory_levels/{variant_id}/set_absolute_shelf_quantity

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

variant_id   integer   

The ID of the variant. Example: 1

Body Parameters

absolute_quantity   number   

A numeric quantity to set the inventory level to. Must be between 0 and 500000000. Example: 0

note   string  optional  

Optional note describing the reason for the change. Example: ullam

updated_at   integer  optional  

Optional timestamp that the adjustment occurred (for use when syncing quantity with multiple services). Example: 7

Orders

Placing or viewing orders.

Get paginated order list

requires authentication

Returns a paginated list of orders.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/orders?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filter\": \"[{\\\"search\\\": \\\"customer_id\\\", \\\"op\\\": \\\"=\\\", \\\"value\\\": 123}]\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/orders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
        'json' => [
            'filter' => '[{"search": "customer_id", "op": "=", "value": 123}]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/orders"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": "[{\"search\": \"customer_id\", \"op\": \"=\", \"value\": 123}]"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 80,
            "customer_id": 14,
            "status": null,
            "shipping_address": {
                "name": "Winifred Marvin",
                "street_address": "55796 Letitia Prairie Suite 729",
                "apartment": "10",
                "city": "Nobleside",
                "state": "Alabama",
                "zip": "39804-4250",
                "country_code": "US"
            },
            "payment": {
                "amount": 1000,
                "subtotal": 800,
                "shipping": null,
                "taxes": 200,
                "coupon_discount": null,
                "balance_applied": null,
                "total": 1000,
                "payment_ref": "ch_5",
                "transaction_id": null,
                "payment_date": 1715982886,
                "coupon_code": null
            },
            "fulfillment": {
                "local_pickup": false,
                "v1": {
                    "tracking_number": null,
                    "shipped_date": null,
                    "label_url": null
                },
                "shipping_labels": null
            },
            "fulfill_by": "shop1",
            "created_at": 1715982886,
            "updated_at": 1715982886,
            "line_items": [],
            "order_note": null
        },
        {
            "id": 81,
            "customer_id": 15,
            "status": null,
            "shipping_address": {
                "name": "Helena Pfannerstill",
                "street_address": "30790 Leannon Mill",
                "apartment": "10",
                "city": "Feeneyport",
                "state": "Alabama",
                "zip": "38454",
                "country_code": "US"
            },
            "payment": {
                "amount": 1000,
                "subtotal": 800,
                "shipping": null,
                "taxes": 200,
                "coupon_discount": null,
                "balance_applied": null,
                "total": 1000,
                "payment_ref": "ch_5450680",
                "transaction_id": null,
                "payment_date": 1715982886,
                "coupon_code": null
            },
            "fulfillment": {
                "local_pickup": false,
                "v1": {
                    "tracking_number": null,
                    "shipped_date": null,
                    "label_url": null
                },
                "shipping_labels": null
            },
            "fulfill_by": "shop1",
            "created_at": 1715982886,
            "updated_at": 1715982886,
            "line_items": [],
            "order_note": null
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

GET v1/{shop}/orders

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Body Parameters

filter   string  optional  

An optional array of filters. Each entry should be a JSON object containing: {"search": keyValue, "op": comparisonOperator, "value": valueToCompareAgainst} Valid search values are: id, customer_id, status, created_at, updated_at. Valid comparisons are =, !=, <, <=, >, >=, contains, starts_with, ends_with. Valid values to search are strings or integers. Example: [{"search": "customer_id", "op": "=", "value": 123}]

Response

Response Fields

id   integer   

The order ID

customer_id   integer   

CommentSold internal customer id

status   string   

String representation of the order status

shipping_address   string[]   

Array of strings containing shipping address information

name   Null or string   

The customer full name.

street_address   Null or string   

The customer street address.

apartment   Null or string   

Line 2 of the customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

payment   string[]   

Group of payment information

amount   Null or integer   

Total amount paid in cents

subtotal   Null or integer   

Subtotal amount in cents

shipping   Null or integer   

Shipping amount in cents

taxes   Null or integer   

Tax amount in cents

coupon_discount   Null or integer   

Coupon discount amount in cents

balance_applied   Null or integer   

Balance applied amount in cents

total   Null or integer   

Total amount in cents

payment_ref   string   

Payment reference number

transaction_id   string   

Payment transaction ID

payment_date   integer   

Unix timestamp in seconds of the payment date

coupon_code   Null or string   

Coupon code, if any, used on the order

fulfillment   string[]   

Group of fulfillment information

local_pickup   boolean   

Whether or not the order is a local pickup order

v1   string[]   

Group of fulfillment information for older fulfillment methods

tracking_number   Null or string   

Tracking number of the order (for older fulfillment methods)

shipped_date   Null or int   

Unix timestamp in seconds of the shipped date (for older fulfillment methods)

label_url   Null or string   

URL of the shipping label (for older fulfillment methods)

shipping_labels   string[]   

Array of shipping labels for the order

provider   string   

Shipping provider name

tracking_number   string   

Tracking number of the order

tracking_url   string   

Tracking URL of the order

print_url   string   

Print URL of the shipping label

cost   integer   

Cost of the shipping label in cents

created_at   integer   

Unix timestamp in seconds of the creation date

fulfill_by   string   

Indicates who is responsible for fulfilling the order

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

line_items   line_item[]   

Array of line items contained in the order

id   integer   

Unique identifier of the line item

product_id   integer   

Unique identifier of the product

variant_id   integer   

Unique identifier of the variant (if applicable)

price   integer   

Price in cents

created_at   integer   

Unix timestamp of creation date

is_returned   boolean   

Whether or not the line item has been returned

order_note   string   

Order note

Create an order

requires authentication

Create an order (close the box).

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/orders" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reservation_ids\": [
        28
    ],
    \"amount_paid\": 25,
    \"subtotal\": 65,
    \"tax_total\": 38,
    \"shipping_total\": 69,
    \"discount\": 27,
    \"shipping_address\": {
        \"name\": \"Ted Jackson\",
        \"street_address\": \"132 Fake St.\",
        \"city\": \"Detroit\",
        \"country_code\": \"US\",
        \"state\": \"MI\",
        \"zip\": \"32133-1312\",
        \"apartment\": \"Apt 5\",
        \"phone_number\": \"978-555-5555\",
        \"email\": \"monte.langosh@example.org\"
    },
    \"update_customer_info\": false,
    \"custom_reservation_prices\": {
        \"28\": 1999,
        \"29\": 1399
    },
    \"local_pickup\": true,
    \"external_order_service\": \"Shopify\",
    \"external_order_id\": \"123456789\",
    \"external_order_url\": \"https:\\/\\/my-shop.myshopify.com\\/orders\\/123456789\",
    \"order_sequence\": \"first-order\",
    \"is_tiktok_order\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/orders';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'reservation_ids' => [
                28,
            ],
            'amount_paid' => 25,
            'subtotal' => 65,
            'tax_total' => 38,
            'shipping_total' => 69,
            'discount' => 27,
            'shipping_address' => [
                'name' => 'Ted Jackson',
                'street_address' => '132 Fake St.',
                'city' => 'Detroit',
                'country_code' => 'US',
                'state' => 'MI',
                'zip' => '32133-1312',
                'apartment' => 'Apt 5',
                'phone_number' => '978-555-5555',
                'email' => 'monte.langosh@example.org',
            ],
            'update_customer_info' => false,
            'custom_reservation_prices' => [
                28 => 1999,
                1399,
            ],
            'local_pickup' => true,
            'external_order_service' => 'Shopify',
            'external_order_id' => '123456789',
            'external_order_url' => 'https://my-shop.myshopify.com/orders/123456789',
            'order_sequence' => 'first-order',
            'is_tiktok_order' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/orders"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reservation_ids": [
        28
    ],
    "amount_paid": 25,
    "subtotal": 65,
    "tax_total": 38,
    "shipping_total": 69,
    "discount": 27,
    "shipping_address": {
        "name": "Ted Jackson",
        "street_address": "132 Fake St.",
        "city": "Detroit",
        "country_code": "US",
        "state": "MI",
        "zip": "32133-1312",
        "apartment": "Apt 5",
        "phone_number": "978-555-5555",
        "email": "monte.langosh@example.org"
    },
    "update_customer_info": false,
    "custom_reservation_prices": {
        "28": 1999,
        "29": 1399
    },
    "local_pickup": true,
    "external_order_service": "Shopify",
    "external_order_id": "123456789",
    "external_order_url": "https:\/\/my-shop.myshopify.com\/orders\/123456789",
    "order_sequence": "first-order",
    "is_tiktok_order": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 82,
        "customer_id": 16,
        "status": null,
        "shipping_address": {
            "name": "Millie Olson",
            "street_address": "9750 Hyatt Pike Suite 631",
            "apartment": "10",
            "city": "Kesslerfort",
            "state": "Alabama",
            "zip": "53155",
            "country_code": "US"
        },
        "payment": {
            "amount": 1000,
            "subtotal": 800,
            "shipping": null,
            "taxes": 200,
            "coupon_discount": null,
            "balance_applied": null,
            "total": 1000,
            "payment_ref": "ch_262",
            "transaction_id": null,
            "payment_date": 1715982886,
            "coupon_code": null
        },
        "fulfillment": {
            "local_pickup": false,
            "v1": {
                "tracking_number": null,
                "shipped_date": null,
                "label_url": null
            },
            "shipping_labels": null
        },
        "fulfill_by": "shop1",
        "created_at": 1715982886,
        "updated_at": 1715982886,
        "line_items": [
            {
                "id": 101,
                "product_id": 84,
                "variant_id": 193,
                "price": 686255,
                "created_at": 1715982886,
                "is_returned": false
            }
        ],
        "order_note": null
    }
}
 

Example response (222, The target merchant does not allow external creation of TikTok orders. This order has been ignored.):


null
 

Request   

POST v1/{shop}/orders

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

reservation_ids   integer[]   

An array of CommentSold reservation ids. Must be at least 1.

amount_paid   integer   

The total amount paid in cents. Must be at least 0. Example: 25

subtotal   integer   

The subtotal amount in cents. Must be at least 0. Example: 65

tax_total   integer   

The tax total amount in cents. Must be at least 0. Example: 38

shipping_total   integer   

The shipping total amount in cents. Must be at least 0. Example: 69

discount   integer   

The total discount amount in cents. Must be at least 0. Example: 27

coupon_code   string  optional  

The coupon code, if any, used.

shipping_address   object  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present.

name   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must be between 1 and 255 characters. Example: Ted Jackson

street_address   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must not be greater than 255 characters. Example: 132 Fake St.

city   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must not be greater than 255 characters. Example: Detroit

country_code   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must be 2 characters. Example: US

state   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must not be greater than 100 characters. Example: MI

zip   string  optional  

This field is required when local_pickup is false. Example: 32133-1312

apartment   string  optional  

Must not be greater than 100 characters. Example: Apt 5

phone_number   string  optional  

Must not be greater than 100 characters. Example: 978-555-5555

email   string  optional  

Must be a valid email address. Must not be greater than 100 characters. Example: monte.langosh@example.org

update_customer_info   boolean  optional  

Boolean to determine if the customer information should be updated based on the shipping information. Example: false

custom_reservation_prices   object  optional  

Optionally set the price-per reservation in cents. May omit some reservations if desired.

local_pickup   boolean  optional  

Boolean whether the order is being pickup up in person at the shop or shipped. Example: true

external_order_service   string  optional  

The name of the external service that created the order. This field is required when external_order_id is present. Example: Shopify

external_order_id   string  optional  

The ID of the order in the external system where it was created. This field is required when external_order_service is present. Example: 123456789

external_order_url   string  optional  

The fully qualified URL to link directly to the order. Example: https://my-shop.myshopify.com/orders/123456789

order_sequence   string  optional  

The sequence of the order. Can be null. Needs to be one of: first-order,second-order,third-order. Example: first-order

Must be one of:
  • first-order
  • second-order
  • third-order
order_note   string  optional  

Any note(s) left by the customer when placing the order.

is_tiktok_order   boolean  optional  

Whether the order originated from TikTok. Example: false

Response

Response Fields

id   integer   

The order ID

customer_id   integer   

CommentSold internal customer id

status   string   

String representation of the order status

shipping_address   string[]   

Array of strings containing shipping address information

name   Null or string   

The customer full name.

street_address   Null or string   

The customer street address.

apartment   Null or string   

Line 2 of the customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

payment   string[]   

Group of payment information

amount   Null or integer   

Total amount paid in cents

subtotal   Null or integer   

Subtotal amount in cents

shipping   Null or integer   

Shipping amount in cents

taxes   Null or integer   

Tax amount in cents

coupon_discount   Null or integer   

Coupon discount amount in cents

balance_applied   Null or integer   

Balance applied amount in cents

total   Null or integer   

Total amount in cents

payment_ref   string   

Payment reference number

transaction_id   string   

Payment transaction ID

payment_date   integer   

Unix timestamp in seconds of the payment date

coupon_code   Null or string   

Coupon code, if any, used on the order

fulfillment   string[]   

Group of fulfillment information

local_pickup   boolean   

Whether or not the order is a local pickup order

v1   string[]   

Group of fulfillment information for older fulfillment methods

tracking_number   Null or string   

Tracking number of the order (for older fulfillment methods)

shipped_date   Null or int   

Unix timestamp in seconds of the shipped date (for older fulfillment methods)

label_url   Null or string   

URL of the shipping label (for older fulfillment methods)

shipping_labels   string[]   

Array of shipping labels for the order

provider   string   

Shipping provider name

tracking_number   string   

Tracking number of the order

tracking_url   string   

Tracking URL of the order

print_url   string   

Print URL of the shipping label

cost   integer   

Cost of the shipping label in cents

created_at   integer   

Unix timestamp in seconds of the creation date

fulfill_by   string   

Indicates who is responsible for fulfilling the order

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

line_items   line_item[]   

Array of line items contained in the order

id   integer   

Unique identifier of the line item

product_id   integer   

Unique identifier of the product

variant_id   integer   

Unique identifier of the variant (if applicable)

price   integer   

Price in cents

created_at   integer   

Unix timestamp of creation date

is_returned   boolean   

Whether or not the line item has been returned

order_note   string   

Order note

Get an order

requires authentication

Returns an order for the given id

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/orders/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/orders/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/orders/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 83,
        "customer_id": 17,
        "status": null,
        "shipping_address": {
            "name": "Molly Hyatt",
            "street_address": "844 Earlene Mountain Suite 363",
            "apartment": "10",
            "city": "East Dortha",
            "state": "Alabama",
            "zip": "61102",
            "country_code": "US"
        },
        "payment": {
            "amount": 1000,
            "subtotal": 800,
            "shipping": null,
            "taxes": 200,
            "coupon_discount": null,
            "balance_applied": null,
            "total": 1000,
            "payment_ref": "ch_228263",
            "transaction_id": null,
            "payment_date": 1715982886,
            "coupon_code": null
        },
        "fulfillment": {
            "local_pickup": false,
            "v1": {
                "tracking_number": null,
                "shipped_date": null,
                "label_url": null
            },
            "shipping_labels": null
        },
        "fulfill_by": "shop1",
        "created_at": 1715982886,
        "updated_at": 1715982886,
        "line_items": [
            {
                "id": 102,
                "product_id": 85,
                "variant_id": 194,
                "price": 985559,
                "created_at": 1715982886,
                "is_returned": false
            }
        ],
        "order_note": null
    }
}
 

Example response (404, Order not found):


null
 

Request   

GET v1/{shop}/orders/{order_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

order_id   integer   

The ID of the order. Example: 1

Response

Response Fields

id   integer   

The order ID

customer_id   integer   

CommentSold internal customer id

status   string   

String representation of the order status

shipping_address   string[]   

Array of strings containing shipping address information

name   Null or string   

The customer full name.

street_address   Null or string   

The customer street address.

apartment   Null or string   

Line 2 of the customer street address.

city   Null or string   

The customer city.

state   Null or string   

The customer state/province/region.

zip   Null or string   

The customer zip/postal code.

country_code   Null or string   

The customer country code.

payment   string[]   

Group of payment information

amount   Null or integer   

Total amount paid in cents

subtotal   Null or integer   

Subtotal amount in cents

shipping   Null or integer   

Shipping amount in cents

taxes   Null or integer   

Tax amount in cents

coupon_discount   Null or integer   

Coupon discount amount in cents

balance_applied   Null or integer   

Balance applied amount in cents

total   Null or integer   

Total amount in cents

payment_ref   string   

Payment reference number

transaction_id   string   

Payment transaction ID

payment_date   integer   

Unix timestamp in seconds of the payment date

coupon_code   Null or string   

Coupon code, if any, used on the order

fulfillment   string[]   

Group of fulfillment information

local_pickup   boolean   

Whether or not the order is a local pickup order

v1   string[]   

Group of fulfillment information for older fulfillment methods

tracking_number   Null or string   

Tracking number of the order (for older fulfillment methods)

shipped_date   Null or int   

Unix timestamp in seconds of the shipped date (for older fulfillment methods)

label_url   Null or string   

URL of the shipping label (for older fulfillment methods)

shipping_labels   string[]   

Array of shipping labels for the order

provider   string   

Shipping provider name

tracking_number   string   

Tracking number of the order

tracking_url   string   

Tracking URL of the order

print_url   string   

Print URL of the shipping label

cost   integer   

Cost of the shipping label in cents

created_at   integer   

Unix timestamp in seconds of the creation date

fulfill_by   string   

Indicates who is responsible for fulfilling the order

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

line_items   line_item[]   

Array of line items contained in the order

id   integer   

Unique identifier of the line item

product_id   integer   

Unique identifier of the product

variant_id   integer   

Unique identifier of the variant (if applicable)

price   integer   

Price in cents

created_at   integer   

Unix timestamp of creation date

is_returned   boolean   

Whether or not the line item has been returned

order_note   string   

Order note

Cancel order

requires authentication

Cancels the entire order.

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/orders/1/cancel" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"refund_shipping\": false,
    \"back_to_inventory\": false,
    \"note\": \"ullam\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/orders/1/cancel';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'refund_shipping' => false,
            'back_to_inventory' => false,
            'note' => 'ullam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/orders/1/cancel"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "refund_shipping": false,
    "back_to_inventory": false,
    "note": "ullam"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Order not found):


null
 

Request   

PUT v1/{shop}/orders/{order_id}/cancel

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

order_id   integer   

The ID of the order. Example: 1

Body Parameters

refund_shipping   boolean  optional  

Whether or not to refund the shipping cost when canceling the order. Example: false

back_to_inventory   boolean   

Whether or not to update the variant quantity with +1 for each line item returned. Example: false

note   string  optional  

Optional note explaining the reason for the return. Example: ullam

Cancel an ordered line item

requires authentication

Cancel line item from an order.

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/orders/1/1/cancel" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"back_to_inventory\": false,
    \"note\": \"ullam\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/orders/1/1/cancel';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'back_to_inventory' => false,
            'note' => 'ullam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/orders/1/1/cancel"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "back_to_inventory": false,
    "note": "ullam"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Line item or order not found):


null
 

Request   

PUT v1/{shop}/orders/{order_id}/{lineItem_id}/cancel

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

order_id   integer   

The ID of the order. Example: 1

lineItem_id   integer   

The ID of the lineItem. Example: 1

Body Parameters

back_to_inventory   boolean   

Whether or not to update the variant quantity with +1 for each line item returned. Example: false

note   string  optional  

Optional note explaining the reason for the return. Example: ullam

Cancel ordered line items

requires authentication

Cancel line items from an order.

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/orders/1/cancel_multiple" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"line_items\": \"hhslthlhsnouzpipndpprqsrltys\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/orders/1/cancel_multiple';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'line_items' => 'hhslthlhsnouzpipndpprqsrltys',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/orders/1/cancel_multiple"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "line_items": "hhslthlhsnouzpipndpprqsrltys"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Line item not found):


null
 

Request   

PUT v1/{shop}/orders/{order_id}/cancel_multiple

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

order_id   integer   

The ID of the order. Example: 1

Body Parameters

line_items   integer[]   

Array of objects specifying the line items to cancel from the order. Must have at least 1 items. Example: hhslthlhsnouzpipndpprqsrltys

line_item_id   integer   

Line item id to cancel from the order. Must be at least 1. Example: 36

back_to_inventory   boolean   

Whether or not to update the variant quantity with +1 for each line item returned. Example: true

note   string  optional  

Optional note explaining the reason for the return. Example: ullam

POST v1/{shop}/orders/msm-phase0

requires authentication

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/orders/msm-phase0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"variant_ids\": [
        28
    ],
    \"customer_id\": \"ullam\",
    \"amount_paid\": 25,
    \"subtotal\": 65,
    \"tax_total\": 38,
    \"shipping_total\": 69,
    \"discount\": 27,
    \"shipping_address\": {
        \"name\": \"Ted Jackson\",
        \"street_address\": \"132 Fake St.\",
        \"city\": \"Detroit\",
        \"country_code\": \"US\",
        \"state\": \"MI\",
        \"zip\": \"32133-1312\",
        \"apartment\": \"Apt 5\",
        \"phone_number\": \"978-555-5555\",
        \"email\": \"monte.langosh@example.org\"
    },
    \"update_customer_info\": false,
    \"local_pickup\": true,
    \"external_order_service\": \"Shopify\",
    \"external_order_id\": \"123456789\",
    \"external_order_url\": \"https:\\/\\/my-shop.myshopify.com\\/orders\\/123456789\",
    \"order_sequence\": \"first-order\",
    \"is_tiktok_order\": false
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/orders/msm-phase0';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'variant_ids' => [
                28,
            ],
            'customer_id' => 'ullam',
            'amount_paid' => 25,
            'subtotal' => 65,
            'tax_total' => 38,
            'shipping_total' => 69,
            'discount' => 27,
            'shipping_address' => [
                'name' => 'Ted Jackson',
                'street_address' => '132 Fake St.',
                'city' => 'Detroit',
                'country_code' => 'US',
                'state' => 'MI',
                'zip' => '32133-1312',
                'apartment' => 'Apt 5',
                'phone_number' => '978-555-5555',
                'email' => 'monte.langosh@example.org',
            ],
            'update_customer_info' => false,
            'local_pickup' => true,
            'external_order_service' => 'Shopify',
            'external_order_id' => '123456789',
            'external_order_url' => 'https://my-shop.myshopify.com/orders/123456789',
            'order_sequence' => 'first-order',
            'is_tiktok_order' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/orders/msm-phase0"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "variant_ids": [
        28
    ],
    "customer_id": "ullam",
    "amount_paid": 25,
    "subtotal": 65,
    "tax_total": 38,
    "shipping_total": 69,
    "discount": 27,
    "shipping_address": {
        "name": "Ted Jackson",
        "street_address": "132 Fake St.",
        "city": "Detroit",
        "country_code": "US",
        "state": "MI",
        "zip": "32133-1312",
        "apartment": "Apt 5",
        "phone_number": "978-555-5555",
        "email": "monte.langosh@example.org"
    },
    "update_customer_info": false,
    "local_pickup": true,
    "external_order_service": "Shopify",
    "external_order_id": "123456789",
    "external_order_url": "https:\/\/my-shop.myshopify.com\/orders\/123456789",
    "order_sequence": "first-order",
    "is_tiktok_order": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST v1/{shop}/orders/msm-phase0

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

variant_ids   integer[]   

An array of CommentSold variant ids. Must be at least 1.

customer_id   string   

The CommentSold customer id. Example: ullam

amount_paid   integer   

The total amount paid in cents. Must be at least 0. Example: 25

subtotal   integer   

The subtotal amount in cents. Must be at least 0. Example: 65

tax_total   integer   

The tax total amount in cents. Must be at least 0. Example: 38

shipping_total   integer   

The shipping total amount in cents. Must be at least 0. Example: 69

discount   integer   

The total discount amount in cents. Must be at least 0. Example: 27

coupon_code   string  optional  

The coupon code, if any, used.

shipping_address   object  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present.

name   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must be between 1 and 255 characters. Example: Ted Jackson

street_address   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must not be greater than 255 characters. Example: 132 Fake St.

city   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must not be greater than 255 characters. Example: Detroit

country_code   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must be 2 characters. Example: US

state   string  optional  

This field is required when local_pickup is false. This field is required when local_pickup is not present. Must not be greater than 100 characters. Example: MI

zip   string  optional  

This field is required when local_pickup is false. Example: 32133-1312

apartment   string  optional  

Must not be greater than 100 characters. Example: Apt 5

phone_number   string  optional  

Must not be greater than 100 characters. Example: 978-555-5555

email   string  optional  

Must be a valid email address. Must not be greater than 100 characters. Example: monte.langosh@example.org

update_customer_info   boolean  optional  

Boolean to determine if the customer information should be updated based on the shipping information. Example: false

local_pickup   boolean  optional  

Boolean whether the order is being pickup up in person at the shop or shipped. Example: true

external_order_service   string  optional  

The name of the external service that created the order. This field is required when external_order_id is present. Example: Shopify

external_order_id   string  optional  

The ID of the order in the external system where it was created. This field is required when external_order_service is present. Example: 123456789

external_order_url   string  optional  

The fully qualified URL to link directly to the order. Example: https://my-shop.myshopify.com/orders/123456789

order_sequence   string  optional  

The sequence of the order. Can be null. Needs to be one of: first-order,second-order,third-order. Example: first-order

Must be one of:
  • first-order
  • second-order
  • third-order
order_note   string  optional  

Any note(s) left by the customer when placing the order.

is_tiktok_order   boolean  optional  

Whether the order originated from TikTok. Example: false

Products

Create, update, delete, and retrieve products and variants

Get paginated products list

requires authentication

Returns a paginated list of products

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/products?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filter\": \"[{\\\"search\\\": \\\"product_name\\\", \\\"op\\\": \\\"within\\\", \\\"value\\\": \\\"example\\\"}]\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
        'json' => [
            'filter' => '[{"search": "product_name", "op": "within", "value": "example"}]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": "[{\"search\": \"product_name\", \"op\": \"within\", \"value\": \"example\"}]"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 86,
            "name": "Ceramic Cable Organizer",
            "description": "Nemo qui ad quisquam excepturi sunt dolor voluptatibus. Voluptatem culpa occaecati eos id mollitia distinctio. Qui tempore odio placeat rerum eligendi in.",
            "style": "fozoen",
            "sku": "fozoen",
            "brand": "10",
            "brand_style": "test-style",
            "charge_taxes": false,
            "tax_code": null,
            "shipping_price": null,
            "is_archived": false,
            "location_id": null,
            "quantity_per_user_limit": null,
            "quantity_per_stream_per_user_limit": null,
            "attribute_names": {
                "attribute_1": "Color",
                "attribute_2": "Size",
                "attribute_3": "Title"
            },
            "main_image": null,
            "additional_images": [
                {
                    "id": 118,
                    "url": "https://picsum.photos/seed/4b3466b5-0fbd-3131-bd43-96cad65f6475/640/480",
                    "width": 600,
                    "height": 600
                }
            ],
            "tags": [
                "Liliane Baumbach"
            ],
            "collections": [],
            "category": {
                "id": 1,
                "title": "Dr. Jamil Schoen",
                "full_path": "Dr. Jamil Schoen"
            },
            "variants": [
                {
                    "id": 195,
                    "product_id": 86,
                    "name": null,
                    "price": 7226,
                    "original_price": 7226,
                    "cost": 1445,
                    "sku": "",
                    "dimensions": {
                        "length": 142.59,
                        "width": 841.83,
                        "height": 284.08,
                        "weight": 73.26
                    },
                    "is_archived": false,
                    "total_available_quantity": 10,
                    "attributes": {
                        "attribute_1": "Pink",
                        "attribute_2": "S",
                        "attribute_3": null
                    },
                    "barcode": null,
                    "created_at": 1715982887183,
                    "updated_at": 1715982887183,
                    "dropship_details": null,
                    "shopify_id": null,
                    "shopify_inventory_item_id": null
                },
                {
                    "id": 196,
                    "product_id": 86,
                    "name": null,
                    "price": 2197,
                    "original_price": 2197,
                    "cost": 439,
                    "sku": "",
                    "dimensions": {
                        "length": 176.94,
                        "width": 917.18,
                        "height": 66.4,
                        "weight": 70.53
                    },
                    "is_archived": false,
                    "total_available_quantity": 10,
                    "attributes": {
                        "attribute_1": "AntiqueWhite",
                        "attribute_2": "XS",
                        "attribute_3": null
                    },
                    "barcode": null,
                    "created_at": 1715982887252,
                    "updated_at": 1715982887252,
                    "dropship_details": {
                        "unit_cost": 439,
                        "partner_commission": 0,
                        "minimum_configurable_retail_price": 0,
                        "maximum_configurable_retail_price": 0
                    },
                    "shopify_id": null,
                    "shopify_inventory_item_id": null
                }
            ],
            "created_at": 1715982887,
            "updated_at": 1715982887,
            "shop_favorite": false,
            "dropship_details": {
                "partner_id": 13,
                "partner_name": "qui",
                "supplier_id": 5,
                "supplier_name": "enim",
                "has_active_allocation": false,
                "allocation_start_date": null,
                "allocation_end_date": null
            },
            "shopify_id": null,
            "is_final_sale": false,
            "metafields": null,
            "split_by": null,
            "published": true,
            "published_at": 1713390887
        },
        {
            "id": 87,
            "name": "Foam Piggy Bank",
            "description": "Aut velit quidem totam sapiente. Magnam reprehenderit rem corporis aut delectus blanditiis. Et inventore et officia repellat dolore assumenda excepturi.",
            "style": "gvxicm",
            "sku": "gvxicm",
            "brand": "10",
            "brand_style": "test-style",
            "charge_taxes": false,
            "tax_code": null,
            "shipping_price": null,
            "is_archived": false,
            "location_id": null,
            "quantity_per_user_limit": null,
            "quantity_per_stream_per_user_limit": null,
            "attribute_names": {
                "attribute_1": "Color",
                "attribute_2": "Size",
                "attribute_3": "Title"
            },
            "main_image": null,
            "additional_images": [
                {
                    "id": 119,
                    "url": "https://picsum.photos/seed/ddfab4da-5164-3316-b152-72b97eb72238/640/480",
                    "width": 600,
                    "height": 600
                }
            ],
            "tags": [
                "Letitia Nader"
            ],
            "collections": [],
            "category": {
                "id": 2,
                "title": "Mrs. Birdie Thompson PhD",
                "full_path": "Mrs. Birdie Thompson PhD"
            },
            "variants": [
                {
                    "id": 197,
                    "product_id": 87,
                    "name": null,
                    "price": 69713,
                    "original_price": 69713,
                    "cost": 13943,
                    "sku": "",
                    "dimensions": {
                        "length": 401.61,
                        "width": 634.81,
                        "height": 744.89,
                        "weight": 126.32
                    },
                    "is_archived": false,
                    "total_available_quantity": 10,
                    "attributes": {
                        "attribute_1": "Maroon",
                        "attribute_2": "L",
                        "attribute_3": null
                    },
                    "barcode": null,
                    "created_at": 1715982887301,
                    "updated_at": 1715982887301,
                    "dropship_details": null,
                    "shopify_id": null,
                    "shopify_inventory_item_id": null
                },
                {
                    "id": 198,
                    "product_id": 87,
                    "name": null,
                    "price": 12051,
                    "original_price": 12051,
                    "cost": 2410,
                    "sku": "",
                    "dimensions": {
                        "length": 351.64,
                        "width": 639.11,
                        "height": 642.16,
                        "weight": 64.32
                    },
                    "is_archived": false,
                    "total_available_quantity": 10,
                    "attributes": {
                        "attribute_1": "MediumTurquoise",
                        "attribute_2": "S",
                        "attribute_3": null
                    },
                    "barcode": null,
                    "created_at": 1715982887341,
                    "updated_at": 1715982887341,
                    "dropship_details": {
                        "unit_cost": 2410,
                        "partner_commission": 0,
                        "minimum_configurable_retail_price": 0,
                        "maximum_configurable_retail_price": 0
                    },
                    "shopify_id": null,
                    "shopify_inventory_item_id": null
                }
            ],
            "created_at": 1715982887,
            "updated_at": 1715982887,
            "shop_favorite": false,
            "dropship_details": {
                "partner_id": 17,
                "partner_name": "saepe",
                "supplier_id": 8,
                "supplier_name": "numquam",
                "has_active_allocation": false,
                "allocation_start_date": null,
                "allocation_end_date": null
            },
            "shopify_id": null,
            "is_final_sale": false,
            "metafields": null,
            "split_by": null,
            "published": true,
            "published_at": 1713390887
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

GET v1/{shop}/products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Body Parameters

filter   string  optional  

An optional array of filters. Each entry should be a JSON object containing: {"search": keyValue, "op": comparisonOperator, "value": valueToCompareAgainst} Valid search values are: id, product_name, created_at, updated_at, shopify_id, variant_shopify_id, variant_shopify_inventory_item_id. Valid comparisons are =, !=, <, <=, >, >=, contains, starts_with, ends_with. Valid values to search are strings or integers. Example: [{"search": "product_name", "op": "within", "value": "example"}]

Response

Response Fields

id   integer   

The product unique identifier.

name   string   

Name of the product.

description   string   

Description for the product.

sku   Null or string   

The SKU for the product.

style (deprecated: use sku instead)   Null or string   

The SKU for the product.

brand   Null or string   

The brand for the product.

brand_style   Null or string   

The brand style for the product.

charge_taxes   boolean   

Whether or not to charge taxes.

tax_code   Null or string   

Tax code for the item.

shipping_price   Null or integer   

Null means no product-specific shipping price (use default shipping price).

is_archived   boolean   

Whether or not the product has been archived.

location_id   Null or integer   

Location id for this product.

quantity_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product.

quantity_per_stream_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product per live stream.

created_at   integer   

Unix timestamp in seconds for the time the product was created.

updated_at   integer   

Unix timestamp in seconds for the last time the product was updated.

shop_favorite   boolean   

Whether the product has been marked as a favorite by the shop.

attribute_names   string[]   

An array of attribute names.

attribute_1   Null or string   

Attribute 1 name.

attribute_2   Null or string   

Attribute 2 name.

attribute_3   Null or string   

Attribute 3 name.

main_image   Null or image   

Main product image.

id   integer   

Main product ID.

url   string   

Main product URL.

width   integer   

Main product width.

height   integer   

Main product height.

additional_images   image[]   

Additional images.

id   integer   

Additional image ID.

url   string   

Additional image URL.

width   integer   

Additional image width.

height   integer   

Additional image height.

tags   string[]   

Array of tag names.

collections   string[]   

Array of collections.

category   Null or category   

Product category.

id   integer   

Category ID.

title   string   

Category title.

full_path   string   

Category full path.

variants   variant[]   

An array of variants for the product.

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

barcode   Null or string   

Variant barcode.

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

dropship_details   Null or object   

Dropship product details.

partner_id   Null or int   

Dropship partner id.

partner_name   Null or string   

Dropship partner name.

supplier_id   Null or int   

Dropship supplier id.

supplier_name   Null or string   

Dropship supplier name.

has_active_allocation   boolean   

Whether the product has an active allocation.

allocation_start_date   Null or int   

Unix timestamp in seconds for the start date of the active allocation.

allocation_end_date   Null or int   

Unix timestamp in seconds for the end date of the active allocation.

shopify_id   Null or int   

Shopify product id.

is_final_sale   boolean   

Is final sale.

metafields   Null or object   

Partner-specific metafields.

split_by   string   

How the product images are grouped on the Commentsold webstore. One of "color", "size" or "none"

published   boolean   

Is the product published to the webstore.

published_at   Null or int   

Unix timestamp in seconds for the time the product was published to the webstore.

Add product

requires authentication

Add a new product

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/products" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"h\",
    \"description\": \"Veniam porro molestiae assumenda nemo qui.\",
    \"short_description\": \"ullam\",
    \"sku\": \"hslthlhs\",
    \"style\": \"nouzpipn\",
    \"brand\": \"ullam\",
    \"brand_style\": \"hslthlhs\",
    \"charge_taxes\": true,
    \"tax_code\": \"PC040100\",
    \"shipping_price_in_cents\": 52,
    \"is_archived\": false,
    \"location_id\": 89,
    \"quantity_per_user_limit\": 53,
    \"quantity_per_stream_per_user_limit\": 29,
    \"attribute_names\": {
        \"attribute_1\": \"pndpprqs\",
        \"attribute_2\": \"rltyskpt\",
        \"attribute_3\": \"qvlvcnhn\"
    },
    \"main_image\": {
        \"url\": \"http:\\/\\/www.goyette.info\\/assumenda-nemo-qui-ad-quisquam-excepturi\",
        \"width\": 52,
        \"height\": 71
    },
    \"additional_images\": [
        \"ullam\"
    ],
    \"rehost_images\": false,
    \"shopify_id\": 65,
    \"published\": true,
    \"published_at\": 7,
    \"split_by\": \"size\",
    \"tags\": [
        \"ullam\"
    ],
    \"collections\": [
        7
    ],
    \"category\": 7,
    \"variants\": [
        {
            \"dimensions\": {
                \"length\": 1,
                \"width\": 0,
                \"height\": 1,
                \"weight\": 0
            },
            \"attributes\": {
                \"attribute_1\": \"hnojhenh\",
                \"attribute_2\": \"gpqhkijj\",
                \"attribute_3\": \"qfgsaqtc\"
            }
        }
    ],
    \"updated_at\": 7
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'h',
            'description' => 'Veniam porro molestiae assumenda nemo qui.',
            'short_description' => 'ullam',
            'sku' => 'hslthlhs',
            'style' => 'nouzpipn',
            'brand' => 'ullam',
            'brand_style' => 'hslthlhs',
            'charge_taxes' => true,
            'tax_code' => 'PC040100',
            'shipping_price_in_cents' => 52,
            'is_archived' => false,
            'location_id' => 89,
            'quantity_per_user_limit' => 53,
            'quantity_per_stream_per_user_limit' => 29,
            'attribute_names' => [
                'attribute_1' => 'pndpprqs',
                'attribute_2' => 'rltyskpt',
                'attribute_3' => 'qvlvcnhn',
            ],
            'main_image' => [
                'url' => 'http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi',
                'width' => 52,
                'height' => 71,
            ],
            'additional_images' => [
                'ullam',
            ],
            'rehost_images' => false,
            'shopify_id' => 65,
            'published' => true,
            'published_at' => 7,
            'split_by' => 'size',
            'tags' => [
                'ullam',
            ],
            'collections' => [
                7,
            ],
            'category' => 7,
            'variants' => [
                [
                    'dimensions' => [
                        'length' => 1,
                        'width' => 0,
                        'height' => 1,
                        'weight' => 0,
                    ],
                    'attributes' => [
                        'attribute_1' => 'hnojhenh',
                        'attribute_2' => 'gpqhkijj',
                        'attribute_3' => 'qfgsaqtc',
                    ],
                ],
            ],
            'updated_at' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "h",
    "description": "Veniam porro molestiae assumenda nemo qui.",
    "short_description": "ullam",
    "sku": "hslthlhs",
    "style": "nouzpipn",
    "brand": "ullam",
    "brand_style": "hslthlhs",
    "charge_taxes": true,
    "tax_code": "PC040100",
    "shipping_price_in_cents": 52,
    "is_archived": false,
    "location_id": 89,
    "quantity_per_user_limit": 53,
    "quantity_per_stream_per_user_limit": 29,
    "attribute_names": {
        "attribute_1": "pndpprqs",
        "attribute_2": "rltyskpt",
        "attribute_3": "qvlvcnhn"
    },
    "main_image": {
        "url": "http:\/\/www.goyette.info\/assumenda-nemo-qui-ad-quisquam-excepturi",
        "width": 52,
        "height": 71
    },
    "additional_images": [
        "ullam"
    ],
    "rehost_images": false,
    "shopify_id": 65,
    "published": true,
    "published_at": 7,
    "split_by": "size",
    "tags": [
        "ullam"
    ],
    "collections": [
        7
    ],
    "category": 7,
    "variants": [
        {
            "dimensions": {
                "length": 1,
                "width": 0,
                "height": 1,
                "weight": 0
            },
            "attributes": {
                "attribute_1": "hnojhenh",
                "attribute_2": "gpqhkijj",
                "attribute_3": "qfgsaqtc"
            }
        }
    ],
    "updated_at": 7
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 88,
        "name": "Underwater Spoon",
        "description": "Sequi in beatae eligendi necessitatibus molestiae placeat. Nemo rerum quos et laudantium. Similique fugit corporis nobis molestias esse.",
        "style": "priwdg",
        "sku": "priwdg",
        "brand": "10",
        "brand_style": "test-style",
        "charge_taxes": false,
        "tax_code": null,
        "shipping_price": null,
        "is_archived": false,
        "location_id": null,
        "quantity_per_user_limit": null,
        "quantity_per_stream_per_user_limit": null,
        "attribute_names": {
            "attribute_1": "Color",
            "attribute_2": "Size",
            "attribute_3": "Title"
        },
        "main_image": null,
        "additional_images": [
            {
                "id": 120,
                "url": "https://picsum.photos/seed/132201e4-099d-3db2-a05d-5c70fa788203/640/480",
                "width": 600,
                "height": 600
            }
        ],
        "tags": [
            "Prof. Ray Nitzsche"
        ],
        "collections": [],
        "category": {
            "id": 3,
            "title": "Amira Flatley",
            "full_path": "Amira Flatley"
        },
        "variants": [
            {
                "id": 199,
                "product_id": 88,
                "name": null,
                "price": 18813,
                "original_price": 18813,
                "cost": 3763,
                "sku": "",
                "dimensions": {
                    "length": 854.6,
                    "width": 444.61,
                    "height": 610.06,
                    "weight": 111.1
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "SandyBrown",
                    "attribute_2": "L",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887433,
                "updated_at": 1715982887433,
                "dropship_details": null,
                "shopify_id": null,
                "shopify_inventory_item_id": null
            },
            {
                "id": 200,
                "product_id": 88,
                "name": null,
                "price": 22527,
                "original_price": 22527,
                "cost": 4505,
                "sku": "",
                "dimensions": {
                    "length": 193.06,
                    "width": 718.26,
                    "height": 686.5,
                    "weight": 161.67
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "MediumSlateBlue",
                    "attribute_2": "XL",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887472,
                "updated_at": 1715982887472,
                "dropship_details": {
                    "unit_cost": 4505,
                    "partner_commission": 0,
                    "minimum_configurable_retail_price": 0,
                    "maximum_configurable_retail_price": 0
                },
                "shopify_id": null,
                "shopify_inventory_item_id": null
            }
        ],
        "created_at": 1715982887,
        "updated_at": 1715982887,
        "shop_favorite": false,
        "dropship_details": {
            "partner_id": 21,
            "partner_name": "adipisci",
            "supplier_id": 11,
            "supplier_name": "praesentium",
            "has_active_allocation": false,
            "allocation_start_date": null,
            "allocation_end_date": null
        },
        "shopify_id": null,
        "is_final_sale": false,
        "metafields": null,
        "split_by": null,
        "published": true,
        "published_at": 1713390887
    }
}
 

Request   

POST v1/{shop}/products

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

name   string   

Name of the product. Must be between 1 and 255 characters. Example: h

description   string  optional  

The product description (HTML allowed). Example: Veniam porro molestiae assumenda nemo qui.

short_description   string  optional  

A short product description used for mobile app or other limited display areas (HTML not allowed). Example: ullam

sku   string  optional  

A unique identifier for the product. This field is required when style is not present. Must not be greater than 255 characters. Example: hslthlhs

style   string  optional  

(Deprecated) A unique identifier for the product. Use sku instead. This field is required when sku is not present. Must not be greater than 255 characters. Example: nouzpipn

brand   string  optional  

The product brand. Example: ullam

brand_style   string  optional  

The product brand style. Must not be greater than 255 characters. Example: hslthlhs

charge_taxes   boolean   

Is the product tax exempt or not. Example: true

tax_code   string  optional  

The tax code. Required for some partners or core creator accounts. Must not be greater than 255 characters. Example: PC040100

shipping_price_in_cents   integer  optional  

Shipping cost in cents. Must be at least 0. Example: 52

is_archived   boolean   

Is the product archived or active. Example: false

location_id   integer  optional  

Must be at least 0. Example: 89

quantity_per_user_limit   integer  optional  

The max number of this product a single user can purchase. Must be at least 0. Example: 53

quantity_per_stream_per_user_limit   integer  optional  

The max number of this product a single user can purchase in a single live stream. Must be at least 0. Example: 29

attribute_names   object  optional  
attribute_1   string  optional  

The name of the first attribute. Defaults to "Color". Must not be greater than 128 characters. Example: pndpprqs

attribute_2   string  optional  

The name of the second attribute. Defaults to "Size". Must not be greater than 128 characters. Example: rltyskpt

attribute_3   string  optional  

The name of the third attribute. Must not be greater than 128 characters. Example: qvlvcnhn

main_image   object  optional  
url   string  optional  

The primary image absolute URL. This field is required when main_image is present. Example: http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi

width   integer  optional  

The primary image width (optional). Must be at least 1. Example: 52

height   integer  optional  

The primary image height (optional). Must be at least 1. Example: 71

additional_images   string[]  optional  

An array of additional images.

url   string  optional  

Additional image absolute URL. This field is required when additional_images.* is present. Example: http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi

width   integer  optional  

Additional image width (optional). Must be at least 1. Example: 52

height   integer  optional  

Additional image height (optional). Must be at least 1. Example: 71

rehost_images   boolean  optional  

If set and true, images will be downloaded & rehosted by CommentSold. Omitted or false will use the original URLs provided. Defaults to false. Example: false

shopify_id   integer  optional  

The Shopify product ID. Must be at least 0. Example: 65

published   boolean  optional  

Should the product be published to the webstore. Defaults to false. Example: true

published_at   integer  optional  

The unix timestamp when the product should be published to the webstore. Ignored if published is false, defaults to the current timestamp if published is true. Example: 7

split_by   string  optional  

Example: size

Must be one of:
  • color
  • size
tags   string[]  optional  
collections   integer[]  optional  
category   integer  optional  

The category the product is best associated with. Example: 7

variants   string[]  optional  
name   string  optional  

Name of the variant. Must be between 1 and 255 characters. Example: z

price_in_cents   integer   

The current sale price in cents of the variant. Must be at least 0. Example: 53

original_price_in_cents   integer  optional  

The original/suggested price (SRP) in cents of the variant. Must be at least 0. Example: 29

cost_in_cents   integer   

The cost to acquire the variant in cents. Must be at least 0. Example: 52

sku   string   

A unique identifier for the variant. Must not be greater than 255 characters. Example: ndpprqsr

barcode   string  optional  

Barcode for the variant, if available. Must not be greater than 255 characters. Example: ltyskptq

dimensions   object  optional  
length   number  optional  

The length of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

width   number  optional  

The width of the variant in inches. Must be between 0 and 9999999999.99. Example: 0

height   number  optional  

The height of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

weight   number  optional  

The weight of the variant in ounces. Must be between 0 and 9999999999.99. Example: 0

is_archived   boolean   

Is the product archived or active. Example: false

attributes   object  optional  
attribute_1   string  optional  

Must not be greater than 128 characters. Example: hnojhenh

attribute_2   string  optional  

Must not be greater than 128 characters. Example: gpqhkijj

attribute_3   string  optional  

Must not be greater than 128 characters. Example: qfgsaqtc

shopify_id   integer  optional  

The Shopify variant ID. Must be at least 0. Example: 20

shopify_inventory_item_id   integer  optional  

The Shopify inventory item ID. Must be at least 0. Example: 51

updated_at   integer  optional  

Example: 7

Response

Response Fields

id   integer   

The product unique identifier.

name   string   

Name of the product.

description   string   

Description for the product.

sku   Null or string   

The SKU for the product.

style (deprecated: use sku instead)   Null or string   

The SKU for the product.

brand   Null or string   

The brand for the product.

brand_style   Null or string   

The brand style for the product.

charge_taxes   boolean   

Whether or not to charge taxes.

tax_code   Null or string   

Tax code for the item.

shipping_price   Null or integer   

Null means no product-specific shipping price (use default shipping price).

is_archived   boolean   

Whether or not the product has been archived.

location_id   Null or integer   

Location id for this product.

quantity_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product.

quantity_per_stream_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product per live stream.

created_at   integer   

Unix timestamp in seconds for the time the product was created.

updated_at   integer   

Unix timestamp in seconds for the last time the product was updated.

shop_favorite   boolean   

Whether the product has been marked as a favorite by the shop.

attribute_names   string[]   

An array of attribute names.

attribute_1   Null or string   

Attribute 1 name.

attribute_2   Null or string   

Attribute 2 name.

attribute_3   Null or string   

Attribute 3 name.

main_image   Null or image   

Main product image.

id   integer   

Main product ID.

url   string   

Main product URL.

width   integer   

Main product width.

height   integer   

Main product height.

additional_images   image[]   

Additional images.

id   integer   

Additional image ID.

url   string   

Additional image URL.

width   integer   

Additional image width.

height   integer   

Additional image height.

tags   string[]   

Array of tag names.

collections   string[]   

Array of collections.

category   Null or category   

Product category.

id   integer   

Category ID.

title   string   

Category title.

full_path   string   

Category full path.

variants   variant[]   

An array of variants for the product.

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

barcode   Null or string   

Variant barcode.

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

dropship_details   Null or object   

Dropship product details.

partner_id   Null or int   

Dropship partner id.

partner_name   Null or string   

Dropship partner name.

supplier_id   Null or int   

Dropship supplier id.

supplier_name   Null or string   

Dropship supplier name.

has_active_allocation   boolean   

Whether the product has an active allocation.

allocation_start_date   Null or int   

Unix timestamp in seconds for the start date of the active allocation.

allocation_end_date   Null or int   

Unix timestamp in seconds for the end date of the active allocation.

shopify_id   Null or int   

Shopify product id.

is_final_sale   boolean   

Is final sale.

metafields   Null or object   

Partner-specific metafields.

split_by   string   

How the product images are grouped on the Commentsold webstore. One of "color", "size" or "none"

published   boolean   

Is the product published to the webstore.

published_at   Null or int   

Unix timestamp in seconds for the time the product was published to the webstore.

Get a product

requires authentication

Returns a product for the given id

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/products/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 89,
        "name": "Rattan Usb Key",
        "description": "Rerum eligendi in deserunt id harum vel odio. Vitae provident veniam provident in commodi ullam sequi. Minima voluptatem laborum facilis ad esse quia.",
        "style": "ymnmjo",
        "sku": "ymnmjo",
        "brand": "10",
        "brand_style": "test-style",
        "charge_taxes": false,
        "tax_code": null,
        "shipping_price": null,
        "is_archived": false,
        "location_id": null,
        "quantity_per_user_limit": null,
        "quantity_per_stream_per_user_limit": null,
        "attribute_names": {
            "attribute_1": "Color",
            "attribute_2": "Size",
            "attribute_3": "Title"
        },
        "main_image": null,
        "additional_images": [
            {
                "id": 121,
                "url": "https://picsum.photos/seed/4b3466b5-0fbd-3131-bd43-96cad65f6475/640/480",
                "width": 600,
                "height": 600
            }
        ],
        "tags": [
            "Kiarra Greenfelder"
        ],
        "collections": [],
        "category": {
            "id": 4,
            "title": "Dr. Jamil Schoen",
            "full_path": "Dr. Jamil Schoen"
        },
        "variants": [
            {
                "id": 201,
                "product_id": 89,
                "name": null,
                "price": 4455,
                "original_price": 4455,
                "cost": 891,
                "sku": "",
                "dimensions": {
                    "length": 232.07,
                    "width": 690.05,
                    "height": 624.47,
                    "weight": 120.76
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "DeepSkyBlue",
                    "attribute_2": "L",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887536,
                "updated_at": 1715982887536,
                "dropship_details": null,
                "shopify_id": null,
                "shopify_inventory_item_id": null
            },
            {
                "id": 202,
                "product_id": 89,
                "name": null,
                "price": 2197,
                "original_price": 2197,
                "cost": 439,
                "sku": "",
                "dimensions": {
                    "length": 176.94,
                    "width": 917.18,
                    "height": 66.4,
                    "weight": 70.53
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "AntiqueWhite",
                    "attribute_2": "XS",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887573,
                "updated_at": 1715982887573,
                "dropship_details": {
                    "unit_cost": 439,
                    "partner_commission": 0,
                    "minimum_configurable_retail_price": 0,
                    "maximum_configurable_retail_price": 0
                },
                "shopify_id": null,
                "shopify_inventory_item_id": null
            }
        ],
        "created_at": 1715982887,
        "updated_at": 1715982887,
        "shop_favorite": false,
        "dropship_details": {
            "partner_id": 25,
            "partner_name": "voluptas",
            "supplier_id": 14,
            "supplier_name": "quasi",
            "has_active_allocation": false,
            "allocation_start_date": null,
            "allocation_end_date": null
        },
        "shopify_id": null,
        "is_final_sale": false,
        "metafields": null,
        "split_by": null,
        "published": true,
        "published_at": 1713390887
    }
}
 

Example response (404, Product not found):


null
 

Request   

GET v1/{shop}/products/{product_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

Response

Response Fields

id   integer   

The product unique identifier.

name   string   

Name of the product.

description   string   

Description for the product.

sku   Null or string   

The SKU for the product.

style (deprecated: use sku instead)   Null or string   

The SKU for the product.

brand   Null or string   

The brand for the product.

brand_style   Null or string   

The brand style for the product.

charge_taxes   boolean   

Whether or not to charge taxes.

tax_code   Null or string   

Tax code for the item.

shipping_price   Null or integer   

Null means no product-specific shipping price (use default shipping price).

is_archived   boolean   

Whether or not the product has been archived.

location_id   Null or integer   

Location id for this product.

quantity_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product.

quantity_per_stream_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product per live stream.

created_at   integer   

Unix timestamp in seconds for the time the product was created.

updated_at   integer   

Unix timestamp in seconds for the last time the product was updated.

shop_favorite   boolean   

Whether the product has been marked as a favorite by the shop.

attribute_names   string[]   

An array of attribute names.

attribute_1   Null or string   

Attribute 1 name.

attribute_2   Null or string   

Attribute 2 name.

attribute_3   Null or string   

Attribute 3 name.

main_image   Null or image   

Main product image.

id   integer   

Main product ID.

url   string   

Main product URL.

width   integer   

Main product width.

height   integer   

Main product height.

additional_images   image[]   

Additional images.

id   integer   

Additional image ID.

url   string   

Additional image URL.

width   integer   

Additional image width.

height   integer   

Additional image height.

tags   string[]   

Array of tag names.

collections   string[]   

Array of collections.

category   Null or category   

Product category.

id   integer   

Category ID.

title   string   

Category title.

full_path   string   

Category full path.

variants   variant[]   

An array of variants for the product.

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

barcode   Null or string   

Variant barcode.

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

dropship_details   Null or object   

Dropship product details.

partner_id   Null or int   

Dropship partner id.

partner_name   Null or string   

Dropship partner name.

supplier_id   Null or int   

Dropship supplier id.

supplier_name   Null or string   

Dropship supplier name.

has_active_allocation   boolean   

Whether the product has an active allocation.

allocation_start_date   Null or int   

Unix timestamp in seconds for the start date of the active allocation.

allocation_end_date   Null or int   

Unix timestamp in seconds for the end date of the active allocation.

shopify_id   Null or int   

Shopify product id.

is_final_sale   boolean   

Is final sale.

metafields   Null or object   

Partner-specific metafields.

split_by   string   

How the product images are grouped on the Commentsold webstore. One of "color", "size" or "none"

published   boolean   

Is the product published to the webstore.

published_at   Null or int   

Unix timestamp in seconds for the time the product was published to the webstore.

Update product

requires authentication

Update an existing product

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/products/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"h\",
    \"description\": \"Veniam porro molestiae assumenda nemo qui.\",
    \"style\": \"hsnouzpi\",
    \"sku\": \"pndpprqs\",
    \"brand\": \"ullam\",
    \"brand_style\": \"hslthlhs\",
    \"charge_taxes\": true,
    \"tax_code\": \"PC040100\",
    \"shipping_price_in_cents\": 52,
    \"is_archived\": false,
    \"location_id\": 89,
    \"quantity_per_user_limit\": 53,
    \"quantity_per_stream_per_user_limit\": 29,
    \"attribute_names\": {
        \"attribute_1\": \"pndpprqs\",
        \"attribute_2\": \"rltyskpt\",
        \"attribute_3\": \"qvlvcnhn\"
    },
    \"main_image\": {
        \"url\": \"http:\\/\\/www.goyette.info\\/assumenda-nemo-qui-ad-quisquam-excepturi\",
        \"width\": 52,
        \"height\": 71
    },
    \"additional_images\": [
        \"ullam\"
    ],
    \"rehost_images\": false,
    \"tags\": [
        \"ullam\"
    ],
    \"category\": 7,
    \"collections\": [
        7
    ],
    \"shopify_id\": 25,
    \"published\": true,
    \"published_at\": 7,
    \"split_by\": \"size\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'h',
            'description' => 'Veniam porro molestiae assumenda nemo qui.',
            'style' => 'hsnouzpi',
            'sku' => 'pndpprqs',
            'brand' => 'ullam',
            'brand_style' => 'hslthlhs',
            'charge_taxes' => true,
            'tax_code' => 'PC040100',
            'shipping_price_in_cents' => 52,
            'is_archived' => false,
            'location_id' => 89,
            'quantity_per_user_limit' => 53,
            'quantity_per_stream_per_user_limit' => 29,
            'attribute_names' => [
                'attribute_1' => 'pndpprqs',
                'attribute_2' => 'rltyskpt',
                'attribute_3' => 'qvlvcnhn',
            ],
            'main_image' => [
                'url' => 'http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi',
                'width' => 52,
                'height' => 71,
            ],
            'additional_images' => [
                'ullam',
            ],
            'rehost_images' => false,
            'tags' => [
                'ullam',
            ],
            'category' => 7,
            'collections' => [
                7,
            ],
            'shopify_id' => 25,
            'published' => true,
            'published_at' => 7,
            'split_by' => 'size',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "h",
    "description": "Veniam porro molestiae assumenda nemo qui.",
    "style": "hsnouzpi",
    "sku": "pndpprqs",
    "brand": "ullam",
    "brand_style": "hslthlhs",
    "charge_taxes": true,
    "tax_code": "PC040100",
    "shipping_price_in_cents": 52,
    "is_archived": false,
    "location_id": 89,
    "quantity_per_user_limit": 53,
    "quantity_per_stream_per_user_limit": 29,
    "attribute_names": {
        "attribute_1": "pndpprqs",
        "attribute_2": "rltyskpt",
        "attribute_3": "qvlvcnhn"
    },
    "main_image": {
        "url": "http:\/\/www.goyette.info\/assumenda-nemo-qui-ad-quisquam-excepturi",
        "width": 52,
        "height": 71
    },
    "additional_images": [
        "ullam"
    ],
    "rehost_images": false,
    "tags": [
        "ullam"
    ],
    "category": 7,
    "collections": [
        7
    ],
    "shopify_id": 25,
    "published": true,
    "published_at": 7,
    "split_by": "size"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 90,
        "name": "Outerspace Toy Train",
        "description": "Occaecati eos id mollitia distinctio et qui. Odio placeat rerum eligendi in deserunt id. Vel odio qui vitae provident veniam provident.",
        "style": "eocsxl",
        "sku": "eocsxl",
        "brand": "10",
        "brand_style": "test-style",
        "charge_taxes": false,
        "tax_code": null,
        "shipping_price": null,
        "is_archived": false,
        "location_id": null,
        "quantity_per_user_limit": null,
        "quantity_per_stream_per_user_limit": null,
        "attribute_names": {
            "attribute_1": "Color",
            "attribute_2": "Size",
            "attribute_3": "Title"
        },
        "main_image": null,
        "additional_images": [
            {
                "id": 122,
                "url": "https://picsum.photos/seed/40e492bd-bc30-3bd9-a53c-3a0d6d309452/640/480",
                "width": 600,
                "height": 600
            }
        ],
        "tags": [
            "Alisha Fay"
        ],
        "collections": [],
        "category": {
            "id": 5,
            "title": "Prof. Jovanny Kshlerin MD",
            "full_path": "Prof. Jovanny Kshlerin MD"
        },
        "variants": [
            {
                "id": 203,
                "product_id": 90,
                "name": null,
                "price": 14259,
                "original_price": 14259,
                "cost": 2852,
                "sku": "",
                "dimensions": {
                    "length": 841.83,
                    "width": 284.08,
                    "height": 648.45,
                    "weight": 15.19
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "HoneyDew",
                    "attribute_2": "S",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887651,
                "updated_at": 1715982887651,
                "dropship_details": null,
                "shopify_id": null,
                "shopify_inventory_item_id": null
            },
            {
                "id": 204,
                "product_id": 90,
                "name": null,
                "price": 39498,
                "original_price": 39498,
                "cost": 7900,
                "sku": "",
                "dimensions": {
                    "length": 633.15,
                    "width": 272.95,
                    "height": 130.07,
                    "weight": 71.06
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "LightGoldenRodYellow",
                    "attribute_2": "XL",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887689,
                "updated_at": 1715982887689,
                "dropship_details": {
                    "unit_cost": 7900,
                    "partner_commission": 0,
                    "minimum_configurable_retail_price": 0,
                    "maximum_configurable_retail_price": 0
                },
                "shopify_id": null,
                "shopify_inventory_item_id": null
            }
        ],
        "created_at": 1715982887,
        "updated_at": 1715982887,
        "shop_favorite": false,
        "dropship_details": {
            "partner_id": 29,
            "partner_name": "repellendus",
            "supplier_id": 17,
            "supplier_name": "voluptates",
            "has_active_allocation": false,
            "allocation_start_date": null,
            "allocation_end_date": null
        },
        "shopify_id": null,
        "is_final_sale": false,
        "metafields": null,
        "split_by": null,
        "published": true,
        "published_at": 1713390887
    }
}
 

Example response (404, Product not found):


null
 

Request   

PUT v1/{shop}/products/{product_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

Body Parameters

name   string   

Name of the product. Must be between 1 and 255 characters. Example: h

description   string  optional  

The product description. Example: Veniam porro molestiae assumenda nemo qui.

style   string  optional  

(Deprecated) A unique identifier for the product. Use sku instead. This field is required when sku is null. Must not be greater than 255 characters. Example: hsnouzpi

sku   string  optional  

A unique identifier for the product. This field is required when style is null. Must not be greater than 255 characters. Example: pndpprqs

brand   string  optional  

The product brand. Example: ullam

brand_style   string  optional  

The product brand style. Must not be greater than 255 characters. Example: hslthlhs

charge_taxes   boolean   

Is the product tax exempt or not. Example: true

tax_code   string  optional  

The tax code. Required for some partners or core creator accounts. Must not be greater than 255 characters. Example: PC040100

shipping_price_in_cents   integer  optional  

Shipping cost in cents. Must be at least 0. Example: 52

is_archived   boolean   

Is the product archived or active. Example: false

location_id   integer  optional  

Must be at least 0. Example: 89

quantity_per_user_limit   integer  optional  

The max number of this product a single user can purchase. Must be at least 0. Example: 53

quantity_per_stream_per_user_limit   integer  optional  

The max number of this product a single user can purchase in a single live stream. Must be at least 0. Example: 29

attribute_names   object  optional  
attribute_1   string  optional  

The name of the first attribute. Defaults to "Color". Must not be greater than 128 characters. Example: pndpprqs

attribute_2   string  optional  

The name of the second attribute. Defaults to "Size". Must not be greater than 128 characters. Example: rltyskpt

attribute_3   string  optional  

The name of the third attribute. Must not be greater than 128 characters. Example: qvlvcnhn

main_image   object  optional  
url   string  optional  

The primary image absolute URL. This field is required when main_image is present. Example: http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi

width   integer  optional  

The primary image width (optional). Must be at least 1. Example: 52

height   integer  optional  

The primary image height (optional). Must be at least 1. Example: 71

additional_images   string[]  optional  

An array of additional images.

url   string  optional  

Additional image absolute URL. This field is required when additional_images.* is present. Example: http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi

width   integer  optional  

Additional image width (optional). Must be at least 1. Example: 52

height   integer  optional  

Additional image height (optional). Must be at least 1. Example: 71

rehost_images   boolean  optional  

If set and true, images will be downloaded & rehosted by CommentSold. Omitted or false will use the original URLs provided. Defaults to false. Example: false

tags   string[]  optional  
category   integer  optional  

The category the product is best associated with. Example: 7

collections   integer[]  optional  
shopify_id   integer  optional  

The Shopify product ID. Must be at least 0. Example: 25

published   boolean  optional  

Should the product be published to the webstore. Defaults to false. Example: true

published_at   integer  optional  

The unix timestamp when the product should be published to the webstore. Ignored if published is false, defaults to the current timestamp if published is true. Example: 7

split_by   string  optional  

Example: size

Must be one of:
  • color
  • size

Response

Response Fields

id   integer   

The product unique identifier.

name   string   

Name of the product.

description   string   

Description for the product.

sku   Null or string   

The SKU for the product.

style (deprecated: use sku instead)   Null or string   

The SKU for the product.

brand   Null or string   

The brand for the product.

brand_style   Null or string   

The brand style for the product.

charge_taxes   boolean   

Whether or not to charge taxes.

tax_code   Null or string   

Tax code for the item.

shipping_price   Null or integer   

Null means no product-specific shipping price (use default shipping price).

is_archived   boolean   

Whether or not the product has been archived.

location_id   Null or integer   

Location id for this product.

quantity_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product.

quantity_per_stream_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product per live stream.

created_at   integer   

Unix timestamp in seconds for the time the product was created.

updated_at   integer   

Unix timestamp in seconds for the last time the product was updated.

shop_favorite   boolean   

Whether the product has been marked as a favorite by the shop.

attribute_names   string[]   

An array of attribute names.

attribute_1   Null or string   

Attribute 1 name.

attribute_2   Null or string   

Attribute 2 name.

attribute_3   Null or string   

Attribute 3 name.

main_image   Null or image   

Main product image.

id   integer   

Main product ID.

url   string   

Main product URL.

width   integer   

Main product width.

height   integer   

Main product height.

additional_images   image[]   

Additional images.

id   integer   

Additional image ID.

url   string   

Additional image URL.

width   integer   

Additional image width.

height   integer   

Additional image height.

tags   string[]   

Array of tag names.

collections   string[]   

Array of collections.

category   Null or category   

Product category.

id   integer   

Category ID.

title   string   

Category title.

full_path   string   

Category full path.

variants   variant[]   

An array of variants for the product.

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

barcode   Null or string   

Variant barcode.

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

dropship_details   Null or object   

Dropship product details.

partner_id   Null or int   

Dropship partner id.

partner_name   Null or string   

Dropship partner name.

supplier_id   Null or int   

Dropship supplier id.

supplier_name   Null or string   

Dropship supplier name.

has_active_allocation   boolean   

Whether the product has an active allocation.

allocation_start_date   Null or int   

Unix timestamp in seconds for the start date of the active allocation.

allocation_end_date   Null or int   

Unix timestamp in seconds for the end date of the active allocation.

shopify_id   Null or int   

Shopify product id.

is_final_sale   boolean   

Is final sale.

metafields   Null or object   

Partner-specific metafields.

split_by   string   

How the product images are grouped on the Commentsold webstore. One of "color", "size" or "none"

published   boolean   

Is the product published to the webstore.

published_at   Null or int   

Unix timestamp in seconds for the time the product was published to the webstore.

Partial update product

requires authentication

Update an existing product with only the changes sent. Images and tags replace all of their values with the new values.

Example request:
curl --request PATCH \
    "https://openapi.commentsold.com/v1/ullam/products/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"h\",
    \"description\": \"Veniam porro molestiae assumenda nemo qui.\",
    \"short_description\": \"ullam\",
    \"sku\": \"hslthlhs\",
    \"style\": \"nouzpipn\",
    \"brand\": \"ullam\",
    \"brand_style\": \"hslthlhs\",
    \"charge_taxes\": true,
    \"tax_code\": \"PC040100\",
    \"shipping_price_in_cents\": 52,
    \"is_archived\": false,
    \"location_id\": 89,
    \"quantity_per_user_limit\": 53,
    \"quantity_per_stream_per_user_limit\": 29,
    \"is_final_sale\": false,
    \"attribute_names\": {
        \"attribute_1\": \"ndpprqsr\",
        \"attribute_2\": \"ltyskptq\",
        \"attribute_3\": \"vlvcnhno\"
    },
    \"main_image\": {
        \"url\": \"http:\\/\\/www.goyette.info\\/assumenda-nemo-qui-ad-quisquam-excepturi\",
        \"width\": 52,
        \"height\": 71
    },
    \"additional_images\": [
        \"ullam\"
    ],
    \"rehost_images\": false,
    \"tags\": [
        \"ullam\"
    ],
    \"category\": 7,
    \"collections\": [
        7
    ],
    \"shopify_id\": 25,
    \"published\": true,
    \"published_at\": 7,
    \"split_by\": \"size\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'h',
            'description' => 'Veniam porro molestiae assumenda nemo qui.',
            'short_description' => 'ullam',
            'sku' => 'hslthlhs',
            'style' => 'nouzpipn',
            'brand' => 'ullam',
            'brand_style' => 'hslthlhs',
            'charge_taxes' => true,
            'tax_code' => 'PC040100',
            'shipping_price_in_cents' => 52,
            'is_archived' => false,
            'location_id' => 89,
            'quantity_per_user_limit' => 53,
            'quantity_per_stream_per_user_limit' => 29,
            'is_final_sale' => false,
            'attribute_names' => [
                'attribute_1' => 'ndpprqsr',
                'attribute_2' => 'ltyskptq',
                'attribute_3' => 'vlvcnhno',
            ],
            'main_image' => [
                'url' => 'http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi',
                'width' => 52,
                'height' => 71,
            ],
            'additional_images' => [
                'ullam',
            ],
            'rehost_images' => false,
            'tags' => [
                'ullam',
            ],
            'category' => 7,
            'collections' => [
                7,
            ],
            'shopify_id' => 25,
            'published' => true,
            'published_at' => 7,
            'split_by' => 'size',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "h",
    "description": "Veniam porro molestiae assumenda nemo qui.",
    "short_description": "ullam",
    "sku": "hslthlhs",
    "style": "nouzpipn",
    "brand": "ullam",
    "brand_style": "hslthlhs",
    "charge_taxes": true,
    "tax_code": "PC040100",
    "shipping_price_in_cents": 52,
    "is_archived": false,
    "location_id": 89,
    "quantity_per_user_limit": 53,
    "quantity_per_stream_per_user_limit": 29,
    "is_final_sale": false,
    "attribute_names": {
        "attribute_1": "ndpprqsr",
        "attribute_2": "ltyskptq",
        "attribute_3": "vlvcnhno"
    },
    "main_image": {
        "url": "http:\/\/www.goyette.info\/assumenda-nemo-qui-ad-quisquam-excepturi",
        "width": 52,
        "height": 71
    },
    "additional_images": [
        "ullam"
    ],
    "rehost_images": false,
    "tags": [
        "ullam"
    ],
    "category": 7,
    "collections": [
        7
    ],
    "shopify_id": 25,
    "published": true,
    "published_at": 7,
    "split_by": "size"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 91,
        "name": "Outerspace Toy Train",
        "description": "Occaecati eos id mollitia distinctio et qui. Odio placeat rerum eligendi in deserunt id. Vel odio qui vitae provident veniam provident.",
        "style": "eocsxl",
        "sku": "eocsxl",
        "brand": "10",
        "brand_style": "test-style",
        "charge_taxes": false,
        "tax_code": null,
        "shipping_price": null,
        "is_archived": false,
        "location_id": null,
        "quantity_per_user_limit": null,
        "quantity_per_stream_per_user_limit": null,
        "attribute_names": {
            "attribute_1": "Color",
            "attribute_2": "Size",
            "attribute_3": "Title"
        },
        "main_image": null,
        "additional_images": [
            {
                "id": 123,
                "url": "https://picsum.photos/seed/e02a1873-358f-3d94-b915-3d93c304e3a8/640/480",
                "width": 600,
                "height": 600
            }
        ],
        "tags": [
            "Dejon Pollich"
        ],
        "collections": [],
        "category": {
            "id": 6,
            "title": "Dr. Kelvin Leannon MD",
            "full_path": "Dr. Kelvin Leannon MD"
        },
        "variants": [
            {
                "id": 205,
                "product_id": 91,
                "name": null,
                "price": 84183,
                "original_price": 84183,
                "cost": 16837,
                "sku": "",
                "dimensions": {
                    "length": 284.08,
                    "width": 648.45,
                    "height": 602.2,
                    "weight": 29.2
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "Gray",
                    "attribute_2": "XS",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887765,
                "updated_at": 1715982887765,
                "dropship_details": null,
                "shopify_id": null,
                "shopify_inventory_item_id": null
            },
            {
                "id": 206,
                "product_id": 91,
                "name": null,
                "price": 2187,
                "original_price": 2187,
                "cost": 437,
                "sku": "",
                "dimensions": {
                    "length": 433.54,
                    "width": 748.2,
                    "height": 287.84,
                    "weight": 141.83
                },
                "is_archived": false,
                "total_available_quantity": 10,
                "attributes": {
                    "attribute_1": "Orange",
                    "attribute_2": "XS",
                    "attribute_3": null
                },
                "barcode": null,
                "created_at": 1715982887803,
                "updated_at": 1715982887803,
                "dropship_details": {
                    "unit_cost": 437,
                    "partner_commission": 0,
                    "minimum_configurable_retail_price": 0,
                    "maximum_configurable_retail_price": 0
                },
                "shopify_id": null,
                "shopify_inventory_item_id": null
            }
        ],
        "created_at": 1715982887,
        "updated_at": 1715982887,
        "shop_favorite": false,
        "dropship_details": {
            "partner_id": 33,
            "partner_name": "iure",
            "supplier_id": 20,
            "supplier_name": "qui",
            "has_active_allocation": false,
            "allocation_start_date": null,
            "allocation_end_date": null
        },
        "shopify_id": null,
        "is_final_sale": false,
        "metafields": null,
        "split_by": null,
        "published": true,
        "published_at": 1713390887
    }
}
 

Example response (404, Product not found):


null
 

Request   

PATCH v1/{shop}/products/{product_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

Body Parameters

name   string  optional  

Name of the product. Must be between 1 and 255 characters. Example: h

description   string  optional  

The product description (HTML allowed). Example: Veniam porro molestiae assumenda nemo qui.

short_description   string  optional  

A short product description used for mobile app or other limited display areas (HTML not allowed). Example: ullam

sku   string  optional  

A unique identifier for the product. Must not be greater than 255 characters. Example: hslthlhs

style   string  optional  

(Deprecated) A unique identifier for the product. Use sku instead. Must not be greater than 255 characters. Example: nouzpipn

brand   string  optional  

The product brand. Example: ullam

brand_style   string  optional  

The product brand style. Must not be greater than 255 characters. Example: hslthlhs

charge_taxes   boolean  optional  

Is the product tax exempt or not. Example: true

tax_code   string  optional  

The tax code. Must not be greater than 255 characters. Example: PC040100

shipping_price_in_cents   integer  optional  

Shipping cost in cents. Must be at least 0. Example: 52

is_archived   boolean  optional  

Is the product archived or active. Example: false

location_id   integer  optional  

Must be at least 0. Example: 89

quantity_per_user_limit   integer  optional  

The max number of this product a single user can purchase. Must be at least 0. Example: 53

quantity_per_stream_per_user_limit   integer  optional  

The max number of this product a single user can purchase in a single live stream. Must be at least 0. Example: 29

is_final_sale   boolean  optional  

Example: false

attribute_names   object  optional  
attribute_1   string  optional  

The name of the first attribute. Defaults to "Color". Must not be greater than 128 characters. Example: ndpprqsr

attribute_2   string  optional  

The name of the second attribute. Defaults to "Size". Must not be greater than 128 characters. Example: ltyskptq

attribute_3   string  optional  

The name of the third attribute. Must not be greater than 128 characters. Example: vlvcnhno

main_image   object  optional  
url   string  optional  

The primary image absolute URL. This field is required when main_image is present. Example: http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi

width   integer  optional  

The primary image width (optional). Must be at least 1. Example: 52

height   integer  optional  

The primary image height (optional). Must be at least 1. Example: 71

additional_images   string[]  optional  

An array of additional images.

url   string  optional  

Additional image absolute URL. This field is required when additional_images.* is present. Example: http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi

width   integer  optional  

Additional image width (optional). Must be at least 1. Example: 52

height   integer  optional  

Additional image height (optional). Must be at least 1. Example: 71

rehost_images   boolean  optional  

If set and true, images will be downloaded & rehosted by CommentSold. Omitted or false will use the original URLs provided. Defaults to false. Example: false

tags   string[]  optional  
category   integer  optional  

The category the product is best associated with. Example: 7

collections   integer[]  optional  
shopify_id   integer  optional  

The Shopify product ID. Must be at least 0. Example: 25

metafields   object  optional  

Arbitrary list of metafield key-values.

published   boolean  optional  

Should the product be published to the webstore. Example: true

published_at   integer  optional  

The unix timestamp when the product should be published to the webstore. Ignored if published is false, defaults to the current timestamp if published is true. Example: 7

split_by   string  optional  

Example: size

Must be one of:
  • color
  • size

Response

Response Fields

id   integer   

The product unique identifier.

name   string   

Name of the product.

description   string   

Description for the product.

sku   Null or string   

The SKU for the product.

style (deprecated: use sku instead)   Null or string   

The SKU for the product.

brand   Null or string   

The brand for the product.

brand_style   Null or string   

The brand style for the product.

charge_taxes   boolean   

Whether or not to charge taxes.

tax_code   Null or string   

Tax code for the item.

shipping_price   Null or integer   

Null means no product-specific shipping price (use default shipping price).

is_archived   boolean   

Whether or not the product has been archived.

location_id   Null or integer   

Location id for this product.

quantity_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product.

quantity_per_stream_per_user_limit   Null or integer   

Maximum quantity a user can purchase this product per live stream.

created_at   integer   

Unix timestamp in seconds for the time the product was created.

updated_at   integer   

Unix timestamp in seconds for the last time the product was updated.

shop_favorite   boolean   

Whether the product has been marked as a favorite by the shop.

attribute_names   string[]   

An array of attribute names.

attribute_1   Null or string   

Attribute 1 name.

attribute_2   Null or string   

Attribute 2 name.

attribute_3   Null or string   

Attribute 3 name.

main_image   Null or image   

Main product image.

id   integer   

Main product ID.

url   string   

Main product URL.

width   integer   

Main product width.

height   integer   

Main product height.

additional_images   image[]   

Additional images.

id   integer   

Additional image ID.

url   string   

Additional image URL.

width   integer   

Additional image width.

height   integer   

Additional image height.

tags   string[]   

Array of tag names.

collections   string[]   

Array of collections.

category   Null or category   

Product category.

id   integer   

Category ID.

title   string   

Category title.

full_path   string   

Category full path.

variants   variant[]   

An array of variants for the product.

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

barcode   Null or string   

Variant barcode.

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

dropship_details   Null or object   

Dropship product details.

partner_id   Null or int   

Dropship partner id.

partner_name   Null or string   

Dropship partner name.

supplier_id   Null or int   

Dropship supplier id.

supplier_name   Null or string   

Dropship supplier name.

has_active_allocation   boolean   

Whether the product has an active allocation.

allocation_start_date   Null or int   

Unix timestamp in seconds for the start date of the active allocation.

allocation_end_date   Null or int   

Unix timestamp in seconds for the end date of the active allocation.

shopify_id   Null or int   

Shopify product id.

is_final_sale   boolean   

Is final sale.

metafields   Null or object   

Partner-specific metafields.

split_by   string   

How the product images are grouped on the Commentsold webstore. One of "color", "size" or "none"

published   boolean   

Is the product published to the webstore.

published_at   Null or int   

Unix timestamp in seconds for the time the product was published to the webstore.

Delete product

requires authentication

Delete a product from the catalog (this has dire consequences)

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/products/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Product not found):


null
 

Request   

DELETE v1/{shop}/products/{product_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

Add variant

requires authentication

Add a new variant to a product

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/products/1/variant" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"h\",
    \"price_in_cents\": 25,
    \"original_price_in_cents\": 65,
    \"cost_in_cents\": 38,
    \"sku\": \"thlhsnou\",
    \"barcode\": \"zpipndpp\",
    \"dimensions\": {
        \"length\": 1,
        \"width\": 1,
        \"height\": 1,
        \"weight\": 1
    },
    \"is_archived\": false,
    \"attributes\": {
        \"attribute_1\": \"tyskptqv\",
        \"attribute_2\": \"lvcnhnoj\",
        \"attribute_3\": \"henhgpqh\"
    },
    \"shopify_id\": 37,
    \"shopify_inventory_item_id\": 29,
    \"updated_at\": 7
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1/variant';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'h',
            'price_in_cents' => 25,
            'original_price_in_cents' => 65,
            'cost_in_cents' => 38,
            'sku' => 'thlhsnou',
            'barcode' => 'zpipndpp',
            'dimensions' => [
                'length' => 1,
                'width' => 1,
                'height' => 1,
                'weight' => 1,
            ],
            'is_archived' => false,
            'attributes' => [
                'attribute_1' => 'tyskptqv',
                'attribute_2' => 'lvcnhnoj',
                'attribute_3' => 'henhgpqh',
            ],
            'shopify_id' => 37,
            'shopify_inventory_item_id' => 29,
            'updated_at' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1/variant"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "h",
    "price_in_cents": 25,
    "original_price_in_cents": 65,
    "cost_in_cents": 38,
    "sku": "thlhsnou",
    "barcode": "zpipndpp",
    "dimensions": {
        "length": 1,
        "width": 1,
        "height": 1,
        "weight": 1
    },
    "is_archived": false,
    "attributes": {
        "attribute_1": "tyskptqv",
        "attribute_2": "lvcnhnoj",
        "attribute_3": "henhgpqh"
    },
    "shopify_id": 37,
    "shopify_inventory_item_id": 29,
    "updated_at": 7
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 207,
        "product_id": 92,
        "name": null,
        "price": 76789,
        "original_price": 76789,
        "cost": 15358,
        "sku": "",
        "dimensions": {
            "length": 306.51,
            "width": 452.53,
            "height": 276.33,
            "weight": 86.27
        },
        "is_archived": false,
        "total_available_quantity": 10,
        "attributes": {
            "attribute_1": "DeepSkyBlue",
            "attribute_2": "L",
            "attribute_3": null
        },
        "barcode": null,
        "created_at": 1715982887882,
        "updated_at": 1715982887882,
        "dropship_details": null,
        "shopify_id": null,
        "shopify_inventory_item_id": null
    }
}
 

Request   

POST v1/{shop}/products/{product_id}/variant

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

Body Parameters

name   string  optional  

Name of the variant. Must be between 1 and 255 characters. Example: h

price_in_cents   integer   

The current sale price in cents of the variant. Must be at least 0. Example: 25

original_price_in_cents   integer  optional  

The original/suggested price (SRP) in cents of the variant. Must be at least 0. Example: 65

cost_in_cents   integer   

The cost to acquire the variant in cents. Must be at least 0. Example: 38

sku   string   

A unique identifier for the variant. Must not be greater than 255 characters. Example: thlhsnou

barcode   string  optional  

Barcode for the variant, if available. Must not be greater than 255 characters. Example: zpipndpp

dimensions   object  optional  
length   number  optional  

The length of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

width   number  optional  

The width of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

height   number  optional  

The height of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

weight   number  optional  

The weight of the variant in ounces. Must be between 0 and 9999999999.99. Example: 1

is_archived   boolean   

Is the product archived or active. Example: false

attributes   object  optional  
attribute_1   string  optional  

Must not be greater than 128 characters. Example: tyskptqv

attribute_2   string  optional  

Must not be greater than 128 characters. Example: lvcnhnoj

attribute_3   string  optional  

Must not be greater than 128 characters. Example: henhgpqh

shopify_id   integer  optional  

The Shopify variant ID. Must be at least 0. Example: 37

shopify_inventory_item_id   integer  optional  

The Shopify inventory item ID. Must be at least 0. Example: 29

updated_at   integer  optional  

Example: 7

Response

Response Fields

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

barcode   Null or string   

Barcode if available

created_at   Null or int   

Unix timestamp in milliseconds of the creation date if available

updated_at   Null or int   

Unix timestamp in milliseconds of the last modified date if available

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

Update variant

requires authentication

Update an existing variant on a product

Example request:
curl --request PUT \
    "https://openapi.commentsold.com/v1/ullam/products/1/variant/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"h\",
    \"price_in_cents\": 25,
    \"original_price_in_cents\": 65,
    \"cost_in_cents\": 38,
    \"sku\": \"thlhsnou\",
    \"barcode\": \"zpipndpp\",
    \"dimensions\": {
        \"length\": 1,
        \"width\": 1,
        \"height\": 1,
        \"weight\": 1
    },
    \"is_archived\": false,
    \"attributes\": {
        \"attribute_1\": \"tyskptqv\",
        \"attribute_2\": \"lvcnhnoj\",
        \"attribute_3\": \"henhgpqh\"
    },
    \"shopify_id\": 37,
    \"shopify_inventory_item_id\": 29,
    \"updated_at\": 7
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1/variant/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'h',
            'price_in_cents' => 25,
            'original_price_in_cents' => 65,
            'cost_in_cents' => 38,
            'sku' => 'thlhsnou',
            'barcode' => 'zpipndpp',
            'dimensions' => [
                'length' => 1,
                'width' => 1,
                'height' => 1,
                'weight' => 1,
            ],
            'is_archived' => false,
            'attributes' => [
                'attribute_1' => 'tyskptqv',
                'attribute_2' => 'lvcnhnoj',
                'attribute_3' => 'henhgpqh',
            ],
            'shopify_id' => 37,
            'shopify_inventory_item_id' => 29,
            'updated_at' => 7,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1/variant/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "h",
    "price_in_cents": 25,
    "original_price_in_cents": 65,
    "cost_in_cents": 38,
    "sku": "thlhsnou",
    "barcode": "zpipndpp",
    "dimensions": {
        "length": 1,
        "width": 1,
        "height": 1,
        "weight": 1
    },
    "is_archived": false,
    "attributes": {
        "attribute_1": "tyskptqv",
        "attribute_2": "lvcnhnoj",
        "attribute_3": "henhgpqh"
    },
    "shopify_id": 37,
    "shopify_inventory_item_id": 29,
    "updated_at": 7
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 208,
        "product_id": 93,
        "name": null,
        "price": 76789,
        "original_price": 76789,
        "cost": 15358,
        "sku": "",
        "dimensions": {
            "length": 306.51,
            "width": 452.53,
            "height": 276.33,
            "weight": 86.27
        },
        "is_archived": false,
        "total_available_quantity": 10,
        "attributes": {
            "attribute_1": "DeepSkyBlue",
            "attribute_2": "L",
            "attribute_3": null
        },
        "barcode": null,
        "created_at": 1715982887925,
        "updated_at": 1715982887925,
        "dropship_details": null,
        "shopify_id": null,
        "shopify_inventory_item_id": null
    }
}
 

Example response (404, Variant not found):


null
 

Request   

PUT v1/{shop}/products/{product_id}/variant/{variant_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

variant_id   integer   

The ID of the variant. Example: 1

Body Parameters

name   string  optional  

Name of the variant. Must be between 1 and 255 characters. Example: h

price_in_cents   integer   

The current sale price in cents of the variant. Must be at least 0. Example: 25

original_price_in_cents   integer  optional  

The original/suggested price (SRP) in cents of the variant. Must be at least 0. Example: 65

cost_in_cents   integer   

The cost to acquire the variant in cents. Must be at least 0. Example: 38

sku   string   

A unique identifier for the variant. Must not be greater than 255 characters. Example: thlhsnou

barcode   string  optional  

Barcode for the variant, if available. Must not be greater than 255 characters. Example: zpipndpp

dimensions   object  optional  
length   number  optional  

The length of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

width   number  optional  

The width of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

height   number  optional  

The height of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

weight   number  optional  

The weight of the variant in ounces. Must be between 0 and 9999999999.99. Example: 1

is_archived   boolean   

Is the product archived or active. Example: false

attributes   object  optional  
attribute_1   string  optional  

Must not be greater than 128 characters. Example: tyskptqv

attribute_2   string  optional  

Must not be greater than 128 characters. Example: lvcnhnoj

attribute_3   string  optional  

Must not be greater than 128 characters. Example: henhgpqh

shopify_id   integer  optional  

The Shopify variant ID. Must be at least 0. Example: 37

shopify_inventory_item_id   integer  optional  

The Shopify inventory item ID. Must be at least 0. Example: 29

updated_at   integer  optional  

Example: 7

Response

Response Fields

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

barcode   Null or string   

Barcode if available

created_at   Null or int   

Unix timestamp in milliseconds of the creation date if available

updated_at   Null or int   

Unix timestamp in milliseconds of the last modified date if available

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

Partial update variant

requires authentication

Update an existing variant with only the changes sent.

Example request:
curl --request PATCH \
    "https://openapi.commentsold.com/v1/ullam/products/1/variant/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"h\",
    \"price_in_cents\": 25,
    \"original_price_in_cents\": 65,
    \"cost_in_cents\": 38,
    \"sku\": \"thlhsnou\",
    \"barcode\": \"zpipndpp\",
    \"dimensions\": {
        \"length\": 1,
        \"width\": 1,
        \"height\": 1,
        \"weight\": 1
    },
    \"is_archived\": false,
    \"attributes\": {
        \"attribute_1\": \"tyskptqv\",
        \"attribute_2\": \"lvcnhnoj\",
        \"attribute_3\": \"henhgpqh\"
    },
    \"shopify_id\": 37,
    \"shopify_inventory_item_id\": 29
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1/variant/1';
$response = $client->patch(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'h',
            'price_in_cents' => 25,
            'original_price_in_cents' => 65,
            'cost_in_cents' => 38,
            'sku' => 'thlhsnou',
            'barcode' => 'zpipndpp',
            'dimensions' => [
                'length' => 1,
                'width' => 1,
                'height' => 1,
                'weight' => 1,
            ],
            'is_archived' => false,
            'attributes' => [
                'attribute_1' => 'tyskptqv',
                'attribute_2' => 'lvcnhnoj',
                'attribute_3' => 'henhgpqh',
            ],
            'shopify_id' => 37,
            'shopify_inventory_item_id' => 29,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1/variant/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "h",
    "price_in_cents": 25,
    "original_price_in_cents": 65,
    "cost_in_cents": 38,
    "sku": "thlhsnou",
    "barcode": "zpipndpp",
    "dimensions": {
        "length": 1,
        "width": 1,
        "height": 1,
        "weight": 1
    },
    "is_archived": false,
    "attributes": {
        "attribute_1": "tyskptqv",
        "attribute_2": "lvcnhnoj",
        "attribute_3": "henhgpqh"
    },
    "shopify_id": 37,
    "shopify_inventory_item_id": 29
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 209,
        "product_id": 94,
        "name": null,
        "price": 22903,
        "original_price": 22903,
        "cost": 4581,
        "sku": "",
        "dimensions": {
            "length": 235.28,
            "width": 709.87,
            "height": 10.67,
            "weight": 126.27
        },
        "is_archived": false,
        "total_available_quantity": 10,
        "attributes": {
            "attribute_1": "Gold",
            "attribute_2": "S",
            "attribute_3": null
        },
        "barcode": null,
        "created_at": 1715982887955,
        "updated_at": 1715982887955,
        "dropship_details": null,
        "shopify_id": null,
        "shopify_inventory_item_id": null
    }
}
 

Example response (404, Variant not found):


null
 

Request   

PATCH v1/{shop}/products/{product_id}/variant/{variant_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

variant_id   integer   

The ID of the variant. Example: 1

Body Parameters

name   string  optional  

Name of the variant. Must be between 1 and 255 characters. Example: h

price_in_cents   integer  optional  

The current sale price in cents of the variant. Must be at least 0. Example: 25

original_price_in_cents   integer  optional  

The original/suggested price (SRP) in cents of the variant. Must be at least 0. Example: 65

cost_in_cents   integer  optional  

The cost to acquire the variant in cents. Must be at least 0. Example: 38

sku   string  optional  

A unique identifier for the variant. Must not be greater than 255 characters. Example: thlhsnou

barcode   string  optional  

Barcode for the variant, if available. Must not be greater than 255 characters. Example: zpipndpp

dimensions   object  optional  
length   number  optional  

The length of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

width   number  optional  

The width of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

height   number  optional  

The height of the variant in inches. Must be between 0 and 9999999999.99. Example: 1

weight   number  optional  

The weight of the variant in ounces. Must be between 0 and 9999999999.99. Example: 1

is_archived   boolean  optional  

Is the product archived or active. Example: false

attributes   object  optional  
attribute_1   string  optional  

Must not be greater than 128 characters. Example: tyskptqv

attribute_2   string  optional  

Must not be greater than 128 characters. Example: lvcnhnoj

attribute_3   string  optional  

Must not be greater than 128 characters. Example: henhgpqh

shopify_id   integer  optional  

The Shopify variant ID. Must be at least 0. Example: 37

shopify_inventory_item_id   integer  optional  

The Shopify inventory item ID. Must be at least 0. Example: 29

Response

Response Fields

id   integer   

The variant unique identifier.

product_id   integer   

The product unique identifier.

name   Null or string   

Name of the variant.

price   integer   

Price in cents.

original_price   integer   

MSRP in cents.

cost   integer   

Cost in cents.

sku   string   

SKU

dimensions   dimension   

The variant dimensions.

length   number   

The variant length (in inches).

width   number   

The variant width (in inches).

height   number   

The variant height (in inches).

weight   number   

The variant weight (in oz.).

is_archived   boolean   

Is the variant archived.

total_available_quantity   integer   

Total quantity available across all locations.

attributes   string[]   

An array of attributes.

attribute_1   Null or string   

Attribute 1 value.

attribute_2   Null or string   

Attribute 2 value.

attribute_3   Null or string   

Attribute 3 value.

barcode   Null or string   

Barcode if available

created_at   Null or int   

Unix timestamp in milliseconds of the creation date if available

updated_at   Null or int   

Unix timestamp in milliseconds of the last modified date if available

dropship_details   Null or object   

Dropship product details.

unit_cost   integer   

Dropship unit cost in cents.

partner_commission   integer   

Dropship partner commission in cents.

minimum_configurable_retail_price   integer   

Minimum configurable retail price in cents.

maximum_configurable_retail_price   integer   

Maximum configurable retail price in cents.

shopify_id   Null or int   

Shopify inventory id.

shopify_inventory_item_id   Null or int   

Shopify inventory item id.

Delete variant

requires authentication

Delete a variant on a product from the catalog (this has dire consequences)

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/products/1/variant/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/products/1/variant/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/products/1/variant/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200, success):


null
 

Example response (404, Variant not found):


null
 

Request   

DELETE v1/{shop}/products/{product_id}/variant/{variant_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

product_id   integer   

The ID of the product. Example: 1

variant_id   integer   

The ID of the variant. Example: 1

Product create page

requires authentication

Returns everything needed for the product create page.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/product-editor" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/product-editor';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/product-editor"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "settings": {
        "enabledIntegrationName": "Shopify",
        "tiktokIsConnected": false
    },
    "defaults": {
        "suggestedSku": "SKU-123"
    },
    "dropdownValues": {
        "previousColors": [
            null,
            "Aquamarine",
            "Black",
            "blue",
            "Brown",
            "Charcoal",
            "Chartreuse",
            "Chocolate",
            "Gold",
            "Ice",
            "Metal",
            "Navy",
            "Purple",
            "Red",
            "Rose",
            "Snow",
            "Soft blue",
            "Violet",
            "White",
            "Wood",
            "Yellow",
            "YellowGreen"
        ],
        "previousSizes": [
            null,
            "10",
            "11",
            "12",
            "13",
            "14",
            "L",
            "Large",
            "M",
            "M/L",
            "Medium",
            "S",
            "Small",
            "X-Large",
            "XL",
            "XS"
        ],
        "brands": [
            {
                "id": "Anderson Inc",
                "text": "Anderson Inc"
            },
            {
                "id": "Common Good",
                "text": "Common Good"
            }
        ],
        "categoriesTopLevel": [
            {
                "id": 1,
                "title": "Animals & Pet Supplies"
            },
            {
                "id": 126,
                "title": "Apparel & Accessories"
            },
            {
                "id": 366,
                "title": "Arts & Entertainment"
            },
            {
                "id": 866,
                "title": "Baby & Toddler"
            },
            {
                "id": 953,
                "title": "Business & Industrial"
            },
            {
                "id": 1177,
                "title": "Cameras & Optics"
            },
            {
                "id": 1281,
                "title": "Electronics"
            },
            {
                "id": 1699,
                "title": "Food, Beverages & Tobacco"
            },
            {
                "id": 2063,
                "title": "Furniture"
            },
            {
                "id": 2184,
                "title": "Hardware"
            },
            {
                "id": 2706,
                "title": "Health & Beauty"
            },
            {
                "id": 3052,
                "title": "Home & Garden"
            },
            {
                "id": 4087,
                "title": "Luggage & Bags"
            },
            {
                "id": 4109,
                "title": "Mature"
            },
            {
                "id": 4147,
                "title": "Media"
            },
            {
                "id": 4177,
                "title": "Office Supplies"
            },
            {
                "id": 4343,
                "title": "Religious & Ceremonial"
            },
            {
                "id": 4356,
                "title": "Software"
            },
            {
                "id": 4391,
                "title": "Sporting Goods"
            },
            {
                "id": 5192,
                "title": "Toys & Games"
            },
            {
                "id": 5366,
                "title": "Vehicles & Parts"
            }
        ],
        "recentProductCategories": [
            {
                "id": 2099,
                "title": "Furniture > Cabinets & Storage > Vanities"
            }
        ],
        "productTypes": []
    }
}
 

Request   

GET v1/{shop}/product-editor

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Response

Response Fields

settings   string[]   

Array of settings to be used.

enabledIntegrationName   string|Null   

The name of any third part integration enabled as the product source.

tiktokIsConnected   boolean   

Is TikTok connected for the shop.

defaults   string[]   

Array of default values to be used.

suggestedSku   string   

The suggested SKU for the product.

dropdownValues   string[]   

Array of values for the various drop down lists.

previousColors   string[]   

Array of previous colors used for other products.

previousSizes   string[]   

Array of previous sizes used for other products.

brands   string[]   

Array of brands.

categoriesTopLevel   string[]   

Array of top level categories.

recentProductCategories   string[]   

Array of recently used product categories.

productTypes   string[]   

Array of product types.

Product edit page

requires authentication

Returns everything needed for the product edit page

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/product-editor/ullam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/product-editor/ullam';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/product-editor/ullam"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "settings": {
        "enabledIntegrationName": "Shopify",
        "tiktokIsConnected": false
    },
    "defaults": {
        "suggestedSku": "SKU-123"
    },
    "dropdownValues": {
        "previousColors": [
            null,
            "Aquamarine",
            "Black",
            "blue",
            "Brown",
            "Charcoal",
            "Chartreuse",
            "Chocolate",
            "Gold",
            "Ice",
            "Metal",
            "Navy",
            "Purple",
            "Red",
            "Rose",
            "Snow",
            "Soft blue",
            "Violet",
            "White",
            "Wood",
            "Yellow",
            "YellowGreen"
        ],
        "previousSizes": [
            null,
            "10",
            "11",
            "12",
            "13",
            "14",
            "L",
            "Large",
            "M",
            "M/L",
            "Medium",
            "S",
            "Small",
            "X-Large",
            "XL",
            "XS"
        ],
        "brands": [
            {
                "id": "Anderson Inc",
                "text": "Anderson Inc"
            },
            {
                "id": "Common Good",
                "text": "Common Good"
            }
        ],
        "categoriesTopLevel": [
            {
                "id": 1,
                "title": "Animals & Pet Supplies"
            },
            {
                "id": 126,
                "title": "Apparel & Accessories"
            },
            {
                "id": 366,
                "title": "Arts & Entertainment"
            },
            {
                "id": 866,
                "title": "Baby & Toddler"
            },
            {
                "id": 953,
                "title": "Business & Industrial"
            },
            {
                "id": 1177,
                "title": "Cameras & Optics"
            },
            {
                "id": 1281,
                "title": "Electronics"
            },
            {
                "id": 1699,
                "title": "Food, Beverages & Tobacco"
            },
            {
                "id": 2063,
                "title": "Furniture"
            },
            {
                "id": 2184,
                "title": "Hardware"
            },
            {
                "id": 2706,
                "title": "Health & Beauty"
            },
            {
                "id": 3052,
                "title": "Home & Garden"
            },
            {
                "id": 4087,
                "title": "Luggage & Bags"
            },
            {
                "id": 4109,
                "title": "Mature"
            },
            {
                "id": 4147,
                "title": "Media"
            },
            {
                "id": 4177,
                "title": "Office Supplies"
            },
            {
                "id": 4343,
                "title": "Religious & Ceremonial"
            },
            {
                "id": 4356,
                "title": "Software"
            },
            {
                "id": 4391,
                "title": "Sporting Goods"
            },
            {
                "id": 5192,
                "title": "Toys & Games"
            },
            {
                "id": 5366,
                "title": "Vehicles & Parts"
            }
        ],
        "recentProductCategories": [
            {
                "id": 2099,
                "title": "Furniture > Cabinets & Storage > Vanities"
            }
        ],
        "productTypes": []
    },
    "product": {
        "id": 1,
        "productName": "My Test Product",
        "description": "Ut unde aperiam esse commodi laudantium. Voluptas nihil aperiam explicabo rerum mollitia cupiditate dolorem sed minima. Vero quia fuga omnis excepturi totam est laboriosam. Id blanditiis quo soluta voluptates ratione at. z",
        "appDescription": "Ut unde aperiam esse commodi laudantium. Voluptas nihil aperiam explicabo rerum mollitia cupiditate dolorem sed minima. Vero quia fuga omnis excepturi totam est laboriosam. Id blanditiis quo soluta voluptates ratione at. z",
        "style": "001-Z",
        "brand": "Common Good",
        "brandStyle": "",
        "createdAt": "2018-08-01T21:26:29.000000Z",
        "archivedAt": null,
        "updatedAt": "2023-04-04T23:28:51.000000Z",
        "storeDescription": "Ut unde aperiam esse commodi laudantium. Voluptas nihil aperiam explicabo rerum mollitia cupiditate dolorem sed minima. Vero quia fuga omnis excepturi totam est laboriosam. Id blanditiis quo soluta voluptates ratione at. z",
        "publishProduct": true,
        "publishedAt": 1548798685,
        "url": "my-test-product",
        "chargeTaxes": null,
        "taxCode": null,
        "productType": null,
        "receivedProduct": true,
        "lastReceivedAt": null,
        "shippingPrice": null,
        "note": "",
        "lowStockLimit": null,
        "lowStockAdminId": null,
        "lowStockNotifiedAt": null,
        "splitByType": null,
        "warehouseLocationId": null,
        "adminId": null,
        "productAddons": [],
        "finalSaleSetAt": null,
        "lightspeedMatrixId": null,
        "hideOnWaitlist": false,
        "videoUrl": null,
        "isBestSelling": 0,
        "badge": "",
        "isDeletable": true,
        "isLiveSelection": false,
        "freeGiftCustomerSpendMin": null,
        "totalInventoryQuantity": 12,
        "totalPotentialRevenue": 468,
        "potentialRevenue": 468,
        "inventoryCountUser": "Unknown Team Member",
        "splitPayFee": 0,
        "notificationTitle": null,
        "notificationBody": null,
        "isFpfsProduct": true,
        "mainProductId": null,
        "addonsEnabled": false,
        "hasFeaturedVideo": false,
        "featuredVideoSource": null,
        "excludeVideo": false,
        "imageFilename": "https://placehold.co/600x400",
        "videoFilename": null,
        "appImage": {
            "id": 1,
            "productId": 1,
            "inventoryId": null,
            "filename": "https://placehold.co/600x400",
            "isMain": true,
            "createdAt": "2018-08-01T21:26:29.000000Z",
            "updatedAt": "2022-11-16T23:10:09.000000Z",
            "position": null,
            "imageWidth": 600,
            "imageHeight": 400,
            "isFacebook": false,
            "isApp": true,
            "isStore": true
        },
        "storeImage": {
            "id": 1,
            "productId": 1,
            "inventoryId": null,
            "filename": "https://placehold.co/600x400",
            "isMain": true,
            "createdAt": "2018-08-01T21:26:29.000000Z",
            "updatedAt": "2022-11-16T23:10:09.000000Z",
            "position": null,
            "imageWidth": 600,
            "imageHeight": 400,
            "isFacebook": false,
            "isApp": true,
            "isStore": true
        },
        "facebookImage": {
            "id": 1,
            "productId": 1,
            "inventoryId": null,
            "filename": "https://placehold.co/600x400",
            "isMain": true,
            "createdAt": "2018-08-01T21:26:29.000000Z",
            "updatedAt": "2022-11-16T23:10:09.000000Z",
            "position": null,
            "imageWidth": 600,
            "imageHeight": 400,
            "isFacebook": false,
            "isApp": true,
            "isStore": true
        },
        "hasVideo": false,
        "featuredLiveSaleProductId": null,
        "variants": [
            {
                "id": 1,
                "productId": 1,
                "quantity": 0,
                "color": "Black",
                "size": "Large",
                "weight": "0.00",
                "price": 39,
                "salePrice": 0,
                "wholesalePrice": 0,
                "cost": 7,
                "location": "",
                "sku": "001-Z-Black-Large",
                "length": 0,
                "width": 0,
                "height": 0,
                "minWholesaleQty": null,
                "position": null,
                "note": "",
                "externalQuantityDiff": 0,
                "quantityUpdatedAt": "2022-11-11T02:26:24.000000Z",
                "archivedAt": null,
                "received": true,
                "lastReceivedAt": null,
                "held": null,
                "minimumPrice": null,
                "productName": "My Test Product",
                "productType": null,
                "customBarcode": "i-41784",
                "attr1": "Black",
                "attr2": "Large",
                "attr3": null,
                "shopifyAllowOversell": false
            }
        ],
        "isFreeGift": false,
        "videoThumbnailUrl": null,
        "externalId": null,
        "productPath": null,
        "splitSize": null,
        "splitColor": null,
        "attr1DisplayName": "Color",
        "attr2DisplayName": "Size",
        "attr3DisplayName": ""
    }
}
 

Request   

GET v1/{shop}/product-editor/{productId}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

productId   string   

Example: ullam

Response

Response Fields

settings   string[]   

Array of settings to be used.

enabledIntegrationName   string|Null   

The name of any third part integration enabled as the product source.

tiktokIsConnected   boolean   

Is TikTok connected for the shop.

defaults   string[]   

Array of default values to be used.

suggestedSku   string   

The suggested SKU for the product.

dropdownValues   string[]   

Array of values for the various drop down lists.

previousColors   string[]   

Array of previous colors used for other products.

previousSizes   string[]   

Array of previous sizes used for other products.

brands   string[]   

Array of brands.

categoriesTopLevel   string[]   

Array of top level categories.

recentProductCategories   string[]   

Array of recently used product categories.

productTypes   string[]   

Array of product types.

product   ProductDTO   

All the product data along with variants and images.

Reservation

Reservation

Get paginated reservations list

requires authentication

Returns a paginated list of reservations.

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/reservations?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filter\": \"[{\\\"search\\\": \\\"customer_id\\\", \\\"op\\\": \\\"=\\\", \\\"value\\\": 123}]\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/reservations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
        'json' => [
            'filter' => '[{"search": "customer_id", "op": "=", "value": 123}]',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/reservations"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": "[{\"search\": \"customer_id\", \"op\": \"=\", \"value\": 123}]"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "customer_id": 18,
            "external_customer_id": null,
            "variant_id": 213,
            "created_at": 1715982888,
            "updated_at": 1715982888
        },
        {
            "id": 2,
            "customer_id": 19,
            "external_customer_id": null,
            "variant_id": 214,
            "created_at": 1715982888,
            "updated_at": 1715982888
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

GET v1/{shop}/reservations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Body Parameters

filter   string  optional  

An optional array of filters. Each entry should be a JSON object containing: {"search": keyValue, "op": comparisonOperator, "value": valueToCompareAgainst} Valid search values are: id, customer_id, external_customer_id, variant_id, created_at, updated_at. Valid comparisons are =, !=, <, <=, >, >=, contains, starts_with, ends_with. Valid values to search are strings or integers. Example: [{"search": "customer_id", "op": "=", "value": 123}]

Response

Response Fields

id   integer   

The reservation unique identifier.

customer_id   integer   

The customer's unique identifier.

external_customer_id   Null or string   

The customer's unique identifier in an external system.

variant_id   integer   

The reserved product variant's unique identifier.

created_at   integer   

Unix timestamp in seconds of the creation date

updated_at   integer   

Unix timestamp in seconds of the last modified date

Reserve an item

requires authentication

Reserve an item. Returns an array of CommentSold reservation ids

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/reservations" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"variant_id\": 28,
    \"customer_id\": 123,
    \"external_customer_id\": \"AA743AB\",
    \"quantity\": 26,
    \"do_not_hold\": true,
    \"meta\": {
        \"experience\": \"live\",
        \"source\": \"organic\"
    }
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/reservations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'variant_id' => 28,
            'customer_id' => 123,
            'external_customer_id' => 'AA743AB',
            'quantity' => 26,
            'do_not_hold' => true,
            'meta' => [
                'experience' => 'live',
                'source' => 'organic',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/reservations"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "variant_id": 28,
    "customer_id": 123,
    "external_customer_id": "AA743AB",
    "quantity": 26,
    "do_not_hold": true,
    "meta": {
        "experience": "live",
        "source": "organic"
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, An array of CommentSold reservation ids):


[
    13,
    14
]
 

Request   

POST v1/{shop}/reservations

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

variant_id   integer   

Variant id in CommentSold. Must be at least 1. Example: 28

customer_id   integer  optional  

Customer id in CommentSold. (one of customer_id or external_customer_id is required). This field is required when external_customer_id is not present. Must be at least 1. Example: 123

external_customer_id   string  optional  

Customer id in the external system. (one of customer_id or external_customer_id is required). This field is required when customer_id is not present. Must be at least 1 character. Example: AA743AB

quantity   integer   

Quantity of items requested. Must be at least 1. Example: 26

do_not_hold   boolean  optional  

If true, the item will not be held for the customer. It will not affect the quantity of the item in inventory or guarantee the item will be available for the customer. If omitted, defaults to false. Example: true

meta   object  optional  
experience   string  optional  

Where the reservation originated from. Example: live

Must be one of:
  • live
  • live_replay
source   string  optional  

Where the customer's session originated from. Example: organic

Must be one of:
  • organic
  • push
  • ad
  • share
  • email
  • qr
  • tiktok
  • emailrecommendation

Cancel a reservation

requires authentication

Cancel a reservation.

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/reservations/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/reservations/7';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/reservations/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200, success):


null
 

Request   

DELETE v1/{shop}/reservations/{reservation_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

reservation_id   integer   

The ID of the reservation. Example: 7

Cancel a reservation by variant

requires authentication

Cancel reservation(s) for the specified variant. (Not returned back to stock. Not recommended)

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/reservations/variant/1?quantity=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/reservations/variant/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'quantity' => '7',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/reservations/variant/1"
);

const params = {
    "quantity": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200, An array of CommentSold reservation ids that were deleted. Check to verify the expected amount was deleted):


[
    13,
    14
]
 

Request   

DELETE v1/{shop}/reservations/variant/{variant_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

variant_id   integer   

The ID of the variant. Example: 1

Query Parameters

quantity   integer  optional  

Amount of reservations to remove. Default is 1 Example: 7

Shipping

Estimate shipping cost.

Shipping Calculation

requires authentication

Calculate the estimated shipping price for a group of variants.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/shipping_calculator" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"variant_ids\": [
        7
    ],
    \"shipping_method\": \"standard\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/shipping_calculator';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'variant_ids' => [
                7,
            ],
            'shipping_method' => 'standard',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/shipping_calculator"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "variant_ids": [
        7
    ],
    "shipping_method": "standard"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Estimated cost to ship a group of variants.):


{
    "shipping_fee": 1999
}
 

Example response (400, Provided variants are not from the same supplier.):


{
    "message": "The provided product variants were not all associated with the same supplier."
}
 

Request   

POST v1/{shop}/shipping_calculator

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

variant_ids   integer[]   
shipping_method   string  optional  

The desired shipping method. The options are "standard" or "expedited". Example: standard

Must be one of:
  • standard
  • expedited

Tax

Tax calculations

Calculate Tax

requires authentication

Partner Token

Calculate taxes.

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/quote" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"authorization\": {
        \"company_name\": \"ullam\",
        \"username\": \"ullam\",
        \"password\": \";dIi=K:dQV\",
        \"company_code\": \"COMMENTSOLD\"
    },
    \"from_address\": {
        \"street_address\": \"hhslthlh\",
        \"city\": \"snouzpip\",
        \"state\": \"ndpprqsr\",
        \"zip\": \"42755-7953\",
        \"country_code\": \"pn\"
    },
    \"shipping\": {
        \"local_pickup\": true,
        \"cost_in_cents\": 25,
        \"tax_code\": \"FR\"
    },
    \"to_address\": {
        \"street_address\": \"slthlhsn\",
        \"apartment\": \"ouzpipnd\",
        \"city\": \"pprqsrlt\",
        \"state\": \"yskptqvl\",
        \"zip\": \"42755-7953\",
        \"country_code\": \"pn\"
    },
    \"customer\": {
        \"tax_exempt\": true,
        \"id\": \"ullam\"
    },
    \"line_items\": [
        \"ullam\"
    ],
    \"discount_total\": 25
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/quote';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'authorization' => [
                'company_name' => 'ullam',
                'username' => 'ullam',
                'password' => ';dIi=K:dQV',
                'company_code' => 'COMMENTSOLD',
            ],
            'from_address' => [
                'street_address' => 'hhslthlh',
                'city' => 'snouzpip',
                'state' => 'ndpprqsr',
                'zip' => '42755-7953',
                'country_code' => 'pn',
            ],
            'shipping' => [
                'local_pickup' => true,
                'cost_in_cents' => 25,
                'tax_code' => 'FR',
            ],
            'to_address' => [
                'street_address' => 'slthlhsn',
                'apartment' => 'ouzpipnd',
                'city' => 'pprqsrlt',
                'state' => 'yskptqvl',
                'zip' => '42755-7953',
                'country_code' => 'pn',
            ],
            'customer' => [
                'tax_exempt' => true,
                'id' => 'ullam',
            ],
            'line_items' => [
                'ullam',
            ],
            'discount_total' => 25,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/quote"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "authorization": {
        "company_name": "ullam",
        "username": "ullam",
        "password": ";dIi=K:dQV",
        "company_code": "COMMENTSOLD"
    },
    "from_address": {
        "street_address": "hhslthlh",
        "city": "snouzpip",
        "state": "ndpprqsr",
        "zip": "42755-7953",
        "country_code": "pn"
    },
    "shipping": {
        "local_pickup": true,
        "cost_in_cents": 25,
        "tax_code": "FR"
    },
    "to_address": {
        "street_address": "slthlhsn",
        "apartment": "ouzpipnd",
        "city": "pprqsrlt",
        "state": "yskptqvl",
        "zip": "42755-7953",
        "country_code": "pn"
    },
    "customer": {
        "tax_exempt": true,
        "id": "ullam"
    },
    "line_items": [
        "ullam"
    ],
    "discount_total": 25
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "tax_total": 525,
    "taxable_amount": 7500,
    "details": [
        {
            "tax_name": "State",
            "amount": 450,
            "rate": 0.06,
            "flat_rate": false
        },
        {
            "tax_name": "County",
            "amount": 0,
            "rate": 0,
            "flat_rate": false
        },
        {
            "tax_name": "City",
            "amount": 75,
            "rate": 0.01,
            "flat_rate": false
        }
    ],
    "source": "Avalara",
    "lines": [
        {
            "sku": "SKU5000",
            "tax_amount": 350,
            "taxable_amount": 5000,
            "details": [
                {
                    "tax_name": "State",
                    "amount": 300,
                    "rate": 0.06,
                    "flat_rate": false
                },
                {
                    "tax_name": "County",
                    "amount": 0,
                    "rate": 0,
                    "flat_rate": false
                },
                {
                    "tax_name": "City",
                    "amount": 50,
                    "rate": 0.01,
                    "flat_rate": false
                }
            ]
        },
        {
            "sku": "Shipping",
            "tax_amount": 175,
            "taxable_amount": 2500,
            "details": [
                {
                    "tax_name": "State",
                    "amount": 150,
                    "rate": 0.06,
                    "flat_rate": false
                },
                {
                    "tax_name": "County",
                    "amount": 0,
                    "rate": 0,
                    "flat_rate": false
                },
                {
                    "tax_name": "City",
                    "amount": 25,
                    "rate": 0.01,
                    "flat_rate": false
                }
            ]
        }
    ]
}
 

Request   

POST v1/quote

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

authorization   object   
company_name   string   

Seller or company name. Example: ullam

username   string   

A valid username for the tax microservice. Example: ullam

password   string   

A valid password for the tax microservice. Example: ;dIi=K:dQV

company_code   string   

A valid password for the tax microservice. Example: COMMENTSOLD

from_address   object   

Address the item(s) are being shipped from.

street_address   string   

Must not be greater than 255 characters. Example: hhslthlh

city   string   

Must not be greater than 255 characters. Example: snouzpip

state   string   

Must not be greater than 100 characters. Example: ndpprqsr

zip   string   

Must match the regex /^\d{5}(-\d{4})?$/. Example: 42755-7953

country_code   string   

Must be 2 characters. Example: pn

shipping   object   

Shipping information.

local_pickup   boolean   

Whether the item(s) are being locally picked up (not shipped). Example: true

cost_in_cents   integer   

Must be at least 0. Example: 25

tax_code   string  optional  

System or Custom Tax Code. You can use your own tax code mapping or standard Avalara tax codes. Example: FR

to_address   object  optional  

Address the item(s) are being shipped to. Required unless shiping.local_pickup is true. This field is required when local_pickup is false.

street_address   string  optional  

This field is required when local_pickup is false. Must not be greater than 255 characters. Example: slthlhsn

apartment   string  optional  

Must not be greater than 100 characters. Example: ouzpipnd

city   string  optional  

This field is required when local_pickup is false. Must not be greater than 255 characters. Example: pprqsrlt

state   string  optional  

This field is required when local_pickup is false. Must not be greater than 100 characters. Example: yskptqvl

zip   string  optional  

This field is required when local_pickup is false. Must match the regex /^\d{5}(-\d{4})?$/. Example: 42755-7953

country_code   string  optional  

This field is required when local_pickup is false. Must be 2 characters. Example: pn

customer   object   

Customer information.

tax_exempt   boolean   

Set true for tax-exempt customers. Example: true

id   string   

Customer's id for reference. For numeric ids, send a numeric string. Example: ullam

line_items   integer[]   

An array of line-items being quoted. Do not include tax, shipping, or discount as line items.

quantity   integer   

Must be at least 1. Example: 65

price_in_cents   integer   

Must be at least 0. Example: 38

tax_code   string   

System or Custom Tax Code. You can use your own tax code mapping or standard Avalara tax codes. Example: PC040100

sku   string   

Must be between 1 and 50 characters. Example: t

description   string   

Example: Veniam porro molestiae assumenda nemo qui.

discount_total   integer   

The total discount amount applied in cents. Set to zero if no discount. Must be at least 0. Example: 25

Webhooks

To receive webhooks you will need to subscribe to the applicable topic(s). Webhooks are sent a total of up to 12 times over ~28 hours until we receive a 200 response.

Webhook Backoff Timing
  • 1 second
  • 15 seconds
  • 1 minute
  • 2 minutes
  • 5 minutes
  • 15 minutes
  • 30 minutes
  • 1 hour
  • 2 hours
  • 4 hours
  • 8 hours
  • 12 hours

Webhook Validation

UUID

Each webhook will include a header named 'uuid'. The UUID will be the same each time the same webhook is sent (in the case of a non 200 response). If you have already processed a webhook with the given UUID then you should not process it again.

Signature

A header called Signature will contain a signature the receiving app can use to confirm the payload hasn't been tampered with. This is how that signature is calculated:

    $payloadJson = json_encode($payload);

    $signature = hash_hmac('sha256', $payloadJson, $secret);

Webhook Topics

product_created
Fires when a product is created in the catalog.

Payload
        {
            "topic": "product_created",
            "shop": "ShopName",
            "data" : {
                "id": 106,
                "name": "Glowing Calculator",
                "description": "Some product description",
                "style": "zcinkn",
                "brand": "10",
                "charge_taxes": false,
                "tax_code": null,
                "shipping_price": null,
                "is_archived": false,
                "quantity_per_user_limit: null,
                "quantity_per_stream_per_user_limit: null,
                "created_at": "1685998161",
                "updated_at": "1685998161"
                "shop_favorite": false,
                "attribute_names": {
                    "attribute_1": "Color",
                    "attribute_2": "Size",
                    "attribute_3": "Weight"
                },
                "main_image": {
                    "id": 1,
                    "url": "http://example.com",
                    "width": 100,
                    "height": 100
                },
                "additional_images": [
                    {
                        "id": 2,
                        "url": "http://example.com",
                        "width": 100,
                        "height": 100
                    }
                ],
                "tags": [
                    "tag1",
                    "tag2"
                ],
                "category": {
                  "id": 3,
                  "title": "Pet Supplies",
                  "full_path": "Animals & Pet Supplies > Pet Supplies"
                },
                "variants": [
                    {
                        "id": 208,
                        "product_id": 106,
                        "name": "Glowing Calculator",
                        "color": "LightSeaGreen",
                        "size": "S",
                        "weight": "132.67",
                        "price": 15355,
                        "original_price": 15355,
                        "sale_price": null,
                        "cost": 3071,
                        "sku": null,
                        "is_archived": false,
                        "is_received": true,
                        "dimensions": {
                            "length": 1.5,
                            "width": 1.5,
                            "height": 1.5,
                            "weight": 1.5
                        },
                        "total_available_quantity": 12,
                        "attributes": {
                            "attribute_1": "LightSeaGreen",
                            "attribute_2": "S",
                            "attribute_3": "132.67"
                        },
                        "barcode": null,
                        "created_at": "1685998161",
                        "updated_at": "1685998161",
                        "dropship_details": {
                            "partner_id": 1,
                            "partner_name": "Partner Name",
                            "supplier_id": 1,
                            "supplier_name": "Supplier Name",
                            "unit_cost": 1000,
                            "partner_commission": 1000,
                            "minimum_configurable_retail_price": 1000,
                            "maximum_configurable_retail_price": 1000
                        },
                        "shopify_id": null,
                        "shopify_inventory_item_id": null
                    }
                ],
                "shopify_id": null,
            },
            "source": "CommentSold"
        }
        

product_updated
Fires when a product or a variant is updated in the catalog.

Payload
        {
            "topic": "product_updated",
            "shop": "ShopName",
            "data" : {
                "id": 106,
                "name": "Glowing Calculator",
                "description": "Some product description",
                "style": "zcinkn",
                "brand": "10",
                "charge_taxes": false,
                "tax_code": null,
                "shipping_price": null,
                "is_archived": false,
                "quantity_per_user_limit: null,
                "quantity_per_stream_per_user_limit: null,
                "created_at": "1685998161",
                "updated_at": "1685998161"
                "shop_favorite": false,
                "attribute_names": {
                    "attribute_1": "Color",
                    "attribute_2": "Size",
                    "attribute_3": "Weight"
                },
                "main_image": {
                    "id": 1,
                    "url": "http://example.com",
                    "width": 100,
                    "height": 100
                },
                "additional_images": [
                    {
                        "id": 2,
                        "url": "http://example.com",
                        "width": 100,
                        "height": 100
                    }
                ],
                "tags": [
                    "tag1",
                    "tag2"
                ],
                "category": {
                  "id": 3,
                  "title": "Pet Supplies",
                  "full_path": "Animals & Pet Supplies > Pet Supplies"
                },
                "variants": [
                    {
                        "id": 208,
                        "product_id": 106,
                        "name": "Glowing Calculator",
                        "color": "LightSeaGreen",
                        "size": "S",
                        "weight": "132.67",
                        "price": 15355,
                        "original_price": 15355,
                        "sale_price": null,
                        "cost": 3071,
                        "sku": null,
                        "is_archived": false,
                        "is_received": true,
                        "dimensions": {
                            "length": 1.5,
                            "width": 1.5,
                            "height": 1.5,
                            "weight": 1.5
                        },
                        "total_available_quantity": 12,
                        "attributes": {
                            "attribute_1": "LightSeaGreen",
                            "attribute_2": "S",
                            "attribute_3": "132.67"
                        },
                        "barcode": null,
                        "created_at": "1685998161",
                        "updated_at": "1685998161",
                        "dropship_details": {
                            "partner_id": 1,
                            "partner_name": "Partner Name",
                            "supplier_id": 1,
                            "supplier_name": "Supplier Name",
                            "unit_cost": 1000,
                            "partner_commission": 1000,
                            "minimum_configurable_retail_price": 1000,
                            "maximum_configurable_retail_price": 1000
                        },
                        "shopify_id": null,
                        "shopify_inventory_item_id": null
                    }
                ],
                "shopify_id": null,
            },
            "source": "CommentSold"
        }
        

product_deleted
Fires when a product is created in the catalog.

Payload
        {
            "topic": "product_deleted",
            "shop": "ShopName",
            "data": {
              "id": 123,
              "deleted_at": "1685998161",
            },
            "source": "CommentSold"
        }
        

order_fulfilled
Fires when any line items from an order have been shipped.

Payload
        {
            "topic": "order_fulfilled",
            "shop": "ShopName",
            "data": {
                "shop" : "ShopName",
                "provider": "USPS"
                "fulfilled_at" : "1685998161",
                "tracking_number" : "9261299991099834284833",
                "tracking_url" : "https://tools.usps.com/go/TrackConfirmAction?tLabels=9261299991099834284833",
                "line_items" : [
                    {
                        "order_id" : 123,
                        "variants" : [
                            {
                                "quantity" : 1,
                                "variant_id" : 72,
                            },
                            {
                                "quantity" : 2,
                                "variant_id" : 134,
                            }
                        ],
                    },
                    {
                        "order_id" : 13,
                        "variants" : [
                            {
                                "quantity" : 1,
                                "variant_id" : 44,
                            },
                        ],
                    },
                ]
            },
            "source": "CommentSold"
        }
        

order_created
Fires when an order is created in Commentsold.

Payload
        {
          "shop": "ShopName",
          "topic": "order_created",
          "data": {
            "id": 23363,
            "customer_id": 4,
            "status": "Paid",
            "shipping_address": {
              "name": "Will Breitenberg",
              "street_address": "2488 Kaylah Inlet",
              "apartment": "10",
              "city": "North Maverick",
              "state": "Alabama",
              "zip": "34707",
              "country_code": "US"
            },
            "payment": {
              "amount": 3800,
              "subtotal": 3400,
              "shipping": 400,
              "taxes": null,
              "coupon_discount": null,
              "balance_applied": null,
              "total": 3800,
              "payment_ref": "ADMIN",
              "transaction_id": null,
              "payment_date": 1715369857,
              "coupon_code": null
            },
            "fulfillment": {
              "local_pickup": false,
              "v1": {
                "tracking_number": null,
                "shipped_date": null,
                "label_url": null
              },
              "shipping_labels": null
            },
            "fulfill_by": "ShopName",
            "created_at": 1715369857,
            "updated_at": 1715369859,
            "line_items": [
              {
                "id": 2527,
                "product_id": 529,
                "variant_id": 1820,
                "price": 600,
                "created_at": 1715369857,
                "is_returned": false
              },
              {
                "id": 2530,
                "product_id": 87,
                "variant_id": 220,
                "price": 400,
                "created_at": 1715369857,
                "is_returned": false
              }
            ],
            "order_note": ""
          },
          "source": "CommentSold"
        }
        

inventory_level_updated
Fires when the available quantity of a variant changes.

Payload
        {
            "topic": "inventory_level_updated",
            "shop": "ShopName",
            "data": {
                "variant_id" : 123,
                "total_available_quantity" : 12,
                "quantity_updated_at": "1686234364.123",
            },
            "source": "CommentSold"
        }
        

Get a list of webhooks subscribed to

requires authentication

Returns a paginated collection of Webhooks (list format)

Example request:
curl --request GET \
    --get "https://openapi.commentsold.com/v1/ullam/webhooks?page=7&perPage=7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/webhooks';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'page' => '7',
            'perPage' => '7',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/webhooks"
);

const params = {
    "page": "7",
    "perPage": "7",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "topic": "product_created",
            "url": "http://www.raynor.com/nemo-qui-ad-quisquam-excepturi-sunt-dolor-voluptatibus"
        },
        {
            "id": 2,
            "topic": "product_created",
            "url": "http://www.hamill.com/eos-id-mollitia-distinctio-et-qui-tempore.html"
        }
    ],
    "pagination": {
        "total": 72,
        "count": 2,
        "perPage": 10,
        "currentPage": 1,
        "totalPages": 7
    }
}
 

Request   

GET v1/{shop}/webhooks

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Query Parameters

page   integer   

Page index Example: 7

perPage   integer  optional  

Number of items per page. Default 15. Example: 7

Response

Response Fields

id   integer   

The webhook subscription unique identifier.

topic   string   

The topic the webhook is subscribing to.

url   string   

The URL the webhook will send to.

Subscribe to Webhook

requires authentication

Subscribe to a Webhook topic

Example request:
curl --request POST \
    "https://openapi.commentsold.com/v1/ullam/webhooks" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"topic\": \"product_updated\",
    \"url\": \"http:\\/\\/www.goyette.info\\/assumenda-nemo-qui-ad-quisquam-excepturi\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/webhooks';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'topic' => 'product_updated',
            'url' => 'http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/webhooks"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "topic": "product_updated",
    "url": "http:\/\/www.goyette.info\/assumenda-nemo-qui-ad-quisquam-excepturi"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 3,
        "topic": "product_created",
        "url": "http://www.satterfield.org/voluptatem-culpa-occaecati-eos-id-mollitia-distinctio.html"
    }
}
 

Request   

POST v1/{shop}/webhooks

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

Body Parameters

topic   string   

Example: product_updated

Must be one of:
  • product_created
  • product_updated
  • product_deleted
  • inventory_level_updated
  • order_fulfilled
  • order_created
url   string   

Must be a valid URL. Example: http://www.goyette.info/assumenda-nemo-qui-ad-quisquam-excepturi

Response

Response Fields

id   integer   

The webhook subscription unique identifier.

topic   string   

The topic the webhook is subscribing to.

url   string   

The URL the webhook will send to.

Unsubscribe to Webhook

requires authentication

Unsubscribe to a Webhook

Example request:
curl --request DELETE \
    "https://openapi.commentsold.com/v1/ullam/webhooks/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://openapi.commentsold.com/v1/ullam/webhooks/7';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://openapi.commentsold.com/v1/ullam/webhooks/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


null
 

Request   

DELETE v1/{shop}/webhooks/{subscription_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

shop   string   

Example: ullam

subscription_id   integer   

The ID of the subscription. Example: 7