Dynamic Product Ads Guide
Dynamic ads power personalized ad experiences in an automated way.
Product Catalog
A detailed spec of the Catalog and available file formats can be found in the following
article, the current item limit of a Product Catalog is 10 million items.
The permission Organization Admin
is required to create, update or delete a Product Catalog.
Attributes
Attribute | Description | Required | Possible Values |
---|---|---|---|
name | R | max 375 characters | |
organization_id | Organization ID | R | |
vertical | R | UNKNOWN_VERTICAL, COMMERCE, HOTELS, PLACES, FLIGHTS | |
source | Indicates the source of Catalog, set automatically on creation | Read-only | BUSINESS_MANAGER, FEED, WOOCOMMERCE, SHOPIFY |
default_product_set_id | Default product set that includes all the products in the catalog | Read-only | |
event_sources | List of Pixel IDs and/or the Snap App IDs that reports events for the Catalog | O | [ {"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa","type": "MOBILE_APP"}, {"id": "2bbb22b2-b22bb-2bb2-22b2-222b22b222bb","type": "PIXEL"} ] |
API Limits
- Max # of catalogs per organization: 200
- Max # of catalogs per batch: 10
- Catalog name length: 1-375
Create a Catalog
curl -X POST \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '{"catalogs": [{"organization_id": "8fdeefec-f502-4ca8-9a84-6411e0a51058","name": "Honeybear Catalog","vertical": "COMMERCE","event_sources": [{"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa","type": "PIXEL"},{"id": "2bbb22b2-b22bb-2bb2-22b2-222b22b222bb","type": "MOBILE_APP"}] }]}' \
"https://adsapi.snapchat.com/v1/organizations/8fdeefec-f502-4ca8-9a84-6411e0a51058/catalogs"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f73b68a00ff0e59830e4d95c80001737e616473617069736300016275696c642d63326234383933652d312d3338392d3000010129",
"catalogs": [
{
"sub_request_status": "SUCCESS",
"catalog": {
"created_at": "2020-09-29T22:34:52.540013Z",
"updated_at": "2020-09-29T22:34:52.540013Z",
"id": "39ae292e-7ec7-4ed7-a0c4-7567731e9c78",
"name": "Honeybear Catalog",
"organization_id": "8fdeefec-f502-4ca8-9a84-6411e0a51058",
"event_sources": [
{
"id": "2bbb22b2-b22bb-2bb2-22b2-222b22b222bb",
"type": "MOBILE_APP"
},
{
"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa",
"type": "PIXEL"
}
],
"default_product_set_id": "728912bf-4402-49d9-aa38-9b60fb98ee73",
"vertical": "COMMERCE"
}
}
]
}
This creates a Catalog under the organization
HTTP Request
POST https://adsapi.snapchat.com/v1/organizations/{organization_id}/catalogs
Parameters
Parameter | Default | Description |
---|---|---|
organization_id | Organization ID |
Update a Catalog
curl -X PUT \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '{"catalogs": [{"id":"39ae292e-7ec7-4ed7-a0c4-7567731e9c78","organization_id": "8fdeefec-f502-4ca8-9a84-6411e0a51058","name": "Honeybear Catalog II","vertical": "COMMERCE","event_sources": [{"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa","type": "PIXEL" },{"id": "bb1b11bb-b111-1b11-1b1b-b1bb1bb1bbb","type": "PIXEL" },{ "id": "2bbb22b2-b22bb-2bb2-22b2-222b22b222bb", "type": "MOBILE_APP"}]}]}'
https://adsapi.snapchat.com/v1/organizations/8fdeefec-f502-4ca8-9a84-6411e0a51058/catalogs
The above request updates the name of the Catalog and adds an additional PIXEL to the event_sources, it returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f73cddc00ff0167a5aa92d5900001737e616473617069736300016275696c642d63326234383933652d312d3338392d300001012c",
"catalogs": [
{
"sub_request_status": "SUCCESS",
"catalog": {
"created_at": "2020-09-29T22:34:52.540013Z",
"updated_at": "2020-09-30T00:14:20.491333Z",
"id": "39ae292e-7ec7-4ed7-a0c4-7567731e9c78",
"name": "Honeybear Catalog II",
"organization_id": "8fdeefec-f502-4ca8-9a84-6411e0a51058",
"event_sources": [
{
"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa",
"type": "PIXEL"
},
{
"id": "bb1b11bb-b111-1b11-1b1b-b1bb1bb1bbb",
"type": "PIXEL"
},
{
"id": "2bbb22b2-b22bb-2bb2-22b2-222b22b222bb",
"type": "MOBILE_APP"
}
],
"default_product_set_id": "728912bf-4402-49d9-aa38-9b60fb98ee73",
"vertical": "COMMERCE"
}
}
]
}
This request updates the specified Catalog.
Attributes that can be updated
Attribute | Description | Required | Possible Values |
---|---|---|---|
name | End time | R | |
event_sources | The Pixel IDs and/or the Snap App IDs that reports events for the Catalog | O | {"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa","type": "MOBILE_APP"}, {"id": "2bbb22b2-b22bb-2bb2-22b2-222b22b222bb","type": "PIXEL"} ] |
HTTP Request
PUT https://adsapi.snapchat.com/v1/organizations/{organization_id}/catalogs
Parameters
Parameter | Default | Description |
---|---|---|
organization_id | Organization ID |
Get All Catalogs
curl
"https://adsapi.snapchat.com/v1/organizations/8fdeefec-f502-4ca8-9a84-6411e0a51058/catalogs?limit=100" \
-H "Authorization: Bearer meowmeowmeow"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5d6f282800ff099634a02909d20001737e7465616d6b6f363139000161646d616e616765722d6170693a6275696c642d36373633363336342d312d3238352d300001014e",
"catalogs": [
{
"sub_request_status": "SUCCESS",
"catalog": {
"created_at": "2020-09-29T22:34:52.540013Z",
"updated_at": "2020-09-30T00:14:20.491333Z",
"id": "39ae292e-7ec7-4ed7-a0c4-7567731e9c78",
"name": "Honeybear Catalog II",
"organization_id": "8fdeefec-f502-4ca8-9a84-6411e0a51058",
"event_sources": [
{
"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa",
"type": "PIXEL"
},
{
"id": "fb5b83ec-c593-4a64-9c6d-a0eb9da0edba",
"type": "MOBILE_APP"
},
{
"id": "bb1b11bb-b111-1b11-1b1b-b1bb1bb1bbb",
"type": "PIXEL"
}
],
"default_product_set_id": "728912bf-4402-49d9-aa38-9b60fb98ee73",
"vertical": "COMMERCE"
}
},
...
{
"sub_request_status": "SUCCESS",
"catalog": {
"created_at": "2020-09-29T21:49:51.063514Z",
"updated_at": "2020-09-29T21:49:51.063514Z",
"id": "419f565a-ae00-40b5-b159-3c5b051f742a",
"name": "Honeybear Catalog",
"organization_id": "8fdeefec-f502-4ca8-9a84-6411e0a51058",
"default_product_set_id": "10e7d339-0ff1-434a-996a-94d34918c948",
"vertical": "COMMERCE"
}
},
],
"paging": {
"next_link": "https://adsapi.snapchat.com/v1/organizations/8fdeefec-f502-4ca8-9a84-6411e0a51058/catalogs?cursor=def456&limit=100"
}
}
This request will retrieve a list of all the catalogs within an organization
HTTP Request
GET https://adsapi.snapchat.com/v1/organizations/{organization_id}/catalogs
Parameters
Parameter | Default | Description |
---|---|---|
organization_id | Organization ID |
Get a specific Catalog
curl
"https://adsapi.snapchat.com/v1/catalogs/0e854f6a-523a-4f9e-8b82-5a9071e023a6" \
-H "Authorization: Bearer meowmeowmeow"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f7ef67500ff053956b806c94a0001737e616473617069736300016275696c642d31663731616139352d312d3339312d3100010118",
"catalogs": [
{
"sub_request_status": "SUCCESS",
"catalog": {
"created_at": "2020-09-29T22:23:37.676100Z",
"updated_at": "2020-09-29T22:23:37.676100Z",
"id": "0e854f6a-523a-4f9e-8b82-5a9071e023a6",
"name": "Honeybear Catalog",
"organization_id": "8fdeefec-f502-4ca8-9a84-6411e0a51058",
"event_sources": [
{
"id": "aa1a11aa-a111-1a11-1a1a-a1aa1aa1aaa",
"type": "PIXEL"
}
],
"default_product_set_id": "b6d35541-d5b6-4e06-a400-03f9937392cc",
"vertical": "COMMERCE"
}
}
]
}
This request retrieves a specific Catalog.
HTTP Request
GET https://adsapi.snapchat.com/v1/catalogs/{catalog_id}
Parameters
Parameter | Default | Description |
---|---|---|
catalog_id | Catalog ID |
Delete a Catalog
curl -X DELETE "https://adsapi.snapchat.com/v1/catalogs/bbe607b2-03ab-4387-9cb6-0cc6c2cc4b44" \
-H "Authorization: Bearer meowmeowmeow"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f74cc3a00ff02642c414049a30001737e616473617069736300016275696c642d63326234383933652d312d3338392d300001010f",
"catalogs": []
}
This request deletes a specific Catalog.
HTTP Request
DELETE https://adsapi.snapchat.com/v1/catalogs/{catalog_id}
Parameters
Parameter | Default | Description |
---|---|---|
catalog_id | Catalog ID |
ERRORS
Error | Cause |
---|---|
CAT_VALIDATION_ERROR_TOO_MANY_CATALOGS_IN_BATCH | Thrown when there are too many catalogs in a batch |
CAT_VALIDATION_ERROR_INVALID_PAGINATION_READ_LIMIT | Thrown if the read limit specified by user is invalid |
CAT_VALIDATION_ERROR_READ_LIMIT_MUST_BE_SPECIFIED | Thrown if only pagination cursor is provided but not an explicit read limit |
CAT_VALIDATION_ERROR_INVALID_CURSOR | Thrown if the pagination cursor provided by the user is invalid |
NOT_FOUND | Thrown when catalog is not found |
FORBIDDEN | Thrown when catalog cannot be accessed by this user |
Product Feed
The relationship between a Catalog and a Product feed is currently 1:1, there can only ever be one Product Feed under a Catalog.
Product Feed attributes
Attribute | Description | Required | Possible Values |
---|---|---|---|
name | R | max 375 characters | |
catalog_id | The Catalog ID | R | |
status | O | ACTIVE (default) | |
feed_type | The type of Product Feed, a Primary feed can only ever have one Supplemental feed | R | PRIMARY (default), SUPPLEMENTAL |
parent_feed_id | Only required when feed_type is SUPPLEMENTAL, this attribute is the ID of the Product Feed designated as feed_type PRIMARY | O | |
default_currency | The Currency used by the feed using the three letter ISO 4217 code | R | AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UYW, UZS, VES, VND, VUV, WST, XAF, XBC, XCD, XOF, XPF, XSU, XUA, YER, ZAR, ZMW, ZWL |
schedule | Json configuration which defines the schedule for fetching the product feed | O | See schedule attributes below |
Sample schedule #1 - This schedule is set to fetch a non-password protected feed 15 minutes past every hour given the America/Los_Angeles timezone
"schedule": {
"interval_type": "HOURLY",
"timezone": "America/Los_Angeles",
"minute": 15,
"url": "https://example.com/product_feed.csv"
}
Sample schedule #2 - This schedule is set to fetch a non-password protected every Tuesday at 6 am given the Europe/Berlin timezone, since minute is left out it defaults to 0
"schedule": {
"interval_type": "WEEKLY",
"timezone": "Europe/Berlin",
"hour": 6,
"day_of_week": "TUESDAY",
"url": "https://example.com/product_feed.csv"
}
Sample schedule #3 - This schedule is set to fetch a password protected FTP hosted feed on the 10th day of every month at 6:30 AM given the Europe/London timezone
"schedule": {
"interval_type": "MONTHLY",
"timezone": "Europe/London",
"day_of_month": 10,
"hour": 06,
"minute": 30,
"url": "ftp://example.com/product_feed.csv"
"username": "H0neyBadger",
"password": "BeezAreCool99"
}
Schedule attributes
The schedule attribute allows you to define how often Snap should fetch your Product Feed, the attributes you can use vary depending on the interval type that you pick.
Schedule attribute | Description | Required | Possible Values |
---|---|---|---|
url | The FTP/SFTP/HTTP/HTTPS URL including file name where the product feed is to be fetched from | R | |
username | The username to access the product feed | O/Required if url is password protected | |
password | The password to access the product feed | O/Required if url is password protected | |
timezone | The time zone used for the schedule, default timezone is UTC | O | |
interval_type | The interval by which the product feed will be fetched | R | HOURLY, DAILY, WEEKLY, MONTHLY |
interval_count | Specifies number of intervals between the feed being fetched | See below table | See below table |
day_of_month | Represents a day of the month | See below table | 1-31 |
day_of_week | Represents a day of the week | See below table | MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY |
hour | Represents the hour setting | See below table | 00-23 |
minute | Represents the minute setting | See below table | 00-59 |
interval_type required values
Different interval settings require different attributes, this table outlines which attributes that can be included.
interval_type | day_of_month | day_of_week | hour | minute | interval_count | interval_count value |
---|---|---|---|---|---|---|
MONTHLY | R | - | R | R | - | - |
WEEKLY | - | R | R | R | - | - |
DAILY | - | - | R | R | O | 1-31 , specifies the number of days in between each fetch |
HOURLY | - | - | - | R | O | 1-23 , specifies the number of hours in between each fetch |
Create a Product Feed
This request creates a Product Feed, it allows for the option to specify a schedule and URL for retrieving an updated Product Feed.
HTTP Request
POST https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/product_feeds
Parameters
Parameter | Default | Description |
---|---|---|
feed_id | Feed ID |
Example 1 - Creating a PRIMARY Product Feed
Setting up a PRIMARY feed with a scheduile
curl -X POST \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '{"product_feeds":[{"catalog_id":"419f565a-ae00-40b5-b159-3c5b051f742a","name":"Badger Burrow supplies","default_currency":"USD","status":"ACTIVE","schedule":{"url":"ftp://93.184.216.34/timber_product_feed.csv","username":"H0neyBadger","password":"BeezAreCool99","interval_type":"HOURLY","interval_count":"1","timezone":"PST","minute":"15"}}]}' \
"https://adsapi.snapchat.com/v1/catalogs/419f565a-ae00-40b5-b159-3c5b051f742a/product_feeds"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f74db4600ff0d85ee173e68b30001737e616473617069736300016275696c642d63326234383933652d312d3338392d3000010149",
"product_feeds": [
{
"sub_request_status": "SUCCESS",
"product_feed": {
"created_at": "2020-09-30T19:23:51.441770Z",
"updated_at": "2020-09-30T19:23:51.441770Z",
"id": "63397464-b02e-4da5-93d7-fc00e4ac9a5b",
"catalog_id": "419f565a-ae00-40b5-b159-3c5b051f742a",
"name": "Badger Burrow supplies",
"default_currency": "USD",
"schedule": {
"interval_type": "HOURLY",
"timezone": "PST",
"minute": 15,
"interval_count": 1,
"url": "ftp://93.184.216.34/timber_product_feed.csv"
}
}
}
]
}
Example 2 - Creating a SUPPLEMENTAL Product Feed
Setting up a Supplemental feed with a schedule, the request uses the Product Feed ID of the Product Feed created in example 1; 63397464-b02e-4da5-93d7-fc00e4ac9a5b , setting this as the value of the parent_feed_id.
curl -X POST \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '{"product_feeds":[{"catalog_id":"419f565a-ae00-40b5-b159-3c5b051f742a",
"name":"Supplemental feed for badgers","schedule":{"url":"https://example.com/productfeeds/badger_product_feed.csv","interval_type":"DAILY","timezone":"Europe/London","hour":21,"minute":8},"feed_type":"SUPPLEMENTAL","parent_feed_id":"63397464-b02e-4da5-93d7-fc00e4ac9a5b"}]}' \
"https://adsapi.snapchat.com/v1/catalogs/419f565a-ae00-40b5-b159-3c5b051f742a/product_feeds"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "8501b552-e7b2-4a19-8efa-8a6f4d6eade7",
"product_feeds": [
{
"sub_request_status": "SUCCESS",
"product_feed": {
"created_at": "2024-12-30T15:43:39.480202Z",
"updated_at": "2024-12-30T15:43:39.480202Z",
"id": "22b2bda4-926d-44ed-9a47-ddd667292ee2",
"catalog_id": "419f565a-ae00-40b5-b159-3c5b051f742a",
"name": "Supplemental feed for badgers",
"default_currency": "USD",
"schedule": {
"timezone": "Europe/London",
"hour": 21,
"minute": 8,
"interval_count": 1,
"url": "https://example.com/productfeeds/badger_product_feed.csv",
"interval_type": "DAILY"
},
"feed_type": "SUPPLEMENTAL",
"parent_feed_id": "63397464-b02e-4da5-93d7-fc00e4ac9a5b",
"source": "EXTERNAL_URL"
}
}
]
}
Update a Product Feed
This request updates a specific Product Feed.
HTTP Request
PUT https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/product_feeds
Parameters
Parameter | Default | Description |
---|---|---|
feed_id | Feed ID |
curl -X PUT \
-d '{"product_feeds":[{"id":"b5139779-d001-4f12-ae33-d86a2faf05a6","catalog_id":"79ae292e-7ec7-4ed7-a0c4-7567731e9c78","name":"Badger Burrow supplies","default_currency":"GBP","status":"ACTIVE","schedule":{"url":"ftp://93.184.216.34/timber_product_feed.csv","username":"H0neyBadger","password":"BeezAreCool99","interval_type":"HOURLY","interval_count":"4","timezone":"PST","hour":"12","minute":"30"}}]}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/39ae292e-7ec7-4ed7-a0c4-7567731e9c78/product_feeds
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f74bfb500ff05f08282c21d6d0001737e616473617069736300016275696c642d63326234383933652d312d3338392d300001012e",
"product_feeds": [
{
"sub_request_status": "SUCCESS",
"product_feed": {
"created_at": "2020-09-30T16:09:20.748830Z",
"updated_at": "2020-09-30T17:26:13.749843Z",
"id": "b5139779-d001-4f12-ae33-d86a2faf05a6",
"catalog_id": "79ae292e-7ec7-4ed7-a0c4-7567731e9c78",
"name": "Badger Burrow supplies",
"default_currency": "GBP",
"schedule": {
"interval_type": "HOURLY",
"timezone": "PST",
"minute": 30,
"interval_count": 4,
"url": "ftp://93.184.216.34/timber_product_feed.csv"
}
}
}
]
}
Get all Product Feeds
This request lists all Product Feeds under the Catalog, at the moment there can only be one Product Feed under the catalog.
HTTP Request
GET https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/product_feeds
Parameters
Parameter | Default | Description |
---|---|---|
feed_id | Feed ID |
curl
"https://adsapi.snapchat.com/v1/catalogs/19bc3acf-20ce-444f-9829-c3e635ead3a9/product_feeds" \
-H "Authorization: Bearer meowmeowmeow"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f74d7e000ff0ec7804b0e6f540001737e616473617069736300016275696c642d63326234383933652d312d3338392d3000010105",
"product_feeds": [
{
"sub_request_status": "SUCCESS",
"product_feed": {
"created_at": "2020-09-30T18:49:46.429529Z",
"updated_at": "2020-09-30T18:49:54.681827Z",
"id": "72cffebf-b91b-4af7-a8b9-d2a91e51b456",
"catalog_id": "19bc3acf-20ce-444f-9829-c3e635ead3a9",
"name": "Badger Burrow supplies",
"default_currency": "EUR",
"schedule": {
"interval_type": "WEEKLY",
"timezone": "CET",
"hour": 6,
"interval_count": 1,
"day_of_week": "TUESDAY",
"url": "ftp://93.184.216.34/timber_product_feed.csv"
}
}
}
]
}
Get a specific Product Feed
This request returns a specific Product Feed based on the Product Feed id.
HTTP Request
GET https://adsapi.snapchat.com/v1/product_feeds/{product_feed_id}
Parameters
Parameter | Default | Description |
---|---|---|
feed_id | Feed ID |
curl
"https://adsapi.snapchat.com/v1/product_feeds/b5139779-d001-4f12-ae33-d86a2faf05a9" \
-H "Authorization: Bearer meowmeowmeow"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f74d7f300ff025b1dcfd518760001737e616473617069736300016275696c642d63326234383933652d312d3338392d3000010136",
"product_feeds": [
{
"sub_request_status": "SUCCESS",
"product_feed": {
"created_at": "2020-09-30T16:09:20.748830Z",
"updated_at": "2020-09-30T17:26:51.410921Z",
"id": "b5139779-d001-4f12-ae33-d86a2faf05a9",
"catalog_id": "39ae292e-7ec7-4ed7-a0c4-7567731e9c78",
"name": "Badger Burrow Supplies",
"default_currency": "GBP",
"schedule": {
"interval_type": "HOURLY",
"timezone": "PST",
"minute": 30,
"interval_count": 4,
"url": "ftp://93.184.216.34/timber_product_feed.csv"
}
}
}
]
}
Delete a Product Feed
This request deletes a specific Product Feed.
HTTP Request
DELETE https://adsapi.snapchat.com/v1/product_feeds/{product_feed_id}
Parameters
Parameter | Default | Description |
---|---|---|
product_feed_id | Feed ID |
curl -X DELETE "https://adsapi.snapchat.com/v1/product_feeds/ab2ac629-b218-4699-9e19-6946d17faaa3" \
-H "Authorization: Bearer meowmeowmeow"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f74d24400ff06f46ef9a8b6c00001737e616473617069736300016275696c642d63326234383933652d312d3338392d3000010155",
"product_feeds": []
}
Feed Upload
A Feed Upload is an individual upload of new data to the Product feed, when using the Product Feed schedule attribute the Feed Uploads are created automatically by the API at the set timings as specified by the schedule setting.
It's possible to create a Feed Upload without using the schedule attribute, this is suitable for feeds that remain largely static and only need to be updated occasionally. Such an upload is referred to as a one time upload, one time uploads can only happen in product feeds where there is no schedule attribute defined.
Feed Upload attributes
Attribute | Description | Required | Possible Values |
---|---|---|---|
url | The FTP/SFTP/HTTP/HTTPS URL including file name where the product feed is to be fetched from | R | |
update_type | Indicates the type of update, REPLACE means existing product feed will be replaced by the new file, UPSERT means products in the uploaded file will be updated or added to the product feed, any products already in the product feed but missing in the file will be preserved | R | REPLACE, UPSERT |
username | The username to access the product feed | O/Required if url is password protected | |
password | The password to access the product feed | O/Required if url is password protected | |
id | The id of the upload | Read only | |
feed_id | The product feed id | Read only | |
status | Indicates the current status of the upload | Read only | INITIALIZED, FETCHING, PROCESSING, COMPLETE, ERRORED |
summary | A summary of the items affected by the upload including errors and recommendations | Read only |
Feed Upload Status
Status attribute | Description |
---|---|
INITIALIZED | The feed upload has been created and is expected to start downloading soon |
FETCHING | The file is currently being downloaded |
PROCESSING | The file is downloaded and the catalog is being updated |
COMPLETE | The file was downloaded and the catalog was updated |
ERRORED | All products in the upload failed because of a problem with the download or with the file |
Feed Upload Summary
Summary attribute | Description | Possible Values |
---|---|---|
total_items | Total number of items affected by the upload | |
items_modified | Number of items that were modified by the upload | |
items_deleted | Number of items that were deleted by the upload | |
items_errored | Number of items that has an error | |
items_with_warnings | Number of items that have a warning | |
issues_summary | Summary of all errors and recommendations | see errors and recommendations |
Errors and Recommendations
Recommendation | Description |
---|---|
CAT_RECOMMENDATION_MISSING_APP_INSTALL_PROPERTIES | Properties required to run App Install Ads haven't been provided. |
CAT_RECOMMENDATION_MISSING_DEEP_LINK_PROPERTIES | Properties required to run Deep Link Ads haven't been provided. |
Error | Description |
---|---|
CAT_VALIDATION_ERROR_CATALOG_ID_INVALID | Catalog id is invalid/malformed |
CAT_VALIDATION_ERROR_EVENT_SOURCE_ID_INVALID | Event source id is invalid/malformed |
CAT_VALIDATION_ERROR_FEED_ID_INVALID | Feed id is invalid/malformed |
CAT_VALIDATION_ERROR_UPLOAD_ID_INVALID | Upload id is invalid/malformed |
CAT_VALIDATION_ERROR_FILTER_ID_INVALID | Filter id is invalid/malformed |
CAT_VALIDATION_ERROR_ORGANIZATION_ID_INVALID | Organization id is invalid/malformed |
CAT_VALIDATION_ERROR_PRODUCT_SET_ID_INVALID | Product set id is invalid/malformed |
CAT_VALIDATION_ERROR_SNAP_PRODUCT_ID_INVALID | Snap product id is invalid |
CAT_VALIDATION_ERROR_PRODUCT_SCAN_FILTER_INVALID | Product scan filter is invalid |
CAT_VALIDATION_ERROR_REQUIRED_INPUT_PARAMETER_EMPTY | Required parameter is empty |
CAT_VALIDATION_ERROR_REQUIRED_INPUT_PARAMETER_NULL | Required parameter cannot be null |
CAT_VALIDATION_ERROR_DUPLICATE_PRODUCT | Duplicate Product detected. Please make sure product 'id' is unique |
CAT_VALIDATION_ERROR_DEEP_LINK_INVALID | Link is invalid |
CAT_VALIDATION_ERROR_IMAGE_LINK_INVALID | Image Link must be a well formed URL |
CAT_VALIDATION_ERROR_PRODUCT_TYPE_INVALID | Product Type is invalid |
CAT_VALIDATION_ERROR_BRAND_INVALID | Brand is invalid |
CAT_VALIDATION_ERROR_ICON_MEDIA_URL_INVALID | Icon Media Link must be a well formed URL |
CAT_VALIDATION_ERROR_DEEP_LINK_APP_NAME_INVALID | App Name is invalid |
CAT_VALIDATION_ERROR_DEEP_LINK_ANDROID_INFO_INVALID | Android Information is invalid/malformed |
CAT_VALIDATION_ERROR_DEEP_LINK_STORE_ID_INVALID | Apple Store ID is invalid/malformed |
CAT_VALIDATION_ERROR_PRODUCT_LINK_INVALID | Product Link must be a well formed URL |
CAT_VALIDATION_ERROR_MOBILE_LINK_INVALID | Mobile Link must be a well formed URL |
CAT_VALIDATION_ERROR_ADDITIONAL_IMAGES_LINK_INVALID | The additional image Link must be a well formed URL |
CAT_VALIDATION_ERROR_ADDITIONAL_IMAGES_TAG_INVALID | Image Tags for additional images is not valid |
CAT_VALIDATION_ERROR_TOO_MANY_TAGS | Too many tags have been used for a product |
CAT_VALIDATION_ERROR_TOO_MANY_ADDITIONAL_IMAGES | Too many additional images have been used for a product |
CAT_VALIDATION_ERROR_PRODUCT_CONDITION_INVALID | Product condition value is invalid |
CAT_VALIDATION_ERROR_AVAILABILITY_INVALID | Product availability value is invalid |
CAT_VALIDATION_ERROR_ADULT_INVALID | Adult value is invalid |
CAT_VALIDATION_ERROR_REQUIRED_INPUT_PARAMETER_TOO_LARGE | Parameter is too large |
CAT_VALIDATION_ERROR_SALE_PRICE_EFFECTIVE_DATE_INVALID | Sale Price Effective Date is invalid/malformed |
CAT_VALIDATION_ERROR_GTIN_INVALID | GTIN value is invalid |
CAT_VALIDATION_ERROR_MPN_INVALID | MPN value is invalid |
CAT_VALIDATION_ERROR_COLOR_INVALID | Color value is invalid |
CAT_VALIDATION_ERROR_GENDER_INVALID | Gender value is invalid |
CAT_VALIDATION_ERROR_MATERIAL_INVALID | Material value is invalid |
CAT_VALIDATION_ERROR_PATTERN_INVALID | Pattern is value invalid |
CAT_VALIDATION_ERROR_SIZE_INVALID | Size value is invalid |
CAT_VALIDATION_ERROR_ITEM_GROUP_ID_INVALID | Item Group ID is invalid |
CAT_VALIDATION_ERROR_CUSTOM_LABEL_INVALID | Custom Label is invalid |
CAT_VALIDATION_ERROR_REQUIRED_INPUT_PARAMETER_MALFORMED | Required input parameter is malformed |
CAT_VALIDATION_ERROR_REQUIRED_INPUT_PARAMETER_TOO_SMALL | Required input parameter is too small |
CAT_VALIDATION_ERROR_PRODUCT_PRICE_INVALID | Price is invalid/malformed |
CAT_VALIDATION_ERROR_SALE_PRICE_INVALID | Sale Price is invalid/malformed |
CAT_VALIDATION_EXPIRATION_DATE_INVALID | Expiration Date is invalid/malformed |
CAT_VALIDATION_ERROR_INVALID_GOOGLE_PRODUCT_CATEGORY | Google product category is invalid/malformed |
CAT_VALIDATION_ERROR_AVAILABILITY_RADIUS_INVALID | Availability Radius is invalid/malformed |
CAT_VALIDATION_ERROR_GEOGRAPHIC_COORDINATES_INVALID | Geographic Coordinates are invalid/malformed |
CAT_VALIDATION_ERROR_AVAILABILITY_RADIUS_AND_GEOGRAPHIC_COORDINATE_MISSING | Availability Radius and geographic coordinates are both required |
CAT_FX_RATE_NOT_SUPPORTED | The provided currency is currently not supported in our Fx Service |
CAT_SALE_PRICE_EQUAL_OR_GREATER_THAN_PRICE | Sale price is greater than or equal to the regular price |
CAT_VALIDATION_ERROR_AGE_GROUP_INVALID | Age Group is invalid |
CAT_VALIDATION_ERROR_CURRENCY_INVALID | Currency Code is invalid/malformed |
CAT_VALIDATION_ERROR_DESCRIPTION_INVALID | Description is invalid |
CAT_VALIDATION_ERROR_TITLE_INVALID | Title is invalid. |
CAT_VALIDATION_ERROR_PRODUCT_ID_INVALID | Product 'ID' is invalid |
CAT_FEED_FILE_NO_DATA | File containing feed is empty or cannot be fully parsed |
Get all Feed Uploads
This request lists the 200 latest Feed Uploads for the Product feed in order of creation.
HTTP Request
GET https://adsapi.snapchat.com/v1/product_feeds/{product_feed_id}/feed_uploads
Parameters
Parameter | Default | Description |
---|---|---|
product_feed_id | Feed ID |
curl
"https://adsapi.snapchat.com/v1/product_feeds/c03a1fd9-97f2-4f87-a1c2-7696a8d6bde8/feed_uploads" \
-H "Authorization: Bearer meowmeowmeow"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f7e5a1b00ff0d38ed96d3af7c0001737e616473617069736300016275696c642d31663731616139352d312d3339312d3100010105",
"feed_uploads": [
{
"sub_request_status": "SUCCESS",
"feed_upload": {
"created_at": "2020-10-08T00:15:06.631226Z",
"updated_at": "2020-10-08T00:15:06.631226Z",
"id": "f5e58ff4-1014-401a-baeb-5866e515deb0",
"feed_id": "c03a1fd9-97f2-4f87-a1c2-7696a8d6bde8",
"summary": {
"issues_summary": {}
},
"url": "https://www.example.com/productfeed/timber_product_feed.csv",
"update_type": "REPLACE",
"status": "INITIALIZED"
}
},
{
"sub_request_status": "SUCCESS",
"feed_upload": {
"created_at": "2020-10-07T23:15:00.702Z",
"updated_at": "2020-10-07T23:15:35.624449Z",
"id": "0aea4326-80cf-49de-9555-6d7c01566d9d",
"feed_id": "c03a1fd9-97f2-4f87-a1c2-7696a8d6bde8",
"summary": {
"total_items": 16,
"items_modified": 16,
"issues_summary": {
"recommendations": {
"CAT_RECOMMENDATION_MISSING_APP_INSTALL_PROPERTIES": 5,
"CAT_RECOMMENDATION_MISSING_DEEP_LINK_PROPERTIES": 5
}
}
},
"url": "https://www.example.com/productfeed/timber_product_feed.csv",
"update_type": "REPLACE",
"status": "COMPLETE"
}
},
{
"sub_request_status": "SUCCESS",
"feed_upload": {
"created_at": "2020-10-07T22:15:01.366260Z",
"updated_at": "2020-10-07T22:15:32.186709Z",
"id": "6d3e1ecd-362a-4386-b2b7-71b199d20c5b",
"feed_id": "c03a1fd9-97f2-4f87-a1c2-7696a8d6bde8",
"summary": {
"total_items": 7,
"items_modified": 7,
"issues_summary": {
"recommendations": {
"CAT_RECOMMENDATION_MISSING_APP_INSTALL_PROPERTIES": 7,
"CAT_RECOMMENDATION_MISSING_DEEP_LINK_PROPERTIES": 7
}
}
},
"url": "https://www.example.com/productfeed/timber_product_feed.csv",
"update_type": "REPLACE",
"status": "COMPLETE"
}
}
]
}
Create a Feed Upload
The Create Feed upload request is used to create a one off Feed Upload for a Product Feed where the schedule attribute has not been defined.
- Create a Product Feed without the schedule attribute.
- Create a Feed Upload specifying url and update_type, if the url is password protected username and password are required.
Body
Attribute | Description | Required | Possible Values |
---|---|---|---|
url | The FTP/SFTP/HTTP/HTTPS URL including file name where the product feed is to be fetched from | R | |
update_type | Indicates the type of update, REPLACE means existing product feed will be replaced by the new file, UPSERT means products in the uploaded file will be updated or added to the product feed, any products already in the product feed but missing in the file will be preserved | R | REPLACE, UPSERT |
username | The username to access the product feed | O/Required if url is password protected | |
password | The password to access the product feed | O/Required if url is password protected |
HTTP Request
POST https://adsapi.snapchat.com/v1/product_feeds/{product_feed_id}/feed_uploads
Parameters
Parameter | Default | Description |
---|---|---|
product_feed_id | Feed ID |
curl -X POST \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '{"product_feeds":[{"catalog_id":"7ae3e924-dc70-48f6-9733-4d009d4f2152","name":"The No Schedule Feed","default_currency":"EUR","status":"ACTIVE"}]}' \
"https://adsapi.snapchat.com/v1/catalogs/7ae3e924-dc70-48f6-9733-4d009d4f2152/product_feeds"
The above request creates a Product Feed without the scheduling attribute:
{
"request_status": "SUCCESS",
"request_id": "5f7e532800ff070665a0c9d0a00001737e616473617069736300016275696c642d31663731616139352d312d3339312d310001010b",
"product_feeds": [
{
"sub_request_status": "SUCCESS",
"product_feed": {
"created_at": "2020-10-07T23:45:44.925724Z",
"updated_at": "2020-10-07T23:45:44.925724Z",
"id": "c79a127a-3ff2-4278-ae5a-f3f35f4093ae",
"catalog_id": "7ae3e924-dc70-48f6-9733-4d009d4f2152",
"name": "The No Schedule Feed",
"default_currency": "EUR"
}
}
]
}
curl -X POST \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '{"feed_uploads":[{"url":"ftp://93.184.216.34/timber_product_feed.csv","username":"H0neyBadger","password":"BeezAreCool99","update_type":"REPLACE"}]}' \
"https://adsapi.snapchat.com/v1/product_feeds/c79a127a-3ff2-4278-ae5a-f3f35f4093ae/feed_uploads"
The above request creates a one time upload of the designated file to the Product feed, the update_type REPLACE value stipulates all products in the current feed will be replaced by the products in the new file.:
{
"request_status": "SUCCESS",
"request_id": "5f7db87900ff0627f67519a13a0001737e616473617069736300016275696c642d31663731616139352d312d3339312d3100010121",
"feed_uploads": [
{
"sub_request_status": "SUCCESS",
"feed_upload": {
"created_at": "2020-10-07T12:45:45.884998Z",
"updated_at": "2020-10-07T12:45:45.884998Z",
"id": "2c2a503a-01cf-4695-986b-b8281e7136e2",
"feed_id": "c79a127a-3ff2-4278-ae5a-f3f35f4093ae",
"summary": {
"issues_summary": {}
},
"url": "ftp://93.184.216.34/timber_product_feed.csv",
"update_type": "REPLACE",
"status": "INITIALIZED"
}
}
]
}
Get a Feed Upload
This request will fetch a specific Feed upload, the Feed upload contains a summary of any recommendations or feedback for the latest executed upload.
HTTP Request
GET https://adsapi.snapchat.com/v1/product_feeds/{product_feed_id}/feed_uploads
Parameters
Parameter | Default | Description |
---|---|---|
product_feed_id | Feed ID |
curl
"https://adsapi.snapchat.com/v1/feed_uploads/ea7534f3-5576-4698-b48c-5a955aca0747" \
-H "Authorization: Bearer meowmeowmeow"
The above request returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5f7d150400ff0b8aba6ba67c710001737e616473617069736300016275696c642d31663731616139352d312d3339312d3100010121",
"feed_uploads": [
{
"sub_request_status": "SUCCESS",
"feed_upload": {
"created_at": "2020-10-06T04:00:06.146753Z",
"updated_at": "2020-10-06T04:03:06.001196Z",
"id": "ea7534f3-5576-4698-b48c-5a955aca0747",
"feed_id": "72cffebf-b91b-4af7-a8b9-d2a91e51b456",
"summary": {
"total_items": 7,
"items_modified": 7,
"issues_summary": {
"recommendations": {
"CAT_RECOMMENDATION_MISSING_APP_INSTALL_PROPERTIES": 7,
"CAT_RECOMMENDATION_MISSING_DEEP_LINK_PROPERTIES": 7
}
}
},
"url": "ftp://93.184.216.34/timber_product_feed.csv",
"update_type": "REPLACE",
"status": "COMPLETE"
}
}
]
}
Catalog Diagnostics
curl -X POST \
-d '{"facets": [{"property": "BRAND"}], "filter": {"AVAILABILITY": {"EQ": "IN_STOCK"}}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/f1180af0-949b-4439-8f62-021ac96cfcff
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ed4fe0a00ff00ff18b512bc3ae30001737e616473617069736300016275696c642d36653163373061642d312d3335352d3000010154",
"summary": {
"total_products": {
"count": "100",
"relation": "EQ"
}
},
"facets": [
{
"facet": {
"property": "BRAND"
},
"values": [
{
"name": "Farmani",
"count": "89"
},
{
"name": "Rolo Ralph",
"count": "10"
},
{
"name": "Thomas Hillgren",
"count": "1"
}
]
}
]
}
Catalog diagnostics allows you to group existing items given the properties you define, either for an entire Catalog, or for a single Product Set.
The facets
body allows you to specify a property to group items by. You can also use a single AND/OR operator to select up to ten
additional item properties, this is defined within the filter
part the request, you can filter by up to ten item properties using AND/OR.
If you want to keep the grouping to a single Product Set you can do so by using the product_set_id
within the filter
part of the
request.
HTTP Request
POST https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/facets?limit=100
Parameters
Parameter | Required | Description |
---|---|---|
catalog_id | R | Catalog ID |
limit | O | Integer, min 1, max 50, the number of groupings returned |
Attributes
These attributes can be used within the facets
part of
Attribute | Description | Required | Possible values |
---|---|---|---|
property | The property you want to group products by | R | AGE_GROUP, AVAILABILITY, BASE_PRICE_CURRENCY, BRAND, COLOR, CONDITION, CUSTOM_LABEL_0, CUSTOM_LABEL_1, CUSTOM_LABEL_2, CUSTOM_LABEL_3, CUSTOM_LABEL_4, GENDER, GOOGLE_PRODUCT_CATEGORY, ITEM_GROUP_ID, MATERIAL, PATTERN, PRICE_CURRENCY, PRODUCT_TYPE, SIZEEL_3, CUSTOM_LABEL_4, GOOGLE_PRODUCT_CATEGORY, ITEM_GROUP_ID, MATERIAL, PATTERN, SALE_PRICE_CURRENCY, SIZE, AGE_GROUP, AVAILABILITY, COLOR, CONDITION, GENDER, PRICE_CURRENCY, LOYALTY_PROGRAM, ACTIVITY, LOCALITY, POSTAL_CODE, COUNTRY_CODE, ORIGIN_AIRPORT, DESTINATION_AIRPORT, ORIGIN_CITY, DESTINATION_CITY |
filter | Optional filtering, can use one logical operator (AND, OR) | O | PRODUCT_SET_ID, AGE_GROUP, AVAILABILITY, BRAND, COLOR, CONDITION, CUSTOM_LABEL_0, CUSTOM_LABEL_1, CUSTOM_LABEL_2, CUSTOM_LABEL_3, CUSTOM_LABEL_4, GENDER, GOOGLE_PRODUCT_CATEGORY, ITEM_GROUP_ID, MATERIAL, PATTERN, PRICE_CURRENCY, PRODUCT_TYPE, SIZE, BASE_PRICE_AMOUNT, SALE_PRICE_AMOUNT, NEIGHBORHOOD, STAR_RATING, LOYALTY_PROGRAM, ACTIVITY, LOCALITY, POSTAL_CODE, COUNTRY_CODE, NUMBER_OF_RATERS, GUEST_RATING_SCORE, ORIGIN_AIRPORT, DESTINATION_AIRPORT, ORIGIN_CITY, DESTINATION_CITY |
Filter Operator
Operator | Description | Can be used with |
---|---|---|
EQ | Equal to | Integer, Float, String |
NEQ | Not Equal to | Integer, Float, String |
GT | Greater than | Integer, Float |
GTE | Greater than or equal to | Integer, Float |
LT | Less than | Integer, Float |
LTE | Less than or equal to | Integer, Float |
CONTAINS | Contains | String |
NOT_CONTAINS | Does not contain | String |
I_CONTAINS | Contains - Case insensitive | String |
I_NOT_CONTAINS | Does not contain - Case insensitive | String |
STARTS_WITH | Starts with | String |
I_STARTS_WITH | Starts with - Case insensitive | String |
IS_ANY | Is any of the list. Only works with strings containing alphanumeric characters | List of Strings |
IS_NOT_ANY | Is not any of the list. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_ANY | Is any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_NOT_ANY | Is not any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
Example 1 - Diagnostics
Diagnostics for a single Product Set using product_set_id
curl -X POST \
-d '{"facets": [{"property": "BRAND"}], "filter": {"PRODUCT_SET_ID": {"EQ": "99246572-4c2b-4e66-935c-1b1ee1ea2360"}}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8318ff5c-78f7-47db-8a32-675f0b787c75/facets?limit=50
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ed517ff0000ff0a11b020203f100001737e616473617069736300016275696c642d36653163373061642d312d3335352d300001014f",
"summary": {
"total_products": {
"count": "33",
"relation": "EQ"
}
},
"facets": [
{
"facet": {
"property": "BRAND"
},
"values": [
{
"name": "Rolo Ralph",
"count": "33"
}
]
}
]
}
Example 2 - Diagnostics
Diagnostics using several AND operators (gender, availablity, size)
curl -X POST \
-d '{"facets": [{"property": "BRAND"}], "filter": {"AND": [{"GENDER": {"EQ": "UNISEX"}},{"AVAILABILITY": {"EQ": "IN_STOCK"}},{"SIZE": {"EQ": "M"}}]}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8318ff5c-78f7-47db-8a32-675f0b787c75/facets?limit=50
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ed5252800ff0e424ba54e30da0001737e616473617069736300016275696c642d36653163373061642d312d3335352d3000010115",
"summary": {
"total_products": {
"count": "11",
"relation": "EQ"
}
},
"facets": [
{
"facet": {
"property": "BRAND"
},
"values": [
{
"name": "Rolo Ralph",
"count": "11"
}
]
}
]
}
Example 3 - Diagnostics
Diagnostics using several AND operators (product_set_id, gender, availablity, size)
curl -X POST \
-d '{"facets": [{"property": "BRAND"}], "filter": {"AND": [{"PRODUCT_SET_ID": {"EQ":"99246572-4c2b-4e66-935c-1b1ee1ea2360"}},{"GENDER": {"EQ": "UNISEX"}},{"AVAILABILITY": {"EQ": "IN_STOCK"}},{"SIZE": {"EQ": "M"}}]}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8318ff5c-78f7-47db-8a32-675f0b787c75/facets?limit=50
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ed5252800ff0e424ba54e30da0001737e616473617069736300016275696c642d36653163373061642d312d3335352d3000010115",
"summary": {
"total_products": {
"count": "11",
"relation": "EQ"
}
},
"facets": [
{
"facet": {
"property": "BRAND"
},
"values": [
{
"name": "Rolo Ralph",
"count": "11"
}
]
}
]
}
Product Search
The product search is used to search a catalog for products given a provided filter, each level of the filter can only have one operator and we allow up to two levels of nesting, for each operator we can have up to 10 fields
HTTP Request
POST https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/products/search
Request Parameters
Parameter | Required | Description |
---|---|---|
catalog_id | R | Catalog ID |
Body Parameters
Parameter | Required | Description |
---|---|---|
limit | O | this pagination variable specifies the number of products per page 50 - 1000 |
Filter properties
Property | Possible values | Description |
---|---|---|
AGE_GROUP | NEWBORN, INFANT, TODDLER, KIDS, ADULT | |
AVAILABILITY | IN_STOCK, OUT_OF_STOCK, PREORDER, DISCONTINUED, AVAILABLE_FOR_ORDER | |
BRAND | - | User specified value |
COLOR | - | User specified value |
CONDITION | NEW, REFURBISHED, USED | |
CUSTOM_LABEL_0 | - | User specified value |
CUSTOM_LABEL_1 | - | User specified value |
CUSTOM_LABEL_2 | - | User specified value |
CUSTOM_LABEL_3 | - | User specified value |
CUSTOM_LABEL_4 | - | User specified value |
GENDER | FEMALE, MALE, UNISEX | |
GOOGLE_PRODUCT_CATEGORY | - | User specified value |
ID | - | User specified value |
ITEM_GROUP_ID | - | User specified value |
MATERIAL | - | User specified value |
PATTERN | - | User specified value |
PRICE_AMOUNT | - | User specified value |
PRICE_CURRENCY | - | User specified value |
PRODUCT_TYPE | - | User specified value |
SIZE | - | User specified value |
TITLE | - | User specified value |
PRODUCT_SET_ID | - | User specified value |
PRODUCT_STATUS | COMPLETE, FAILED | |
MEDIA_ELIGIBLE_AD_TYPE | APP_INSTALL, REMOTE_WEBPAGE, DEEPLINK_ATTACHMENT |
Filter Operator
Operator | Description | Can be used with |
---|---|---|
EQ | Equal to | Integer, Float, String |
NEQ | Not Equal to | Integer, Float, String |
GT | Greater than | Integer, Float |
GTE | Greater than or equal to | Integer, Float |
LT | Less than | Integer, Float |
LTE | Less than or equal to | Integer, Float |
CONTAINS | Contains | String |
NOT_CONTAINS | Does not contain | String |
I_CONTAINS | Contains - Case insensitive | String |
I_NOT_CONTAINS | Does not contain - Case insensitive | String |
STARTS_WITH | Starts with | String |
I_STARTS_WITH | Starts with - Case insensitive | String |
IS_ANY | Is any of the list. Only works with strings containing alphanumeric characters | List of Strings |
IS_NOT_ANY | Is not any of the list. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_ANY | Is any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_NOT_ANY | Is not any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
Example 1 - Product Search
Request the entire Product Catalog using a pagination of 50 products, setting "limit":50
attribute achieves this.
curl -X POST \
-d '{"limit": 50}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/products/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f19a01000ff00fff430ee807f720001737e616473617069736300016275696c642d63616265303361622d312d3336392d3000010108",
"summary": {
"total_products": {
"count": "209",
"relation": "EQ"
}
},
"paging": {
"next_link": "https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/products/search?cursor=IlNDLTE1MCI=&limit=50",
"next_link_body": "H4sIAAAAAAAAAONiAAB1-ja7AgAAAA=="
},
"products": [
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9156245200715568072",
"external_id": "SC-101",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Denim Shirt - Women's",
"description": "Women's denim shirt - crafted from the finest squirrel made denim.",
"link": "https://www.example.com/ch/en/jj/denim/denim-jackets/jean-cj-195-denim-jacket-12169148.html?cgid=jj-outerwear-denim&dwvar_colorPattern=12169148_BlueDenim",
"image_link": "https://www.example.com/dw/image/v2/ABBT_PRD/on/demandware.static/-/Sites-bd-catalog/default/dw7809338c/pim-static/large/12169148_BlueDenim_003_ProductLarge.jpg?sw=685",
"availability": "in stock",
"google_product_category": "Apparel & Accessories > Clothing > Shirts & Tops",
"product_type": "Women's > Tops > Denim",
"brand": "Honeybear Denim Jackets",
"gtin": "912345678905",
"mpn": "912345678905",
"condition": "new",
"age_group": "adult",
"color": "blue",
"gender": "female",
"size": "L",
"item_group_id": "SC-1",
"custom_label_0": "Bestseller",
"price": {
"value": "24.99",
"currency": "USD"
},
"sale_price": {
"value": "22.99",
"currency": "USD"
},
"created_at": "2020-07-23T14:34:56.532179Z",
"updated_at": "2020-07-23T14:34:56.532202Z",
"additional_media": [
{
"url": "https://example.com/images/womensdenimshirt/altimage.jpeg"
}
]
}
},
...
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9151706793146519301",
"external_id": "SC-150",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Denim trousers",
"description": "Blue jeans for men",
"link": "https://www.example.com.com/loose-fit-jeans-1999.html?cgid=jj-nl-some-37&dwvar_colorPattern=12179324_BlueDenim",
"image_link": "https://www.example.com/static/large/11239324_BlueDenim_003_ProductLarge.jpg",
"availability": "in stock",
"product_type": "Unisex > Trousers",
"brand": "Honeybear Denim",
"gtin": "912345678905",
"mpn": "912345678905",
"condition": "new",
"age_group": "adult",
"color": "blue",
"gender": "unisex",
"size": "M",
"item_group_id": "SC-5",
"custom_label_0": "Bestseller",
"price": {
"value": "14.99",
"currency": "USD"
},
"created_at": "2020-07-23T14:34:56.536774Z",
"updated_at": "2020-07-23T14:34:56.536779Z"
}
}
]
}
Example 2 - Product Search
Request all products within a specific Product Set.
curl -X POST \
-d '{"limit": 50,"filter": {"PRODUCT_SET_ID": {"EQ": "dcaa2832-48bd-4df6-8ba5-0edac83971c2"}}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/products/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f19a9fc00ff0356de38dde9990001737e616473617069736300016275696c642d63616265303361622d312d3336392d3000010131",
"summary": {
"total_products": {
"count": "20",
"relation": "EQ"
}
},
"products": [
{
"sub_request_status": "SUCCESS",
"product": {
"id": "998335299479914169",
"external_id": "SC-106",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Beanie hat",
"description": "Honeybear knitted beanie hat",
"link": "https://www.example.com/accessories/beanies/ackman-short-knit-beanie-beanie-12164650.html?cgid=jj-accessories-beanies&dwvar_colorPattern=12164650_WinterMoss",
"image_link": "https://www.example.com/image/e/12164650_ProductLarge.jpg",
"availability": "in stock",
"product_type": "Unisex > Headwear",
"brand": "Honeybear Headwear",
"gtin": "912345678905",
"mpn": "912345678905",
"condition": "new",
"age_group": "adult",
"color": "red",
"gender": "unisex",
"size": "M",
"item_group_id": "SC-6",
"custom_label_0": "Bestseller",
"price": {
"value": "14.99",
"currency": "USD"
},
"created_at": "2020-07-23T15:17:16.594913Z",
"updated_at": "2020-07-23T15:17:16.594933Z"
}
},
...
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9435790241890490957",
"external_id": "SC-209",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Cap",
"description": "Cap with Kevin",
"link": "https://www.example.com/accessories/caps/billy-baseball-cap.html?ar_colorPattern=121_Black",
"image_link": "https://www.example.com/image/9964499_Black_001_ProductLarge.jpg",
"availability": "in stock",
"product_type": "Unisex > Headwear",
"brand": "Honeybear Caps",
"gtin": "912345778905",
"mpn": "912345778905",
"condition": "new",
"age_group": "adult",
"color": "green",
"gender": "unisex",
"size": "M",
"item_group_id": "SC-10",
"custom_label_0": "Bestseller",
"price": {
"value": "4.99",
"currency": "USD"
},
"created_at": "2020-07-23T15:17:16.597499Z",
"updated_at": "2020-07-23T15:17:16.597501Z"
}
}
]
}
Example 3 - Product Search
Request all products in a feed where the media failed due to being unavailable.
curl -X POST \
-d '{"limit": 50,"filter":{"PRODUCT_STATUS": {"EQ": "FAILED_MEDIA"}}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/products/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f1af77c00ff075e0536d7780d0001737e616473617069736300016275696c642d32363038643739372d312d3337302d3000010145",
"summary": {
"total_products": {
"count": "12",
"relation": "EQ"
}
},
"products": [
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9877985877291710328",
"external_id": "W999-HOT-M",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Honeybear Bikini",
"description": "A bikini made out of the finest fox crafted fabric.",
"link": "https://www.example.com/products/womens-bikini-red.jpg",
"image_link": "https://example.com/external/images/5a54e8920edac/94d9b4004d87f46722801c503514585a.jpg",
"availability": "out of stock",
"product_type": "Swimwear",
"brand": "Honeybear Swimwear",
"condition": "new",
"age_group": "adult",
"color": "red",
"gender": "female",
"item_group_id": "123",
"custom_label_0": "Women's Bikini",
"custom_label_2": "Subscription Available",
"custom_label_4": "additional_images",
"price": {
"value": "18.00",
"currency": "USD"
},
"created_at": "2020-07-24T15:00:12.854449Z",
"updated_at": "2020-07-24T15:00:12.854470Z",
"feed_id": "852733e2-6838-4c61-9d23-7e5fddaca3f8",
"main_media": {
"url": "https://example.com/external/images/5a54e8920edac/94d9b4004d87f46722801c503514585a.jpg",
"internal_url_status": "FAILURE",
"internal_url_error_code": "NOT_FOUND"
},
"icon_media": {}
}
},
...
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9940768843314259508",
"external_id": "W9990-HTH-XXXL/XXXXL",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Women's Robe",
"description": "This robe is the perfect addition to your wardrobe.",
"link": "https://www.example.com/products/womens-robe.jpg",
"image_link": "https://example.com/external/images/5a54e8920edac/b90a21dfe0c3da11d7b37232f599a5db.jpg",
"availability": "in stock",
"google_product_category": "Apparel & Accessories > Clothing > Sleepwear & Loungewear > Loungewear",
"product_type": "Robes",
"brand": "Honeybear Homewear",
"condition": "new",
"age_group": "adult",
"color": "green",
"gender": "female",
"item_group_id": "368",
"custom_label_0": "Women's Robe",
"custom_label_2": "Subscription Not Available",
"custom_label_4": "additional_images",
"price": {
"value": "88.00",
"currency": "USD"
},
"created_at": "2020-07-24T15:00:12.856278Z",
"updated_at": "2020-07-24T15:00:12.856287Z",
"feed_id": "852733e2-6838-4c61-9d23-7e5fddaca3f8",
"main_media": {
"url": "https://example.com/external/images/5a54e8920edac/b90a21dfe0c3da11d7b37232f599a5db.jpg",
"internal_url_status": "FAILURE",
"internal_url_error_code": "NOT_FOUND"
},
"icon_media": {}
}
}
]
}
Example 4 - Product Search
Request all products within a specific Product Set, where the title attribute contains the term 'jacket' or 'hat', and where the availability is in stock and the product status is complete.
curl -X POST \
-d '{"filter": {"AND": [{"OR": [{"TITLE": {"I_CONTAINS": "jacket"}},{"TITLE": {"I_CONTAINS": "hat"}}]},{"PRODUCT_STATUS": {"EQ": "COMPLETE"}},{"AVAILABILITY": {"EQ": "IN_STOCK" }},{"PRODUCT_SET_ID": {"EQ": "99246572-4c2b-4e66-935c-1b1ee1ea2360"}}]}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/products/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f1ad42e00ff09810a9af6828c0001737e616473617069736300016275696c642d32363038643739372d312d3337302d300001015d",
"summary": {
"total_products": {
"count": "11",
"relation": "EQ"
}
},
"products": [
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9767298711984673596",
"external_id": "SC-103",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Denim Jacket",
"description": "Oversized denim jacket",
"link": "https://www.example.com/index.php?jj-outerwear-denim&dwvar_colorPattern=12166869_BlueDenim",
"image_link": "https://www.example.com/dw/image/large/12166811_BlueDenim_008_ProductLarge.jpg?sw=685",
"availability": "in stock",
"product_type": "Men's > Jackets > Denim",
"brand": "Badger Denim",
"gtin": "912345678905",
"mpn": "912345678905",
"condition": "new",
"age_group": "adult",
"color": "green",
"gender": "unisex",
"size": "M",
"item_group_id": "SC-3",
"custom_label_0": "Bestseller",
"price": {
"value": "14.99",
"currency": "USD"
},
"created_at": "2020-07-24T12:29:35.036864Z",
"updated_at": "2020-07-24T12:29:35.036901Z"
}
},
...
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9285992718921035814",
"external_id": "SC-193",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"title": "Denim Jacket",
"description": "Skinny fit denim jacket",
"link": "https://www.example.com/index.php?bd-outerwear-denim&dwvar_colorPattern=12166869_BlueDenim",
"image_link": "https://www.example.com/dw/image/large/12166869_BlueDenim_003_ProductLarge.jpg?sw=685",
"availability": "in stock",
"product_type": "Men's > Jackets > Denim",
"brand": "Honeybear Denim",
"gtin": "912345678905",
"mpn": "912345678905",
"condition": "new",
"age_group": "adult",
"color": "light blue",
"gender": "unisex",
"size": "M",
"item_group_id": "SC-3",
"custom_label_0": "Bestseller",
"price": {
"value": "24.99",
"currency": "USD"
},
"created_at": "2020-07-24T12:29:35.039136Z",
"updated_at": "2020-07-24T12:29:35.039142Z"
}
}
]
}
Hotel Search
The hotel search is used to search a catalog for hotels given a provided filter, each level of the filter can only have one operator and we allow up to two levels of nesting, for each operator we can have up to 10 fields
HTTP Request
POST https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/hotels/search
Request Parameters
Parameter | Required | Description |
---|---|---|
catalog_id | R | Catalog ID |
Body Parameters
Parameter | Required | Description |
---|---|---|
limit | O | this pagination variable specifies the number of products per page 50 - 1000 |
Filter properties
Property | Possible values | Description |
---|---|---|
ID | - | User specified value |
NAME | - | User specified value |
BASE_PRICE_AMOUNT | - | User specified value |
BASE_PRICE_CURRENCY | - | User specified value |
SALE_PRICE_AMOUNT | - | User specified value |
SALE_PRICE_CURRENCY | - | User specified value |
BRAND | - | User specified value |
NEIGHBORHOOD | - | User specified value |
STAR_RATING | - | User specified value |
LOYALTY_PROGRAM | - | User specified value |
ACTIVITY | ACTIVE, INACTIVE | |
CUSTOM_LABEL_0 | - | User specified value |
CUSTOM_LABEL_1 | - | User specified value |
CUSTOM_LABEL_2 | - | User specified value |
CUSTOM_LABEL_3 | - | User specified value |
CUSTOM_LABEL_4 | - | User specified value |
LOCALITY | - | User specified value |
POSTAL_CODE | - | User specified value |
COUNTRY_CODE | - | User specified value |
NUMBER_OF_RATERS | - | User specified value |
GUEST_RATING_SCORE | - | User specified value |
PRODUCT_SET_ID | - | User specified value |
PRODUCT_STATUS | COMPLETE, FAILED | |
ELIGIBLE_AD_TYPE | APP_INSTALL, REMOTE_WEBPAGE, DEEPLINK_ATTACHMENT |
Filter Operator
Operator | Description | Can be used with |
---|---|---|
EQ | Equal to | Integer, Float, String |
NEQ | Not Equal to | Integer, Float, String |
GT | Greater than | Integer, Float |
GTE | Greater than or equal to | Integer, Float |
LT | Less than | Integer, Float |
LTE | Less than or equal to | Integer, Float |
CONTAINS | Contains | String |
NOT_CONTAINS | Does not contain | String |
I_CONTAINS | Contains - Case insensitive | String |
I_NOT_CONTAINS | Does not contain - Case insensitive | String |
STARTS_WITH | Starts with | String |
I_STARTS_WITH | Starts with - Case insensitive | String |
IS_ANY | Is any of the list. Only works with strings containing alphanumeric characters | List of Strings |
IS_NOT_ANY | Is not any of the list. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_ANY | Is any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_NOT_ANY | Is not any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
Example 1 - Hotel Search
Request the entire Hotel Catalog using a pagination of 50 products, setting "limit":50
attribute achieves this.
curl -X POST \
-d '{"limit": 50}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/hotels/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f19a01000ff00fff430ee807f720001737e616473617069736300016275696c642d63616265303361622d312d3336392d3000010108",
"summary": {
"total_products": {
"count": "209",
"relation": "EQ"
}
},
"paging": {
"next_link": "https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/hotels/search?cursor=IlNDLTE1MCI=&limit=50",
"next_link_body": "H4sIAAAAAAAAAONiAAB1-ja7AgAAAA=="
},
"products": [
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9156245200715568072",
"external_id": "SC-101",
"created_at": "2020-07-23T14:34:56.532179Z",
"updated_at": "2020-07-23T14:34:56.532202Z",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"name": "Snapchat Hotel",
"description": "Located in sunny Santa Monica",
"link": "https://www.example.com/hotel",
"mobile_link": "https://www.m.example.com/hotel",
"main_media": {
"url": "https://storage.example.com/hotels-assets/image1926.jpg",
"tags": [
"Swimming pool",
"Gym"
]
},
"additional_media": [
{
"url": "https://storage.example.com/hotels-assets/image19262.jpg",
"tags": [
"Lobby view",
"Overview"
]
}
],
"address": {
"line": "1600 Pennsylvania Avenue",
"line2": "Unit 1",
"locality": "Los Angeles",
"postal_code": "90210",
"region": "California",
"country_code": "US"
},
"price": {
"value": "199",
"currency": "USD"
},
"sale_price": {
"value": "299",
"currency": "USD"
},
"neighborhoods": [
"uptown",
"downtown"
],
"geographic_coordinates": {
"longitude": 2.294464,
"latitude": 48.858353
},
"guest_ratings": {
"rating_system": "tripAdvisor",
"score": "7.8",
"max_score": "10",
"number_of_reviewers": "300"
},
"star_rating": "3.5",
"ios_app_link": {
"url": "myapp://a/random/path",
"app_store_id": "427916203",
"app_name": "Snapchat Hotel App"
},
"android_app_link": {
"url": "https://snapchathoteldeeplink.com",
"package": "com.snap.hotel",
"app_name": "Snapchat Hotel App"
},
"loyalty_program": "Premium program",
"custom_labels": {},
"activity": "ACTIVE",
}
},
...
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9156245200715568072",
"external_id": "SC-101",
"created_at": "2020-07-23T14:34:56.532179Z",
"updated_at": "2020-07-23T14:34:56.532202Z",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"name": "Fantastic Hotel",
"description": "This hotel features a restaurant, an outdoor pool, and a front-desk safe.",
"link": "https://www.example.com/hotel",
"brand": "Independent",
"main_media": {
"url": "https://storage.example.com/hotels-assets/image1.jpg",
"tags": ["Lobby View"]
},
"address": {
"line1": "342 Snap Avenue",
"line2": "Unit 505",
"locality": "Las Vegas",
"region": "Nevada",
"postal_code": "90210",
"country": "US"
},
"price": {
"value": "499",
"currency": "USD"
},
"sale_price": {
"value": "599",
"currency": "USD"
},
"neighborhoods": [
"eastside",
],
"geographic_coordinates": {
"longitude": 24.294464,
"latitude": -48.858353
},
"guest_ratings": {
"rating_system": "tripAdvisor",
"score": "7.8",
"max_score": "10",
"number_of_reviewers": "300"
},
"star_rating": "2.5",
"ios_app_link": {
"url": "myapp://a/random/path",
"app_store_id": "427916203",
"app_name": "Snapchat Hotel App"
},
"android_app_link": {
"url": "https://snapchathoteldeeplink.com",
"package": "com.snap.hotel",
"app_name": "Snapchat Hotel App"
},
"loyalty_program": "Loyalty Diamond Program",
"custom_labels": {},
"activity": "ACTIVE",
}
},
]
}
Example 2 - Hotel Search
Request all hotels within a specific Product Set, where the name attribute contains the term 'Snap' or 'elmwood', and the star rating is greater or equal than 3.5.
curl -X POST \
-d '{"filter": {"AND":[{"OR":[{"NAME": {"I_CONTAINS": "Snap"}},{"NAME": {"I_CONTAINS": "elmwood"}}]},{"STAR_RATING": {"GTE": "3.5"}}]}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/hotels/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f19a01000ff00fff430ee807f720001737e616473617069736300016275696c642d63616265303361622d312d3336392d3000010108",
"summary": {
"total_hotels": {
"count": "1",
"relation": "EQ"
}
},
"hotels": [
{
"sub_request_status": "SUCCESS",
"product": {
"id": "9156245200715568072",
"external_id": "SC-101",
"created_at": "2020-07-23T14:34:56.532179Z",
"updated_at": "2020-07-23T14:34:56.532202Z",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"name": "Snapchat Hotel",
"description": "Located in sunny Santa Monica",
"link": "https://www.example.com/hotel",
"mobile_link": "https://www.m.example.com/hotel",
"main_media": {
"url": "https://storage.example.com/hotels-assets/image1926.jpg",
"tags": ["Swimming pool", "Gym"]
},
"additional_media": [
{
"url": "https://storage.example.com/hotels-assets/image19262.jpg",
"tags": ["Lobby view", "Overview"]
}
],
"address": {
"line": "1600 Pennsylvania Avenue",
"line2": "Unit 1",
"locality": "Los Angeles",
"postal_code": "90210",
"region": "California",
"country_code": "US"
},
"price": {
"value": "199",
"currency": "USD"
},
"sale_price": {
"value": "299",
"currency": "USD"
},
"neighborhoods": ["uptown", "downtown"],
"geographic_coordinates": {
"longitude": 2.294464,
"latitude": 48.858353
},
"guest_ratings": {
"rating_system": "tripAdvisor",
"score": "7.8",
"max_score": "10",
"number_of_reviewers": "300"
},
"star_rating": "3.5",
"ios_app_link": {
"url": "myapp://a/random/path",
"app_store_id": "427916203",
"app_name": "Snapchat Hotel App"
},
"android_app_link": {
"url": "https://snapchathoteldeeplink.com",
"package": "com.snap.hotel",
"app_name": "Snapchat Hotel App"
},
"loyalty_program": "Premium program",
"custom_labels": {},
"activity": "ACTIVE"
}
}
]
}
Flight Search
The flight search is used to search a catalog for flights given a provided filter, each level of the filter can only have one operator and we allow up to two levels of nesting, for each operator we can have up to 10 fields
HTTP Request
POST https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/flights/search
Request Parameters
Parameter | Required | Description |
---|---|---|
catalog_id | R | Catalog ID |
Body Parameters
Parameter | Required | Description |
---|---|---|
limit | O | this pagination variable specifies the number of products per page 50 - 1000 |
Filter properties
Property | Possible values | Description |
---|---|---|
ID | - | User specified value |
ORIGIN_AIRPORT | - | User specified value |
DESTINATION_AIRPORT | - | User specified value |
ORIGIN_CITY | - | User specified value |
DESTINATION_CITY | - | User specified value |
PRICE_AMOUNT | - | User specified value |
CUSTOM_LABEL_0 | - | User specified value |
CUSTOM_LABEL_1 | - | User specified value |
CUSTOM_LABEL_2 | - | User specified value |
CUSTOM_LABEL_3 | - | User specified value |
CUSTOM_LABEL_4 | - | User specified value |
ITEM_SET_ID | - | User specified value |
PRODUCT_STATUS | COMPLETE, FAILED | |
ELIGIBLE_AD_TYPE | APP_INSTALL, REMOTE_WEBPAGE, DEEPLINK_ATTACHMENT |
Filter Operator
Operator | Description | Can be used with |
---|---|---|
EQ | Equal to | Integer, Float, String |
NEQ | Not Equal to | Integer, Float, String |
GT | Greater than | Integer, Float |
GTE | Greater than or equal to | Integer, Float |
LT | Less than | Integer, Float |
LTE | Less than or equal to | Integer, Float |
CONTAINS | Contains | String |
NOT_CONTAINS | Does not contain | String |
I_CONTAINS | Contains - Case insensitive | String |
I_NOT_CONTAINS | Does not contain - Case insensitive | String |
STARTS_WITH | Starts with | String |
I_STARTS_WITH | Starts with - Case insensitive | String |
IS_ANY | Is any of the list. Only works with strings containing alphanumeric characters | List of Strings |
IS_NOT_ANY | Is not any of the list. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_ANY | Is any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_NOT_ANY | Is not any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
Example 1 - Flight Search
Request the entire Flight Catalog using a pagination of 50 products, setting "limit":50
attribute achieves this.
curl -X POST \
-d '{"limit": 50}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/flights/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f19a01000ff00fff430ee807f720001737e616473617069736300016275696c642d63616265303361622d312d3336392d3000010108",
"summary": {
"total_flights": {
"count": "209",
"relation": "EQ"
}
},
"paging": {
"next_link": "https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/flights/search?cursor=IlNDLTE1MCI=&limit=50",
"next_link_body": "H4sIAAAAAAAAAONiAAB1-ja7AgAAAA=="
},
"flights": [
{
"sub_request_status": "SUCCESS",
"flight": {
"id": "3675153106588450894",
"external_id": "1",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"created_at": "2022-07-06T01:14:01.354366Z",
"updated_at": "2022-07-06T02:12:36.444333Z",
"origin_airport_code": "BWI",
"destination_airport_code": "SEA",
"link": "https://www.example.com/flights/tt0080339/2",
"description": "Flight to Seattle from Baltimore",
"price": {
"value": "95.00",
"currency": "USD"
},
"main_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/image1.jpg",
"tags": [
"banner"
]
},
"icon_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/icon.jpg",
},
"additional_media": [
{
"url": "https://storage.snap-flights-example.com/flights-assets/image2.jpg",
}
],
"origin_city": "Baltimore",
"destination_city": "Seattle",
"ios_app_link": {
"url": "myapp://a/random/path",
"app_store_id": "427916203",
"app_name": "Snap Flight App"
},
"android_app_link": {
"url": "https://snapairplanedeeplink.com",
"package": "com.snap.airplane",
"app_name": "Snap Flight App"
},
"custom_labels": {}
}
},
...
{
"sub_request_status": "SUCCESS",
"flight": {
"id": "877657809172084551",
"external_id": "6",
"catalog_id": "6d5def3e-a2af-4dcc-88c1-9da72632e25f",
"created_at": "2022-07-06T01:14:01.354366Z",
"updated_at": "2022-07-06T02:12:26.927293Z",
"origin_airport_code": "SFO",
"destination_airport_code": "LAX",
"link": "https://www.example.com/flights/tt0080339/4",
"description": "Flight SFO to LAX",
"price": {
"value": "495.00",
"currency": "USD"
},
"main_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/image1.jpg",
"tags": [
"banner"
]
},
"icon_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/icon.jpg",
},
"additional_media": [
{
"url": "https://storage.snap-flights-example.com/flights-assets/image2.jpg",
}
],
"origin_city": "San Francisco",
"destination_city": "Los Angeles",
"ios_app_link": {
"url": "myapp://a/random/path",
"app_store_id": "427916203",
"app_name": "Snap Flight App"
},
"android_app_link": {
"url": "https://snapairplanedeeplink.com",
"package": "com.movie.airplane",
"app_name": "Snap Flight App"
},
"custom_labels": {}
}
},
]
}
Example 2 - Flight Search
Request all flights within a specific Product Set, where the origin airport attribute contains the term 'BWI'.
-d '{"filter": {"ORIGIN_AIRPORT": {"CONTAINS": "BWI"}}}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/catalogs/8818ff5c-78f7-47db-8a88-675f0b787c78/flights/search
The above command returns JSON structured like this (this response has been shortened):
{
"request_status": "SUCCESS",
"request_id": "5f19a01000ff00fff430ee807f720001737e616473617069736300016275696c642d63616265303361622d312d3336392d3000010108",
"summary": {
"total_flights": {
"count": "209",
"relation": "EQ"
}
},
"flights": [
{
"sub_request_status": "SUCCESS",
"flight": {
"id": "3675153106588450894",
"external_id": "1",
"catalog_id": "8818ff5c-78f7-47db-8a88-675f0b787c78",
"created_at": "2022-07-06T01:14:01.354366Z",
"updated_at": "2022-07-06T02:12:36.444333Z",
"origin_airport_code": "BWI",
"destination_airport_code": "SEA",
"link": "https://www.example.com/flights/tt0080339/2",
"description": "Flight to Seattle from Baltimore",
"price": {
"value": "95.00",
"currency": "USD"
},
"main_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/image1.jpg",
"tags": [
"banner"
]
},
"icon_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/icon.jpg",
},
"additional_media": [
{
"url": "https://storage.snap-flights-example.com/flights-assets/image2.jpg",
}
],
"origin_city": "Baltimore",
"destination_city": "Seattle",
"ios_app_link": {
"url": "myapp://a/random/path",
"app_store_id": "427916203",
"app_name": "Snap Flight App"
},
"android_app_link": {
"url": "https://snapairplanedeeplink.com",
"package": "com.snap.airplane",
"app_name": "Snap Flight App"
},
"custom_labels": {}
}
},
...
{
"sub_request_status": "SUCCESS",
"flight": {
"id": "877657809172084551",
"external_id": "3",
"catalog_id": "6d5def3e-a2af-4dcc-88c1-9da72632e25f",
"created_at": "2022-07-06T01:14:01.354366Z",
"updated_at": "2022-07-06T02:12:26.927293Z",
"origin_airport_code": "BWI",
"destination_airport_code": "LAX",
"link": "https://www.example.com/flights/tt0080339/4",
"description": "Flight BWI to LAX",
"price": {
"value": "295.00",
"currency": "USD"
},
"main_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/image1.jpg",
"tags": [
"banner"
]
},
"icon_media": {
"url": "https://storage.snap-flights-example.com/flights-assets/icon.jpg",
},
"additional_media": [
{
"url": "https://storage.snap-flights-example.com/flights-assets/image2.jpg",
}
],
"origin_city": "Baltimore",
"destination_city": "Los Angeles",
"ios_app_link": {
"url": "myapp://a/random/path",
"app_store_id": "427916203",
"app_name": "Snap Flight App"
},
"android_app_link": {
"url": "https://snapairplanedeeplink.com",
"package": "com.movie.airplane",
"app_name": "Snap Flight App"
},
"custom_labels": {}
}
},
]
}
Product Set
A product set is a group of products from your catalog defined by filters.
Create a Product Set
Parameter | Description |
---|---|
name | Name of the Product Set |
filter | Filter rule to be applied. See table below |
Product Set Filter
Parameter | Description |
---|---|
operator | At most 1 type of logical operator (AND, OR) |
product attribute | The attribute of the product to filter on |
filter operator | The operator to be used |
filter value | The value to be matched |
Filter Operator
Operator | Description | Can be used with |
---|---|---|
EQ | Equal to | Integer, Float, String |
NEQ | Not Equal to | Integer, Float, String |
GT | Greater than | Integer, Float |
GTE | Greater than or equal to | Integer, Float |
LT | Less than | Integer, Float |
LTE | Less than or equal to | Integer, Float |
CONTAINS | Contains | String |
NOT_CONTAINS | Does not contain | String |
I_CONTAINS | Contains - Case insensitive | String |
I_NOT_CONTAINS | Does not contain - Case insensitive | String |
STARTS_WITH | Starts with | String |
I_STARTS_WITH | Starts with - Case insensitive | String |
IS_ANY | Is any of the list. Only works with strings containing alphanumeric characters | List of Strings |
IS_NOT_ANY | Is not any of the list. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_ANY | Is any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
I_IS_NOT_ANY | Is not any of the list - Case insensitive. Only works with strings containing alphanumeric characters | List of Strings |
Product attributes And Supported Filters
Product Attribute | Filter Operators Supported | Filter Value |
---|---|---|
AGE_GROUP | EQ, NEQ | NEWBORN, INFANT, TODDLER, KIDS, ADULT |
AVAILABILITY | EQ, NEQ | IN_STOCK, OUT_OF_STOCK, PREORDER, DISCONTINUED, AVAILABLE_FOR_ORDER |
BRAND | ALL | String, List of Strings |
COLOR | ALL | String, List of Strings |
CONDITION | EQ, NEQ | NEW, REFURBISHED, USED |
CUSTOM_LABEL_0 | ALL | String, List of Strings |
CUSTOM_LABEL_1 | ALL | String, List of Strings |
CUSTOM_LABEL_2 | ALL | String, List of Strings |
CUSTOM_LABEL_3 | ALL | String, List of Strings |
CUSTOM_LABEL_4 | ALL | String, List of Strings |
GENDER | EQ, NEQ | MALE, FEMALE, UNISEX |
GOOGLE_PRODUCT_CATEGORY | ALL | String, List of Strings |
ID | ALL | String, List of Strings |
ITEM_GROUP_ID | ALL | String, List of Strings |
MATERIAL | ALL | String, List of Strings |
PATTERN | ALL | String, List of Strings |
PRICE_AMOUNT | EQ, NEQ, GT, GTE, LT, LTE | Number, 2 decimals |
PRICE_CURRENCY | EQ, NEQ | ISO 4217 currency code |
PRODUCT_TYPE | ALL | String, List of Strings |
SIZE | ALL | String, List of Strings |
TITLE | ALL | String, List of Strings |
API Limits
- Max # of product sets per catalog: 50
- Max # of product sets per batch: 50
- Number of filter rules chained by a logical operator (AND, OR) per product set: 10
- Product set name length: 3-255
- List of Strings for all IS_ANY queries max length: 10
- Any string filter value length: 1-255
Product Set Filter Entry Examples
TITLE contains “Red Shoes"
{"TITLE": {
"CONTAINS": "Red Shoes"
}
}
BRAND is any of “brand1”, “brand2”
{"BRAND": {
"IS_ANY": ["brand1", "brand2"]
}
}
AVAILABILITY is IN_STOCK
Note: Caps separated by underscore should be used for enums.
{"AVAILABILITY": {
"EQ": "IN_STOCK"
}
}
PRICE_AMOUNT greater than US$15.50
Note: Float value should be wrapped in a string
{"AND": [
{"PRICE_AMOUNT": {
"GT": "15.50"
}
},
{"PRICE_CURRENCY": {
"EQ": "US"
}
}
]
}
Filter chaining
Price greater than $15.50 and availability is in stock. Only one operator is allowed at a time.
{"AND": [
{"PRICE_AMOUNT": {
"GT": "15.50"
}
},
{"AVAILABILITY": {
"EQ": "IN_STOCK"
}
}
]
}
Create a Product Set
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
-d '{"product_sets": [{"name": "In Stock", "filter": {"AVAILABILITY": {"EQ": "IN_STOCK"}}}]}' \
https://adsapi.snapchat.com/v1/catalogs/306544db-be30-472c-ab87-c277b4d61d0f/product_sets
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "caf894e2-3bd1-420a-ae3a-5b1a19289488",
"product_sets": [
{
"sub_request_status": "SUCCESS",
"product_set": {
"id": "8d2d659e-0e3c-4938-a417-09d1a8fa4348",
"catalog_id": "306544db-be30-472c-ab87-c277b4d61d0f",
"name": "In Stock",
"filter": {
"AVAILABILITY": {
"EQ": "IN_STOCK"
}
},
"created_at": "2019-06-14T18:38:49.640871Z",
"updated_at": "2019-06-14T18:38:49.640871Z"
}
}
]
}
This creates an Product Set within a Catalog.
Attributes
Attribute | Description | Required | Possible Values |
---|---|---|---|
name | Name of the Product Set | Yes | |
filter | Filter rule to be applied | Yes | See tables above |
HTTP Request
POST https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/product_sets
Parameters
Parameter | Default | Description |
---|---|---|
catalog_id | Catalog ID |
ERRORS
Error | Cause |
---|---|
CAT_VALIDATION_ERROR_INVALID_PRODUCT_SET_FILTER | Thrown when the product set filter provided is invalid |
CAT_VALIDATION_ERROR_MAX_PRODUCT_SET_COUNT_FOR_CATALOG_REACHED | Thrown when the maximum product set count for catalog has been reached |
CAT_VALIDATION_ERROR_MAX_PRODUCT_SET_FILTER_ENTRY_COUNT_REACHED | Thrown if the max product set filter entry count is reached |
CAT_VALIDATION_ERROR_TOO_MANY_PRODUCT_SETS_IN_BATCH | Thrown when there are too many product sets in a batch |
CAT_VALIDATION_ERROR_PRODUCT_SET_NAME_LENGTH_INVALID | Thrown if the product set name length is not valid |
CAT_VALIDATION_ERROR_INVALID_PRODUCT_SET_ID | Thrown if the product set id provided is invalid |
CAT_VALIDATION_ERROR_INVALID_PAGINATION_READ_LIMIT | Thrown if the read limit specified by user is invalid |
CAT_VALIDATION_ERROR_READ_LIMIT_MUST_BE_SPECIFIED | Thrown if only pagination cursor is provided but not an explicit read limit |
CAT_VALIDATION_ERROR_INVALID_CURSOR | Thrown if the pagination cursor provided by the user is invalid |
Update a Product Set
curl -X PUT -H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
-d '{"product_sets": [{ "id": "8d2d659e-0e3c-4938-a417-09d1a8fa4348","name": "In Stock & Red","filter": {"AND": [{"AVAILABILITY": {"EQ": "IN_STOCK"}},{"COLOR": {"IS_ANY": ["red"]}}]}}]}' \
https://adsapi.snapchat.com/v1/product_sets
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "caf894e2-3bd1-420a-ae3a-5b1a19289488",
"product_sets": [
{
"sub_request_status": "SUCCESS",
"product_set": {
"id": "8d2d659e-0e3c-4938-a417-09d1a8fa4348",
"catalog_id": "306544db-be30-472c-ab87-c277b4d61d0f",
"name": "In Stock & Red",
"filter": {
"AND": [
{
"AVAILABILITY": {
"EQ": "IN_STOCK"
}
},
{
"COLOR": {
"IS_ANY": ["red"]
}
}
]
},
"created_at": "2019-06-14T18:38:49.640871Z",
"updated_at": "2019-06-14T20:38:49.640871Z"
}
}
]
}
This endpoint will update a specified Product Set.
HTTP Request
PUT https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/product_sets
Parameters
Parameter | Default | Description |
---|---|---|
catalog_id | Catalog ID |
Delete a Product Set
curl -X DELETE -H https://adsapi.snapchat.com/v1/product_sets/8d2d659e-0e3c-4938-a417-09d1a8fa4348 \
-H "Authorization: Bearer meowmeowmeow"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "caf894e2-3bd1-420a-ae3a-5b1a19289488",
"product_sets": []
}
This endpoint will delete a specified Product Set.
HTTP Request
PUT https://adsapi.snapchat.com/v1/product_sets/{product_set_id}
Parameters
Parameter | Default | Description |
---|---|---|
catalog_id | Catalog ID |
Get All Product Sets
curl
"https://adsapi.snapchat.com/v1/catalogs/306544db-be30-472c-ab87-c277b4d61d0f/product_sets?cursor=abc123&limit=50" \
-H "Authorization: Bearer meowmeowmeow"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "caf894e2-3bd1-420a-ae3a-5b1a19289488",
"product_sets": [
{
"sub_request_status": "SUCCESS",
"product_set": {
"id": "8d2d659e-0e3c-4938-a417-09d1a8fa4348",
"catalog_id": "306544db-be30-472c-ab87-c277b4d61d0f",
"name": "In Stock",
"filter": {
"AVAILABILITY": {
"EQ": "IN_STOCK"
}
},
"created_at": "2019-06-14T18:38:49.640871Z",
"updated_at": "2019-06-14T18:38:49.640871Z"
}
}
],
"paging": {
"next_link": "https://adsapi.snapchat.com/v1/catalogs/306544db-be30-472c-ab87-c277b4d61d0f/product_sets?cursor=def456&limit=50"
}
}
This endpoint will get all the Product Sets within the Catalog.
HTTP Request
GET https://adsapi.snapchat.com/v1/catalogs/{catalog_id}/product_sets?cursor=abc123&limit=50
Parameters
Parameter | Default | Description |
---|---|---|
catalog_id | Catalog ID |
Get a Product Set by ID
curl
"https://adsapi.snapchat.com/v1/product_sets/8d2d659e-0e3c-4938-a417-09d1a8fa4348" \
-H "Authorization: Bearer meowmeowmeow"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "caf894e2-3bd1-420a-ae3a-5b1a19289488",
"product_sets": [
{
"sub_request_status": "SUCCESS",
"product_set": {
"id": "8d2d659e-0e3c-4938-a417-09d1a8fa4348",
"catalog_id": "306544db-be30-472c-ab87-c277b4d61d0f",
"name": "In Stock",
"filter": {
"AVAILABILITY": {
"EQ": "IN_STOCK"
}
},
"created_at": "2019-06-14T18:38:49.640871Z",
"updated_at": "2019-06-14T18:38:49.640871Z"
}
}
]
}
This endpoint will get a specified Product Set.
HTTP Request
GET: https://adsapi.snapchat.com/v1/product_sets/{product_set_id}
Parameters
Parameter | Default | Description |
---|---|---|
product_set_id | Product Set ID |
Create the Campaign
For DPA, the following fields have been updated or added to the Campaign object:
Attribute | Description | Required | Possible Values |
---|---|---|---|
product_properties | Product Properties to be associated with the Campaign | Yes | See table below |
product_properties
Attribute | Description | Required | Possible Values |
---|---|---|---|
catalog_id | The Product Catalog ID to be associated with the Campaign | Yes | "product_properties": {"catalog_id": "1bcfb8cd-2e57"} |
curl -X POST \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '"campaigns": [{"name": "First DPA campaign", "ad_account_id": "497979f0-ed17-4971-8288-054883f1cbca","daily_budget_micro": "100000000000","status": "PAUSED","start_time": "2019-12-01T17:12:49.707Z","end_time": "2019-12-12T17:12:49.707Z","product_properties" : {"catalog_id": "079d2a83-e422-4c0e-918b-8db17f087205"}}]}' \
"https://adsapi.snapchat.com/v1/adaccounts/{ad_acount_id}/campaigns"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5d8bd65100ff0d03b71380cd950001737e616473617069736300016275696c642d34353936393233352d312d3239312d3100010119",
"campaigns": [
{
"sub_request_status": "SUCCESS",
"campaign": {
"id": "41b98396-4aaa-4a8e-acd4-50d25ac87488",
"updated_at": "2019-09-25T21:04:18.433Z",
"created_at": "2019-09-25T21:04:18.433Z",
"name": "First DPA campaign",
"ad_account_id": "497979f0-ed17-4971-8288-054883f1cbca",
"daily_budget_micro": 100000000000,
"status": "PAUSED",
"objective": "BRAND_AWARENESS",
"start_time": "2019-12-01T17:12:49.707Z",
"end_time": "2019-12-12T17:12:49.707Z",
"product_properties": {
"catalog_id": "079d2a83-e422-4c0e-918b-8db17f087205"
}
}
}
]
}
Pixel
The Pixel associated with the Ad Account will be the one assumed as the event source for targeting.
Create the Ad Squad
DPA Ad Squads have specific requirements for the targeting
and optimization_goal
attributes, DPA Ad Squads also require the
product_properties
attribute.
Attribute | Description | Required | Possible Values |
---|---|---|---|
campaign_id | Campaign ID | R | |
bid_micro | Max Bid (micro-currency) | R | Minimum value 10000 , Maximum value 1000000000 |
billing_event | Billing Event | R | IMPRESSION |
daily_budget_micro | Daily Budget (micro-currency) | one of daily_budget_micro or lifetime_budget_micro must be set | Minimum value 5000000 across all supported currencies |
lifetime_budget_micro | Lifetime budget (micro-currency) | one of lifetime_budget_micro or daily_budget_micro must be set | |
end_time | End time | O | |
name | Ad Squad name | R | |
optimization_goal | Optimization Goal | R | For prospecting; IMPRESSIONS, SWIPES, APP_INSTALLS, VIDEO_VIEWS, VIDEO_VIEWS_15_SEC, PIXEL_PAGE_VIEW, PIXEL_ADD_TO_CART, PIXEL_PURCHASE, PIXEL_SIGNUP, APP_ADD_TO_CART, APP_PURCHASE, APP_SIGNUP , For re-targeting; PIXEL_PURCHASE, PIXEL_PAGE_VIEW, PIXEL_ADD_TO_CART, APP_PURCHASE, APP_SIGN_UP, APP_ADD_TO_CART, SWIPES |
placement_v2 | Placement | R | Json object containing advanced placement options See placement_v2 |
start_time | Start time | O | |
status | Ad Squad status | R | ACTIVE, PAUSED |
story_ad_creative_type | Indicates the type of Creative used in Dynamic Story Ads, required when using Dynamic Story Ads | O | APP_INSTALL, WEB_VIEW, DEEP_LINK |
targeting | Targeting spec | R | Must contain product_audiences array for retargeting. For prospecting, the product_audiences array is optional and you can omit the array if you don't use the Snap Pixel, also see App Install states targeting |
type | Ad Squad Type | R | SNAP_ADS |
cap_and_exclusion_config | The frequency cap and exclusion spec | O | |
ad_scheduling_config | The schedule for running ads | O | |
bid_strategy | Bidding strategy for this Ad Squad | R | AUTO_BID, LOWEST_COST_WITH_MAX_BID, MIN_ROAS, TARGET_COST, see bid_strategy |
roas_value_micro | The minimum ROAS for the MIN_ROAS BidStrategy | R if BidStrategy = MIN_ROAS | Minimum desired ROAS |
pixel_id | Pixel to be associated with the Ad Squad | Required for retargeting, Optional for prospecting | |
measurement_provider_names | approved measurement provider | O | MOAT_SS, DOUBLEVERIFY |
delivery_constraint | Type of delivery | R | DAILY_BUDGET (when using daily_budget_micro), LIFETIME_BUDGET (when using lifetime_budget_micro) |
pacing_type | Type of pacing | O | STANDARD (default), ACCELERATED |
event_sources | Snap App Id to be associated with the Ad Squad | O | Availble for Dynamic Product Ads when using APP_INSTALL / DEEP_LINK, see App Install states |
For DPA, the following attribute has been added to the Ad Squad object. Only retargeting and prospecting are supported now, cross-sell and upsell use cases will be supported soon.
Attribute | Description | Required | Possible Values |
---|---|---|---|
product_properties | Product Properties to be associated with the Ad Squad | R | See table below |
product_properties
Attribute | Description | Required | Possible Values |
---|---|---|---|
product_set_id | The Product Set ID to be associated with the Ad Squad | R | "product_properties": {"catalog_id": "1bcfb8cd-2e57"} |
catalog_vertical | Catalog vertical, automatically set by the Catalog | Read-only | COMMERCE, HOTELS, PLACES, FLIGHTS |
product_audiences
Attribute | Description | Required | Possible Values |
---|---|---|---|
event_type | The Pixel or App event type to be targeted | R | Only PAGE_VIEW, VIEW_CONTENT, ADD_CART, PURCHASE are supported |
product_set | The Product Set ID used to track pixel events against | R | For retargeting, product_set must match product_set_id on the Ad Squad |
retention_seconds | Retention in seconds | R | Min 86400 (1 day), Max 2592000 (30 days) |
operation | Operation to be applied | R | INCLUDE or EXCLUDE |
Prospecting Ad Squad
Prospecting does not require that the Snap Pixel is activated at Ad Account level and associated with the Ad Squad, having a pixel however will allow you to track PIXEL_PURCHASE events which along with the purchase value and transaction id will allow you to calculate a Return on Ad Spend.
Prospecting Example
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
-d '{"adsquads": [{"name": "DPA Prospecting Ad Squad example","optimization_goal": "IMPRESSIONS","status": "ACTIVE","campaign_id": "4114749d-7362-42e8-b05d-48ef7984a91d","type": "SNAP_ADS","targeting": {"regulated_content": false,"geos": [{"country_code": "us"}],"product_audiences": [{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "PAGE_VIEW","retention_seconds": 1209600,"operation": "EXCLUDE"},{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "ADD_CART","retention_seconds": 1209600,"operation": "EXCLUDE"},{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "PURCHASE","retention_seconds": 1209600,"operation": "EXCLUDE"},{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "VIEW_CONTENT","retention_seconds": 1209600,"operation": "EXCLUDE"}],"auto_expansion_options":{"interest_expansion_option":{"enabled": true},"custom_audience_expansion_option":{"enabled": true}}},"placement_v2": {"config": "AUTOMATIC"},"billing_event": "IMPRESSION","bid_strategy": "AUTO_BID","daily_budget_micro": 50000000,"start_time": "2020-06-16T23:25:34.370Z","end_time": "2020-06-21T06:59:59.000Z","pixel_id": "9315b2c2-3680-411d-b6c1-d17de25fc1e0","delivery_constraint": "DAILY_BUDGET","pacing_type": "STANDARD","product_properties": {"product_set_id": "da17a495-0392-448f-b4f4-f027ecdcb794"}}]}' \
https://adsapi.snapchat.com/v1/campaigns/4114749d-7362-42e8-b05d-48ef7984a91d/adsquads
The above example request for Prospecting returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5eea238500ff08f85033418b420001737e616473617069736300016275696c642d37316537353330622d312d3335392d3300010129",
"adsquads": [
{
"sub_request_status": "SUCCESS",
"adsquad": {
"id": "5d9556b8-eb0c-4209-b23a-385a79918e6b",
"updated_at": "2020-06-17T14:07:02.933Z",
"created_at": "2020-06-17T14:07:02.933Z",
"name": "DPA Prospecting Ad Squad example",
"status": "ACTIVE",
"campaign_id": "4114749d-7362-42e8-b05d-48ef7984a91d",
"type": "SNAP_ADS",
"targeting": {
"regulated_content": false,
"geos": [
{
"country_code": "us"
}
],
"product_audiences": [
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "PAGE_VIEW",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
},
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "ADD_CART",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
},
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "PURCHASE",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
},
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "VIEW_CONTENT",
"retention_seconds": 2592000,
"operation": "EXCLUDE"
}
],
"auto_expansion_options": {
"interest_expansion_option": {
"enabled": true
},
"custom_audience_expansion_option": {
"enabled": true
}
}
},
"targeting_reach_status": "VALID",
"placement_v2": {
"config": "AUTOMATIC"
},
"billing_event": "IMPRESSION",
"auto_bid": true,
"target_bid": false,
"bid_strategy": "AUTO_BID",
"daily_budget_micro": 50000000,
"start_time": "2020-06-16T23:25:34.370Z",
"end_time": "2020-06-21T06:59:59.000Z",
"optimization_goal": "IMPRESSIONS",
"pixel_id": "9315b2c2-3680-411d-b6c1-d17de25fc1e0",
"delivery_constraint": "DAILY_BUDGET",
"pacing_type": "STANDARD",
"product_properties": {
"product_set_id": "da17a495-0392-448f-b4f4-f027ecdcb794",
"catalog_vertical": "COMMERCE"
}
}
}
]
}
In the following example of product_audiences
we target all users who haven't triggered the specific events PAGE_VIEW, ADD_CART, PURCHASE,
VIEW_CONTENT on your website/app for the past 14 days = 1209600 seconds.
"product_audiences": [
{
"product_set": "{{product_set_id}}",
"event_type": "PAGE_VIEW",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
},
{
"product_set": "{{product_set_id}}",
"event_type": "ADD_CART",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
},
{
"product_set": "{{product_set_id}}",
"event_type": "PURCHASE",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
},
{
"product_set": "{{product_set_id}}",
"event_type": "VIEW_CONTENT",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
}
]
Retargeting Ad Squad
Retargeting requires that you have a Pixel activated and associated with the Ad Squad.
Retargeting Example 1
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
-d '{"adsquads": [{"name": "DPA Retargeting Ad Squad - Viewers and Add Cart","optimization_goal": "SWIPES","status": "ACTIVE","campaign_id": "4114749d-7362-42e8-b05d-48ef7984a91d","type": "SNAP_ADS","targeting": {"regulated_content": false,"geos": [{"country_code": "us"}],"product_audiences": [{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "PAGE_VIEW","retention_seconds": 1209600,"operation": "INCLUDE"},{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "ADD_CART","retention_seconds": 1209600,"operation": "INCLUDE"},{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "PURCHASE","retention_seconds": 1209600,"operation": "EXCLUDE"},{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "VIEW_CONTENT","retention_seconds": 1209600,"operation": "INCLUDE"}],"auto_expansion_options":{"interest_expansion_option":{"enabled": true},"custom_audience_expansion_option":{"enabled": true}}},"placement_v2": {"config": "AUTOMATIC"},"billing_event": "IMPRESSION","bid_strategy": "TARGET_COST","bid_micro": 1000000,"daily_budget_micro": 50000000,"start_time": "2020-06-16T23:25:34.370Z","end_time": "2020-06-21T06:59:59.000Z","pixel_id": "9315b2c2-3680-411d-b6c1-d17de25fc1e0","delivery_constraint": "DAILY_BUDGET","pacing_type": "STANDARD","product_properties": {"product_set_id": "da17a495-0392-448f-b4f4-f027ecdcb794"}}]}' \
https://adsapi.snapchat.com/v1/campaigns/4114749d-7362-42e8-b05d-48ef7984a91d/adsquads
The above request for Retargeting Example 1 returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5eea3a9800ff07b42dbea034bf0001737e616473617069736300016275696c642d37316537353330622d312d3335392d3300010122",
"adsquads": [
{
"sub_request_status": "SUCCESS",
"adsquad": {
"id": "a7171164-12b0-4576-a441-52eb57679ede",
"updated_at": "2020-06-17T03:44:19.788Z",
"created_at": "2020-06-17T00:44:19.486Z",
"name": "DPA Retargeting Ad Squad - Viewers and Add Cart",
"status": "ACTIVE",
"campaign_id": "4114749d-7362-42e8-b05d-48ef7984a91d",
"type": "SNAP_ADS",
"targeting": {
"regulated_content": false,
"geos": [
{
"country_code": "us"
}
],
"product_audiences": [
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "PAGE_VIEW",
"retention_seconds": 1209600,
"operation": "INCLUDE"
},
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "ADD_CART",
"retention_seconds": 1209600,
"operation": "INCLUDE"
},
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "PURCHASE",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
},
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "VIEW_CONTENT",
"retention_seconds": 1209600,
"operation": "INCLUDE"
}
],
"auto_expansion_options": {
"interest_expansion_option": {
"enabled": true
},
"custom_audience_expansion_option": {
"enabled": true
}
}
},
"targeting_reach_status": "VALID",
"placement_v2": {
"config": "AUTOMATIC"
},
"billing_event": "IMPRESSION",
"bid_micro": 1000000,
"bid_strategy": "TARGET_COST",
"daily_budget_micro": 50000000,
"start_time": "2020-06-16T23:25:34.370Z",
"end_time": "2020-06-21T06:59:59.000Z",
"optimization_goal": "SWIPES",
"pixel_id": "9315b2c2-3680-411d-b6c1-d17de25fc1e0",
"delivery_constraint": "DAILY_BUDGET",
"pacing_type": "STANDARD",
"product_properties": {
"product_set_id": "da17a495-0392-448f-b4f4-f027ecdcb794",
"catalog_vertical": "COMMERCE"
}
}
}
]
}
In the following example of product_audiences
we target all users who have triggered the specific events PAGE_VIEW, ADD_CART,
VIEW_CONTENT, but not triggered a PURCHASE event on your website/app in the past 14 days = 1209600 seconds.
"product_audiences": [
{
"product_set": "{{product_set_id}}",
"event_type": "PAGE_VIEW",
"retention_seconds": 1209600,
"operation": "INCLUDE"
},
{
"product_set": "{{product_set_id}}",
"event_type": "VIEW_CONTENT",
"retention_seconds": 1209600,
"operation": "INCLUDE"
},
{
"product_set": "{{product_set_id}}",
"event_type": "ADD_CART",
"retention_seconds": 1209600,
"operation": "INCLUDE"
},
{
"product_set": "{{product_set_id}}",
"event_type": "PURCHASE",
"retention_seconds": 1209600,
"operation": "EXCLUDE"
}
]
Retargeting Example 2
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
-d '{"adsquads": [{"name": "DPA Retargeting Ad Squad - Add Cart","optimization_goal": "PIXEL_PURCHASE","status": "ACTIVE","campaign_id": "4114749d-7362-42e8-b05d-48ef7984a91d","type": "SNAP_ADS","targeting": {"regulated_content": false,"geos": [{"country_code": "us"}],"product_audiences": [{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "ADD_CART","retention_seconds": 2592000,"operation": "INCLUDE"},{"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794","event_type": "PURCHASE","retention_seconds": 2592000,"operation": "EXCLUDE"}],"auto_expansion_options":{"interest_expansion_option":{"enabled": true},"custom_audience_expansion_option":{"enabled": true}}},"placement_v2": {"config": "AUTOMATIC"},"billing_event": "IMPRESSION","bid_strategy": "TARGET_COST","bid_micro": 1000000,"daily_budget_micro": 50000000,"start_time": "2020-06-16T23:25:34.370Z","end_time": "2020-06-21T06:59:59.000Z","pixel_id": "9315b2c2-3680-411d-b6c1-d17de25fc1e0","delivery_constraint": "DAILY_BUDGET","pacing_type": "STANDARD","product_properties": {"product_set_id": "da17a495-0392-448f-b4f4-f027ecdcb794"}}]}' \
https://adsapi.snapchat.com/v1/campaigns/4114749d-7362-42e8-b05d-48ef7984a91d/adsquads
The above request for Retargeting Example 2 returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5eea3a9800ff07b42dbea034bf0001737e616473617069736300016275696c642d37316537353330622d312d3335392d3300010122",
"adsquads": [
{
"sub_request_status": "SUCCESS",
"adsquad": {
"id": "a7171164-12b0-4576-a441-52eb57679ede",
"updated_at": "2020-06-15T03:44:19.788Z",
"created_at": "2020-06-15T00:44:19.486Z",
"name": "DPA Retargeting Ad Squad - Add Cart",
"status": "ACTIVE",
"campaign_id": "4114749d-7362-42e8-b05d-48ef7984a91d",
"type": "SNAP_ADS",
"targeting": {
"regulated_content": false,
"geos": [
{
"country_code": "us"
}
],
"product_audiences": [
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "ADD_CART",
"retention_seconds": 2592000,
"operation": "INCLUDE"
},
{
"product_set": "da17a495-0392-448f-b4f4-f027ecdcb794",
"event_type": "PURCHASE",
"retention_seconds": 2592000,
"operation": "EXCLUDE"
}
],
"auto_expansion_options": {
"interest_expansion_option": {
"enabled": true
},
"custom_audience_expansion_option": {
"enabled": true
}
}
},
"targeting_reach_status": "VALID",
"placement_v2": {
"config": "AUTOMATIC"
},
"billing_event": "IMPRESSION",
"bid_micro": 1000000,
"bid_strategy": "TARGET_COST",
"daily_budget_micro": 50000000,
"start_time": "2020-06-18T23:25:34.370Z",
"end_time": "2020-06-21T06:59:59.000Z",
"optimization_goal": "PIXEL_PURCHASE",
"pixel_id": "9315b2c2-3680-411d-b6c1-d17de25fc1e0",
"delivery_constraint": "DAILY_BUDGET",
"pacing_type": "STANDARD",
"product_properties": {
"product_set_id": "da17a495-0392-448f-b4f4-f027ecdcb794"
}
}
}
]
}
In the following example of product_audiences
we target all users who have triggered ADD_CART, but not triggered a PURCHASE event on your
website/app, in the past 30 days = 2592000 seconds.
"product_audiences": [
{
"product_set": "{{product_set_id}}",
"event_type": "ADD_CART",
"retention_seconds": 2592000,
"operation": "INCLUDE"
},
{
"product_set": "{{product_set_id}}",
"event_type": "PURCHASE",
"retention_seconds": 2592000,
"operation": "EXCLUDE"
}
]
Create a Creative
For DPA, the following fields have been updated or added to the Creative object. Only Creatives of type WEB_VIEW, APP_INSTALL and DEEP_LINK are supported now.
Attribute | Description | Required | Possible Values |
---|---|---|---|
render_type | Render Type | Yes | DYNAMIC (required for DPA) |
type | Type of the Creative | Yes | Must be set to WEB_VIEW, APP_INSTALL or DEEP_LINK for render_type=DYNAMIC. If type is APP_INSTALL or DEEP_LINK, Campaign must contain “measurement_spec” for proper tracking. |
dynamic_render_properties | Properties to be set when render_type is DYNAMIC | Yes | See table below |
url_macro_parameters | Property that provides url macro parameters appended to all product urls | O | Supported macros:
Format eg: utm_campaign=campaign.id&utm_term=ad.name |
IMPORTANT! Shopify advertisers using the Snapchat Ads App for Shopify will have their "snap_campaign_id" URL parameter set to a default, unique identifier for web view and deep link ads. This is to ensure proper attribution in the Shopify Admin Dashboard. The "snap_campaign_id" URL parameter cannot be overwritten by the Snapchat URL Macros builder or with url_macro_parameters.
dynamic_render_properties
Attribute | Description | Required | Possible Values |
---|---|---|---|
dynamic_template_id | ID of the Dynamic template to be used | R | Dynamic Template ID |
product_set_id | ID of the Product Set from which products will be selected to be shown in the ads | Yes | Valid Product Set ID. Product Set must exist. Product Set must have products. Must match Ad Squad’s product_set_id. |
curl -X POST \
-d '{"creatives": [{"name": "DPA Ad", "ad_account_id": "497979f0-ed17-4971-8288-054883f1cbca", "type": "WEB_VIEW", "headline": "Shopping Forever", "brand_name": "DPA Brand", "call_to_action": "SHOP_NOW", "render_type": "DYNAMIC", "url_macro_parameters": "utm_campaign=adset.name&utm_content=ad.id", "dynamic_render_properties": {"dynamic_template_id": "75aa5c00-cabf-4b37-991a-7462ecf9a1cc", "product_set_id": "62984de1-0c0c-46e6-a21b-14e9cf5e2523"}}]}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/adaccounts/497979f0-ed17-4971-8288-054883f1cbca/creatives
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5d8c2f9c00ff051b94bb93a0a70001737e616473617069736300016275696c642d35653536303765312d312d3239312d3500010124",
"creatives": [
{
"sub_request_status": "SUCCESS",
"creative": {
"id": "bb0c57ca-8bf2-4f15-8162-704e9c33d88e",
"updated_at": "2019-09-26T03:25:16.459Z",
"created_at": "2019-09-26T03:25:16.459Z",
"name": "DPA Ad",
"ad_account_id": "497979f0-ed17-4971-8288-054883f1cbca",
"type": "WEB_VIEW",
"packaging_status": "SUCCESS",
"review_status": "PENDING_REVIEW",
"shareable": true,
"headline": "Shopping Forever",
"brand_name": "DPA Brand",
"call_to_action": "SHOP_NOW",
"render_type": "DYNAMIC",
"dynamic_render_properties": {
"dynamic_template_id": "75aa5c00-cabf-4b37-991a-7462ecf9a1cc",
"product_set_id": "62984de1-0c0c-46e6-a21b-14e9cf5e2523"
},
"top_snap_crop_position": "MIDDLE",
"ad_product": "SNAP_AD"
}
}
]
}
Create the Ad
For DPA, the following fields have been updated or added to the Ad object.
Attribute | Description | Required | Possible Values |
---|---|---|---|
creative_id | ID of the Creative to be used | Yes | product_set_id of the Creative used must match the product_set_id on the Ad Squad associated with this Ad. |
ad_squad_id | ID of the Ad Squad | Yes | Ad Squad must have a product_set_id associated with it. And product_set_id of the Creative used must match the product_set_id on the Ad Squad associated with this Ad. |
type | Type of the Ad | Yes | Must be set to REMOTE_WEBPAGE, APP_INSTALL or DEEP_LINK. If type is APP_INSTALL or DEEP_LINK, Campaign must contain “measurement_spec” for proper tracking. |
render_type | The render type for the Dynamic Product Ad | Required | DYNAMIC |
curl -X POST \
-d '{"ads": [{"name": "DPA Ad", "ad_squad_id": "57d7ad65-1a40-40da-9443-6eafb15b0273", "creative_id": "bb0c57ca-8bf2-4f15-8162-704e9c33d88e", "status": "PAUSED", "type": "REMOTE_WEBPAGE", "render_type": "DYNAMIC"}]}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/adsquads/57d7ad65-1a40-40da-9443-6eafb15b0273/ads
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5d8c331f00ff0a2bc7749e4dbc0001737e616473617069736300016275696c642d35653536303765312d312d3239312d3500010145",
"ads": [
{
"sub_request_status": "SUCCESS",
"ad": {
"id": "1c0deb89-bf95-458f-9c57-32c736046135",
"updated_at": "2019-09-26T03:40:16.264Z",
"created_at": "2019-09-26T03:40:16.264Z",
"name": "DPA Ad",
"ad_squad_id": "57d7ad65-1a40-40da-9443-6eafb15b0273",
"creative_id": "bb0c57ca-8bf2-4f15-8162-704e9c33d88e",
"status": "PAUSED",
"type": "REMOTE_WEBPAGE",
"render_type": "DYNAMIC",
"review_status": "APPROVED"
}
}
]
}
Dynamic Templates
Dynamic Templates allows you to construct your own product template for use with your Dynamic Ads. The Dynamic Template entity is made up of a combination of Overlays and Text Overlays which define what the template will look like when it renders.
Dynamic Template Attributes
Name | Description | Required | Possible Values |
---|---|---|---|
ad_account_id | Ad Account ID | R | |
name | Template Name | R | Max length 375 characters |
ios_url | The URL which will render the Ad | R | https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html |
android_url | The URL which will render the Ad | R | https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html |
layout | Layout of the template | R | AUTOMATIC, FILL_WIDTH, FILL_HEIGHT, FIT, HEADER, TILT, CAROUSEL*, SLIDESHOW* |
text_fields | Text field out of Catalog attributes | R | Array with a maximum of two Text fields from the Catalog attributes |
background_color | Background color of template | O | Represented as three- or six-digit hexadecimal number |
preferred_image_tags | Array of Image tags out of your Product Feed | O | A list of Image tags from your product feed, see section on preferred_image_tags |
overlay_specs | Array of Overlay elements | O | See Overlay table |
* The CAROUSEL and SLIDESHOW layout requires that the Creative is a Collection Ad.
Overlay Attributes
Name | Description | Required | Possible Values |
---|---|---|---|
type | The type of overlay | R | IMAGE, FRAME, TEXT |
media_id | Media ID of an IMAGE/FRAME type overlay | O, R when type is IMAGE/FRAME | Media ID |
text | The text of a TEXT type overlay | O | Max length 34 characters |
position | Position of the overlay | R | BOTTOM_MIDDLE, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER, TOP_MIDDLE, TOP_LEFT, TOP_RIGHT, must be CENTER if type is FRAME |
opacity | Opacity of the overlay | O | Integer, between 75-100 |
text_overlay_properties | Text Overlay | O | See Text Overlay table |
Text Overlay Attributes
Name | Description | Required | Possible Values |
---|---|---|---|
shape | Background shape of text overlay, NONE means no shape underneath text | R | NONE, CIRCLE, PILL, RECTANGLE |
shape_color | Color of background of text overlay | O | Represented as three- or six-digit hexadecimal number |
text_color | Color of the text in the text overlay | R | Represented as three- or six-digit hexadecimal number |
Preferred Image Tags
If your product feed includes additional image you have the option of using preferred_image_tags
for your Dynamic Template.
When your Dynamic Template includes the preferred_image_tags
attribute the Template will first attempt to fetch the image url as specified
by your product feed and none of the other features within the Dynamic Template will be used. If no corresponding image url can be found in
your product feed the Overlay will be used.
Preferred Image Tags Example
Product Feed Column | Value | Description |
---|---|---|
image[0].url | https://www.renderingurl.com?tag=x | url to be rendered when tag[0] is specified |
image[0].tag[0] | x | tag value mapping to image[0] |
image[1].url | https://www.renderingurl.com?tag=y | url to be rendered when tag[1] is specified |
image[1].tag[0] | y | tag value mapping to image[1] |
Given the above Product Feed specification the Dynamic Template can make use of the following preferred_image_tags
attribute:
"preferred_image_tags": [ "x", "y" ]
The behaviour of the Dynamic Template in this scenario would be to first check if there is a corresponding value for the tag x, in this case the url https://www.renderingurl.com?tag=x is available, this would be requested and it would return a rendered image to be used in place of the Overlay.
Assuming there had been no corresponding image url for the listed tags the Dynamic Template would instead have used the Overlay.
Media Requirements
The Media used for IMAGE/FRAME overlays within a Dynamic Template have the following requirements.
File Requirements
Name | Description | File Type | File Dimension | File size |
---|---|---|---|---|
Overlay Frame | Used as frame | JPG or PNG | 1080px * 1920px | maximum 2mb |
Overlay Image | Used as logo | JPG or PNG | 200px * 200px | maximum 2mb |
Media Requirements
Attribute | Description | Required | Possible Values |
---|---|---|---|
ad_account_id | Ad Account ID | R | |
name | Media name | R | |
type | Media Type | R | IMAGE |
visibility | R | INVISIBLE |
Create Dynamic Template
curl -X POST \
-d '{"dynamic_templates": [{"ad_account_id": "82225ba6-7559-4000-9663-bace8adff5f2","name": "Test Template III","ios_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html","android_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html","layout": "FILL_WIDTH","text_fields": ["title","price"],"background_color": "FFFF00","overlay_specs": [{"type": "IMAGE","media_id": "e292db69-139f-41fb-b79b-4cb7ab2e9840","position": "BOTTOM_LEFT"},{"type": "FRAME","media_id": "e8aa0151-9a6f-48a0-bcaa-82fc4f714161","position": "CENTER","opacity": "80"},{"type": "TEXT","text": "meow meow","position": "BOTTOM_RIGHT","opacity": "80","text_overlay_properties": {"shape": "CIRCLE","shape_color": "09C","text_color": "4287F5"}},{"type": "TEXT","text": "woof woof","position": "TOP_RIGHT","opacity": "80","text_overlay_properties": {"shape": "PILL","shape_color": "09C","text_color": "000"}}]}]}' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer meowmeowmeow" \
https://adsapi.snapchat.com/v1/adaccounts/22225ba6-7559-4000-9663-bace8adff5f2/dynamic_templates
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ee4011200ff030f7b28c958f70001737e616473617069736300016275696c642d32313965343130312d312d3335382d310001010a",
"dynamic_templates": [
{
"sub_request_status": "SUCCESS",
"dynamic_template": {
"id": "a523ad2d-226a-40c1-8645-4420cac49b76",
"updated_at": "2020-06-12T22:26:26.638Z",
"created_at": "2020-06-12T22:26:26.638Z",
"name": "Test Template III",
"ad_account_id": "82225ba6-7559-4000-9663-bace8adff5f2",
"ios_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"android_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"layout": "FILL_WIDTH",
"text_fields": ["title", "price"],
"background_color": "FFFF00",
"overlay_specs": [
{
"type": "IMAGE",
"media_id": "e292db69-139f-41fb-b79b-4cb7ab2e9840",
"position": "BOTTOM_LEFT"
},
{
"type": "FRAME",
"media_id": "e8aa0151-9a6f-48a0-bcaa-82fc4f714161",
"position": "CENTER",
"opacity": 80
},
{
"type": "TEXT",
"text": "meow meow",
"position": "BOTTOM_RIGHT",
"opacity": 80,
"text_overlay_properties": {
"shape": "CIRCLE",
"shape_color": "09C",
"text_color": "4287F5"
}
},
{
"type": "TEXT",
"text": "woof woof",
"position": "TOP_RIGHT",
"opacity": 80,
"text_overlay_properties": {
"shape": "PILL",
"shape_color": "09C",
"text_color": "000"
}
}
]
}
}
]
}
This request creates a Dynamic Template.
HTTP Request
POST https://adsapi.snapchat.com/v1/adaccounts/{ad_account_id}/dynamic_templates
URL Parameters
Parameter | Description |
---|---|
ad_account_id | The ID of the Ad Account where the Dynamic Template will be created |
Update Dynamic Template
curl -X PUT \
-H "Authorization: Bearer meowmeowmeow" \
-H "Content-Type: application/json" \
-d '{"dynamic_templates": [{"id": "c2987693-f5c3-43b1-90bd-31445493cef1","name": "Grey Seal Template","ad_account_id": "82225ba6-7559-4000-9663-bace8adff5f2","ios_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html","android_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html","layout": "FILL_WIDTH","text_fields": ["title","price"],"background_color": "FFFFFF","preferred_image_tags": ["tag1","tag2"],"overlay_specs": [{"type": "IMAGE","media_id": "e292db69-139f-41fb-b79b-4cb7ab2e9840","position": "TOP_LEFT"},{"type": "FRAME","media_id": "e8aa0151-9a6f-48a0-bcaa-82fc4f714161","position": "CENTER","opacity": 75},{"type": "TEXT","text": "Diving Equipment","position": "BOTTOM_RIGHT","opacity": 80,"text_overlay_properties": {"shape": "CIRCLE","shape_color": "09C","text_color": "4287F5"}},{"type": "TEXT","text": "Sliding Attire","position": "BOTTOM_LEFT","opacity": 80,"text_overlay_properties": {"shape": "PILL","shape_color": "09C","text_color": "6342F5"}}]}]}'
https://adsapi.snapchat.com/v1/adaccounts/22225ba6-7559-4000-9663-bace8adff5f2/dynamic_templates
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ee7660600ff0b01c7922c0efc0001737e616473617069736300016275696c642d32313965343130312d312d3335382d310001011e",
"dynamic_templates": [
{
"sub_request_status": "SUCCESS",
"dynamic_template": {
"id": "c2987693-f5c3-43b1-90bd-31445493cef1",
"updated_at": "2020-06-15T12:13:59.179Z",
"created_at": "2020-06-10T15:19:27.803Z",
"name": "Grea Seal Template",
"ad_account_id": "82225ba6-7559-4000-9663-bace8adff5f2",
"ios_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"android_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"layout": "FIT",
"text_fields": ["title", "price"],
"background_color": "FFFFFF",
"preferred_image_tags": ["tag1", "tag2"],
"overlay_specs": [
{
"type": "IMAGE",
"media_id": "e292db69-139f-41fb-b79b-4cb7ab2e9840",
"position": "TOP_LEFT"
},
{
"type": "FRAME",
"media_id": "e8aa0151-9a6f-48a0-bcaa-82fc4f714161",
"position": "CENTER",
"opacity": 75
},
{
"type": "TEXT",
"text": "Diving Equipment",
"position": "BOTTOM_RIGHT",
"opacity": 80,
"text_overlay_properties": {
"shape": "CIRCLE",
"shape_color": "09C",
"text_color": "4287F5"
}
},
{
"type": "TEXT",
"text": "Sliding Attire",
"position": "BOTTOM_LEFT",
"opacity": 80,
"text_overlay_properties": {
"shape": "PILL",
"shape_color": "09C",
"text_color": "6342F5"
}
}
]
}
}
]
}
This request updates a Dynamic Template.
HTTP Request
PUT https://adsapi.snapchat.com/v1/adaccounts/{ad_account_id}/dynamic_templates
URL Parameters
Parameter | Description |
---|---|
ad_account_id | The ID of the Ad Account |
Get Dynamic Template by ID
curl "https://adsapi.snapchat.com/v1/dynamic_templates/baf5c1d9-7a86-4453-aba1-b27a9ce8348b" \
-H "Authorization: Bearer meowmeowmeow"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ee3ec5000ff0553580d379f2c0001737e616473617069736300016275696c642d32313965343130312d312d3335382d3100010133",
"dynamic_templates": [
{
"sub_request_status": "SUCCESS",
"dynamic_template": {
"id": "baf5c1d9-7a86-4453-aba1-b27a9ce8348b",
"updated_at": "2020-06-11T18:07:20.968Z",
"created_at": "2020-06-11T18:07:20.968Z",
"name": "Test Template II",
"ad_account_id": "82225ba6-7559-4000-9663-bace8adff5f2",
"ios_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"android_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"layout": "FILL_WIDTH",
"text_fields": ["title", "price"],
"background_color": "FFFFFF",
"preferred_image_tags": ["tag1", "tag2"],
"overlay_specs": [
{
"type": "IMAGE",
"media_id": "e292db69-139f-41fb-b79b-4cb7ab2e9840",
"position": "TOP_LEFT"
},
{
"type": "FRAME",
"media_id": "e8aa0151-9a6f-48a0-bcaa-82fc4f714161",
"position": "CENTER",
"opacity": 75
},
{
"type": "TEXT",
"text": "meow meow",
"position": "BOTTOM_RIGHT",
"opacity": 80,
"text_overlay_properties": {
"shape": "CIRCLE",
"shape_color": "09C",
"text_color": "4287F5"
}
},
{
"type": "TEXT",
"text": "woof woof",
"position": "BOTTOM_LEFT",
"opacity": 80,
"text_overlay_properties": {
"shape": "PILL",
"shape_color": "09C",
"text_color": "6342F5"
}
}
]
}
}
]
}
This request gets a Template by it's template id.
HTTP Request
GET https://adsapi.snapchat.com/v1/dynamic_templates/{dynamic_template_id}
URL Parameters
Parameter | Description |
---|---|
dynamic_template_id | The ID of the Dynamic Template to retrieve |
Get Dynamic Templates by Ad Account ID
curl "https://adsapi.snapchat.com/v1/adaccounts/22225ba6-7559-4000-9663-bace8adff5f2/dynamic_templates" \
-H "Authorization: Bearer meowmeowmeow"
The above command returns JSON structured like this:
{
"request_status": "SUCCESS",
"request_id": "5ee4060700ff0d381e5ae4f67a0001737e616473617069736300016275696c642d32313965343130312d312d3335382d3100010107",
"paging": {},
"dynamic_templates": [
{
"sub_request_status": "SUCCESS",
"dynamic_template": {
"id": "a523ad2d-226a-40c1-8645-4420cac49b76",
"updated_at": "2020-06-12T22:26:26.638Z",
"created_at": "2020-06-12T22:26:26.638Z",
"name": "Fox Template",
"ad_account_id": "82225ba6-7559-4000-9663-bace8adff5f2",
"ios_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"android_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"layout": "FILL_WIDTH",
"text_fields": ["title", "price"],
"background_color": "FFFF00",
"overlay_specs": [
{
"type": "IMAGE",
"media_id": "e292db69-139f-41fb-b79b-4cb7ab2e9840",
"position": "BOTTOM_LEFT"
},
{
"type": "FRAME",
"media_id": "e8aa0151-9a6f-48a0-bcaa-82fc4f714161",
"position": "CENTER",
"opacity": 80
},
{
"type": "TEXT",
"text": "meow meow",
"position": "BOTTOM_RIGHT",
"opacity": 80,
"text_overlay_properties": {
"shape": "CIRCLE",
"shape_color": "09C",
"text_color": "4287F5"
}
},
{
"type": "TEXT",
"text": "woof woof",
"position": "TOP_RIGHT",
"opacity": 80,
"text_overlay_properties": {
"shape": "PILL",
"shape_color": "09C",
"text_color": "000"
}
}
]
}
},
{
"sub_request_status": "SUCCESS",
"dynamic_template": {
"id": "baf5c1d9-7a86-4453-aba1-b27a9ce8348b",
"updated_at": "2020-06-11T18:07:20.968Z",
"created_at": "2020-06-11T18:07:20.968Z",
"name": "Honey Bear Template",
"ad_account_id": "82225ba6-7559-4000-9663-bace8adff5f2",
"ios_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"android_url": "https://ads-interfaces.sc-cdn.net/adformats/templates/V2/index.html",
"layout": "FILL_WIDTH",
"text_fields": ["title", "price"],
"background_color": "FFFFFF",
"preferred_image_tags": ["tag1", "tag2"],
"overlay_specs": [
{
"type": "IMAGE",
"media_id": "e292db69-139f-41fb-b79b-4cb7ab2e9840",
"position": "TOP_LEFT"
},
{
"type": "FRAME",
"media_id": "e8aa0151-9a6f-48a0-bcaa-82fc4f714161",
"position": "CENTER",
"opacity": 75
},
{
"type": "TEXT",
"text": "meow meow",
"position": "BOTTOM_RIGHT",
"opacity": 80,
"text_overlay_properties": {
"shape": "CIRCLE",
"shape_color": "09C",
"text_color": "4287F5"
}
},
{
"type": "TEXT",
"text": "woof woof",
"position": "BOTTOM_LEFT",
"opacity": 80,
"text_overlay_properties": {
"shape": "PILL",
"shape_color": "09C",
"text_color": "6342F5"
}
}
]
}
}
]
}
This request gets all Dynamic Templates under an Ad Account.
HTTP Request
GET https://adsapi.snapchat.com/v1/adaccounts/{ad_account_id}/dynamic_templates
URL Parameters
Parameter | Description |
---|---|
ad_account_id | The ID of the Ad Account |
Reporting
All standard reporting metrics and granularities are supported for DPA. Please refer to the DPA reporting section for more details