Syncing catalog via API

To synchronise products, you need a catalogId to push to. In most integrations, this will be created on your behalf by your Technical Account Manager. Once a catalog is created, your Technical Account Manager needs to make it visible within your CitrusAd portal.

Catalog creation context

Below is an example context for creating a catalog:

POST $BASE_URL/v1/catalogs HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "catalogs": [
        {
            "name": "Retailer A"
        }
    ]
}

If successful, the following object will be returned:

{
    "catalogs": [
        {
            "teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
            "name": "Retailer A",
            "id": "216af452-d219-4807-b8ca-578bba446541"
        }
    ]
}

❗️

Once an object is successfully returned, you will receive an id for your new catalog. If you submit the same request again, you will receive a new id, creating two catalogs.

📘

You will need this id for product syncing.

Creating multiple catalogs

If you are creating multiple catalogs, you can sequence up to 100 per request. Below is an example context for creating two catalogs:

POST $BASE_URL/v1/catalogs HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
    "catalogs": [
        {
            "name": "Retailer A"
        },
        {
            "name": "Retailer B"
        }
    ]
}

If successful, the following object will be returned (each catalog will have its own individual id):

{
    "catalogs": [
        {
            "teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
            "name": "Retailer A",
            "id": "216af452-d219-4807-b8ca-578bba446541"
        },
        {
            "teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
            "name": "Retailer B",
            "id": "75047339-65f5-41b8-8f2c-e76b04716cd4"
        }
    ]
}

🚧

A catalog is hidden by default once it’s been created. Contact your Technical Account Manager to have your catalog made visible on your namespace.