Syncing Catalog Via API

Catalog Creation Context

Below is an example context for creating a catalog:

HTTP
cURL
HTTP
POST $BASE_URL/v1/catalogs?teamId=your_teamId_goes_here HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic your_api_key_goes_here
{
"catalogs": [
{
"teamId": "your_teamId_goes_here:",
"name": "catalog_name_goes_here"
}
]
}
cURL
curl -iX POST "$BASE_URL/v1/catalogs?teamId=your_teamId_goes_here" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic your_api_key_goes_here" \
-d \
'{
"catalogs": [
{
"teamId": "your_teamId_goes_here:",
"name": "Second Test Catalog"
}
]
}'

If successful, you will get the following object returned:

HTTP
cURL
HTTP
HTTP/2 200
{
"catalogs":
[
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
}
]
}
cURL
{
"catalogs":
[
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
}
]
}

A mock version can be seen below:

Untitled
cURL
POST $BASE_URL/v1/catalogs?teamId=44d25f70-b520-40de-8329-0781a9ebcdc8 HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8
{
"catalogs": [
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer A Catalog"
}
]
}
cURL
curl -iX POST "$BASE_URL/v1/catalogs?teamId=44d25f70-b520-40de-8329-0781a9ebcdc8" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: 4ww25f70-b52s-40de-8f29-07b139b5cdc8" \
-d \
'{
"catalogs": [
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer Catalog"
}
]
}'

If successful, you will see this:

HTTP
cURL
HTTP
HTTP/2 200
{
"catalogs":
[
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer A Catalog",
"id":"628dbe95-2ec9-4e07-881d-3e9f92ab2e0b"
}
]
}
cURL
{
"catalogs":
[
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer A Catalog",
"id":"628dbe95-2ec9-4e07-881d-3e9f92ab2e0b"
}
]
}

Once you receive a successful object returned, you will receive an id of your new catalog. If you submit the same request again, you will receive a new id, creating 2 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 3 catalogs, the teamId will remain the same for all catalogs:

HTTP
cURL
HTTP
POST $BASE_URL/v1/catalogs?teamId=your_teamId_goes_here HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic your_api_key_goes_here
{
"catalogs": [
{
"teamId": "your_teamId_goes_here:",
"name": "catalog_name_goes_here"
},
{
"teamId": "your_teamId_goes_here:",
"name": "catalog_name_goes_here"
},
{
"teamId": "your_teamId_goes_here:",
"name": "catalog_name_goes_here"
}
]
}
cURL
curl -iX POST "$BASE_URL/v1/catalogs?teamId=your_teamId_goes_here" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic your_api_key_goes_here" \
-d \
'
{
"catalogs": [
{
"teamId": "your_teamId_goes_here:",
"name": "catalog_name_goes_here"
},
{
"teamId": "your_teamId_goes_here:",
"name": "catalog_name_goes_here"
},
{
"teamId": "your_teamId_goes_here:",
"name": "catalog_name_goes_here"
}
]
}'

If successful, you will get the following object returned, each catalog will have its own individual id:

HTTP
cURL
HTTP
HTTP/2 200
{
"catalogs":
[
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
},
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
},
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
}
]
}
cURL
{
"catalogs":
[
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
},
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
},
{
"teamId":"your_teamId_goes_here:",
"name":"catalog_name_goes_here",
"id":"NewCatalogID"
}
]
}

A mock version can be seen below:

HTTP
cURL
HTTP
POST $BASE_URL/v1/catalogs?teamId=44d25f70-b520-40de-8329-0781a9ebcdc8 HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8
{
"catalogs": [
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer A Catalog"
},
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer B Catalog"
},
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer C Catalog"
}
]
}
cURL
curl -iX POST "$BASE_URL/v1/catalogs?teamId=44d25f70-b520-40de-8329-0781a9ebcdc8" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: 4ww25f70-b52s-40de-8f29-07b139b5cdc8" \
-d \
'{
"catalogs": [
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer A Catalog"
},
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer B Catalog"
},
{
"teamId": "4ww25f70-b52s-40de-8f29-07b139b5cdc8",
"name": "Retailer C Catalog"
}
]
}'

If successful, you will see this:

HTTP
cURL
HTTP
HTTP/2 200
{
"catalogs":
[
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer A Catalog",
"id":"628dbe95-2ec9-4e07-881d-3e9f92ab2e0b"
},
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer B Catalog",
"id":"97416a1c-45fa-462d-a578-61a6e7597972"
},
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer C Catalog",
"id":"81d30abe-1af6-4330-9d42-1491e1052678"
}
]
}
cURL
{
"catalogs":
[
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer A Catalog",
"id":"628dbe95-2ec9-4e07-881d-3e9f92ab2e0b"
},
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer B Catalog",
"id":"97416a1c-45fa-462d-a578-61a6e7597972"
},
{
"teamId":"44d25f70-b520-40de-8329-0781a9ebcdc8",
"name":"Retailer C Catalog",
"id":"81d30abe-1af6-4330-9d42-1491e1052678"
}
]
}

Reference

Relevant Context Fields

String

Description

Required?

teamId

Your teamId

Required

your_api_key_here

Your API key

Required

name

New catalog name

Required

Replace the string "your_teamID_goes_here" with your teamId.

Replace the string "your_api_key_goes_here" with your API key.

Replace the string "catalog_name_goes_here" with your new catalog name. [Integrator] Catalog should be sufficient.

The name submitted is the name that will be displayed in the CitrusAd portal.[Integrator] Catalog is sufficient for single catalog integrations. If catalog names require changing, contact CitrusAd.

Returned Objects

String

Description

id

This is your newly generated catalogId. This catalogId is used for product syncing and ad requesting.

teamId

the teamId communicated in the request

name

The name of the newly created catalog.

For a glossary of all terms in the documentation, see the reference.