API Reference
This is the full technical reference. For an overview of Catalog Management concepts, product feeds, and Dynamic Product Ads, see the
Catalog Management Overview.
These endpoints are currently available via early-access only. To apply for access, please fill out this form or reach out to your X representative.
Product Catalogs
GET product_catalogs
Retrieve details for some or all product catalogs associated with the authenticated user (default) or the user specified in theuser_id parameter.
Resource URL
https://ads-api.x.com/12/product_catalogs
long
A reference to the user you are operating with in the request. Use GET users/lookup to retrieve a user ID for a screen name.
POST product_catalogs
Create a product catalog. One user can only create one catalog that holds all products. X merchants need to create a catalog before uploading products. Resource URLhttps://ads-api.x.com/12/product_catalogs
string
required
Name of your product catalog.
long
A reference to the user you are operating with in the request. Use GET users/lookup to retrieve a user ID for a screen name.
PUT product_catalogs/:product_catalog_id
Update a product catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id
string
required
Identifier of your product catalog.
string
required
Name of your product catalog.
DELETE product_catalogs/:product_catalog_id
Delete a product catalog. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id
string
required
Identifier of your product catalog.
Products
X merchants are able to send a synchronous batch request to view, create, edit, and delete products, instead of having to upload a feed file. There are two types of products: individual products vs product groups. A product group is a group of multiple variants and is created when the user provides anitem_group_id and has multiple variants for the product. When you call a fetch endpoint for products that includes grouped products, only the product that you submitted first will be returned.
GET product_catalogs/:product_catalog_id/products
Retrieve details for some or all products associated with the specified Product Catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/products
string
This is a X-generated item group identifier.
int
default:"100"
Specifies the number of records to try and retrieve per distinct request.
Min: 1, Max: 100
Min: 1, Max: 100
string
Specifies a cursor to get the next page of results. See Pagination for more information.
PUT product_catalogs/:product_catalog_id/products
Add new products or update existing ones via a batch request. In a single request, up to 25 products can be supported. A PUT request needs all of the required fields from the attribute list below. If we do not recognize theid, we create a new product. If we recognize the id in your catalog, we update the corresponding existing product.
Resource URL
https://ads-api.x.com/12/product_catalogs/:product_catalog_id/products
Request Attributes (JSON body)
string
required
Unique ID for the item. Use the SKU if possible. If there are multiple instances of the same ID, all instances will be ignored.
string
required
Unique product object identifier generated by X.
string
required
The name of the product. Should be the same name as the product from the landing product page given through
link or mobile_link attributes. Max 150 characters.string
required
The description of the product. This field does not support HTML and must be in plain text. Max 5000 characters.
enum
required
Current availability of your item.
Possible values:
Possible values:
in stock, available for order, preorder, out of stock, discontinuedenum
required
Condition of the item being sold.
Possible values:
Possible values:
new, used, refurbishedstring
required
Price of the item. Format as a number followed by the 3-digit ISO currency code (ISO 4217), with a space between cost and currency. Use
. as the decimal point.string
required
URL of the product page where people can buy the item. Must include
https.string
required
URL for the primary image of your item. Must be JPG, GIF, WEBP, or PNG. Minimum 500x500px. Max file size 5MB.
string
The brand name of the item. Required if
gtin and mpn are not available.string
Global Trade Item Number (UPC, EAN, JAN, or ISBN). Required if
brand and mpn are not available.string
Manufacturer Part Number. Required if
gtin and brand are not available.string
URL of a mobile-optimized product page. Must include
https.string
Comma-separated list of up to 10 additional image URLs. Follow the same specs as
image_link.string
Category according to Google’s product taxonomy (path or ID).
string
Your business’s custom product taxonomy. Subcategories separated by
> (with spaces).int
Quantity available to sell. Must be ≥ 1 when
availability is in stock.string
Discounted price (must be lower than
price). Same format as price.string
Time range for the sale period in ISO-8601 format:
YYYY-MM-DDTHH:MM+HH:MM/YYYY-MM-DDTHH:MM+HH:MM.string
Groups product variants together (size, color, age_group, gender). Required if the product has variants.
string
X-generated item group identifier.
enum
Gender for item sizing.
Possible values:
Possible values:
female, male, unisexstring
Primary color of the product (do not use hex codes).
string
Size of the item (word, abbreviation, or number).
enum
Associated age group.
Possible values:
Possible values:
adult, all ages, teen, kids, toddler, infant, newbornstring
Extra custom label.
string
Extra custom label.
string
Extra custom label.
string
Extra custom label.
string
Extra custom label.
array
Warnings about your request.
array
Error messages about your request.
string
Unique product object identifier generated by X.
string
Unique ID for the item.
enum
Status of your request.
Possible values:
Possible values:
CREATE_SUCCESS, UPDATE_SUCCESS, ERROR, NO_CHANGEDELETE product_catalogs/:product_catalog_id/products
Delete existing products. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/products
Request Parameters (JSON body)
array
required
Array of unique product object identifiers generated by X.
Product Sets
Product Sets are collections of products which represent a subset of your catalog (e.g. “Fall Sale Products”). You can use product sets to run Dynamic Product Ads (DPA) featuring the specific products included in that collection, rather than all products in your catalog.GET product_catalogs/:product_catalog_id/product_sets/:product_set_id
Retrieve details for a specific Product Set associated with the specified Product Catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets/:product_set_id
string
Unique ID for the product set.
POST product_catalogs/:product_catalog_id/product_sets
Create a new product set. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets
Request Parameters (JSON body)
string
required
Name of the product set.
string
Description of the product set.
enum
required
Type of product set.
Possible values:
Possible values:
MANUAL, FILTEREDarray
Required when
Supported attributes:
Supported operators:
type is FILTERED. Array of filter objects with attribute, operator, and value.Supported attributes:
price, product_type, google_product_category, sale_price, inventory, custom_label_0 through custom_label_4.Supported operators:
GREATER_THAN, EQUAL_TO, LESS_THAN, MATCH, NOT_CONTAINS, CONTAINS.array
Required when
type is MANUAL. Array of X-generated product keys.enum
Status of product set creation when using
Possible values:
FILTERED type.Possible values:
DONE, PROCESSING, FAILEDPUT product_catalogs/:product_catalog_id/product_sets/:product_set_id
Update an existing product set. Note: UpdatingFILTERED product sets is not supported. The example below shows a MANUAL product set update.
Resource URL
https://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets/:product_set_id
Request Parameters (JSON body)
string
required
Unique ID for the product set.
string
Name of the product set.
string
Description of the product set.
array
Array of X-generated product keys (for MANUAL sets).
DELETE product_catalogs/:product_catalog_id/product_sets/:product_set_id
Delete an existing product set. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/product_sets/:product_set_id
string
required
Unique ID for the product set.
Scheduled Feeds
Scheduled Feeds configure the file location and frequency with which X ingests product data into a user’s catalog. Only one product feed is supported per user. Importing a scheduled feed is an additive action — removing products from the feed does not delete them from the catalog.GET product_catalogs/:product_catalog_id/scheduled_feeds
Retrieve details for scheduled feeds associated with the specified Product Catalog. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds
Example Request
POST product_catalogs/:product_catalog_id/scheduled_feeds
Create a scheduled product feed. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds
string
required
Host feed URL for your product file. Can be up to 8GB.
enum
required
Format of the product feed file.
Possible values:
Possible values:
CSV, TSV, XMLenum
required
How often X should ingest the feed.
Possible values:
Possible values:
HOURLY, DAILY, WEEKLYstring
Required for
WEEKLY or HOURLY frequency.WEEKLY:MONDAY–SUNDAYHOURLY:1,2,3,4,6,8,12DAILY: Do not include this parameter.
string
required
Time to import the feed file (HH:MM format).
string
required
IANA time zone for
start_time.PUT product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
Update an existing scheduled product feed. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
string
required
Unique ID for the scheduled feed.
string
Host feed URL for your product file (up to 8GB).
enum
Format of the product feed file.
Possible values:
Possible values:
CSV, TSV, XMLenum
Ingestion frequency.
Possible values:
Possible values:
HOURLY, DAILY, WEEKLYstring
Repeat value (see POST for valid values per frequency).
string
Time to import the feed (HH:MM).
string
IANA time zone for
start_time.DELETE product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
Delete an existing scheduled product feed. This is a permanent deletion. Resource URLhttps://ads-api.x.com/12/product_catalogs/:product_catalog_id/scheduled_feeds/:scheduled_feed_id
string
required
Unique ID for the scheduled feed.