GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelogLog In
Guides

Product Importer API

Overview

This document outlines the Criteo Product Catalog API, detailing the existing methods and their data representation of the request body.

Usage workflow

Find below a simplified diagram with the workflow of API calls to post one or more products to Criteo’s database.

638
  • Authenticate your app by calling the /oauth2/token endpoint (please see the dedicated guide for Authentication )
  • Criteo API will authenticate and authorize your app, and return you an access token to be used in your following calls;
  • Post your products’ updates in a JSON payload, calling the POST /preview/catalog/products/batch resource
  • Criteo API will then perform the requested update in the indicated products, which may take up to an hour.
  • Get a report on the status of your import GET /preview/catalog/products/batch/report/{operation-token}

Best Practices

  • Avoid daily updates of all of your products. Instead, only update products whose data has actually changed, the API cannot be used as feed ingestion.
  • To have up-to-date data, send updates of your products as soon as the products change, do not wait for several updates to group them.
  • Do not send multiple updates of the same product in the same batch, the batch will be rejected and you will receive an error.
  • Do not send updates for unchanged products. Be sure to only send requests for new, updated, or deleted products, unless the products are going to expire.
  • Make sure to update the products before they expire, the lifespan of the products is 30 days after their last update, if you want to change their lifespan, you can use the expirationDate field specifying a date expiry, this date may be up to one year in the future.
  • Send a deleted batch as soon as the product is removed from your store, do not rely on its expiration date, otherwise, you risk displaying the product when it is no longer available in your store.
  • Use the same value for the Item Group ID itemGroupId field to group all product variants. Product variants are similar products that differ from each other only in product details (sizes, color, material, pattern, age range, or gender).
  • The id and itemGroupId fields must be different, use the id field to uniquely identify a single product and use itemGroupId to group multiple products as variants.
  • Don't mix up itemGroupId and id attributes, The itemGroupId must be chosen outside of the id range. If a product has the same id as an existing itemGroupId or vice versa, the behavior is undefined and updates on your products may be ignored.
  • Make sure to provide itemGroupId information in addition to the id when deleting a product variant to avoid any inconsistencies.

List of Methods

MethodHTTP RequestDescription
URLs relative to:
AMERICAS: api.us.criteo.com
APAC: api.as.criteo.com
EMEA: api.eu.criteo.com
AuthenticatePOST /oauth2/tokenGet the token necessary to perform any action through our API.
Please see the dedicated guide for Authentication
BatchPOST /preview/catalog/products/batchRequest an asynchronous batch operation of insertions, updates, and deletes. Returns the location of the report of the operation
ReportGET /preview/catalog/products/batch/report/{operation-token}Get the report of the batch processing

Rate limitations

  • 1000 products per batch
  • One partner_id per request
  • Two updates or more of one product on the same batch is not allowed

Support

For more information about this API reach out to your account technical contact in Criteo.

Authenticate

Get detailed information on API authentication in Authentication guide

Authentication

TypeEndpointObjectiveParametersRemarks
POST/oauth2/tokenGet the token necessary to perform any action through our APIclient_id (mandatory)
client_secret (mandatory)
grant_type (mandatory)
The token will be valid for 900s

🚧

You will need this token as an authorization for every other endpoint, which is in the form of a bearer token.

Batch

POST /preview/catalog/products/batch

Description

Used to publish a batch of operations to insert, update and deletes products. The batch is processed asynchronously. The response provides an operationToken which can be used to track the status of the report of the operation.

Parameters

TypeNameDescriptionSchema
BodyProductsCustomBatchRequest
optional
Defines a batch of operationsProductsCustomBatchRequest

Responses

HTTP codeDescriptionSchema
202Batch accepted. The status of the operation can be tracked using the report endpoint and the operationToken.BatchAcceptedResponse
400Bad Request. Allowed error types and errors: [(type="validation", code="required-field"),(type="validation", code="required-field"),(type="validation", code="json-format")]FailResponse
401Unauthorized. Allowed error types and errors: [(type="authentication", code="not-authenticated")]FailResponse
403Forbidden. Allowed error types and errors: [(type="authorization", code="not-authorized")]FailResponse
413Request too longNo Content
429Too Many Requests. Allowed error types and errors: [(type="availability", code="too-many-requests")]FailResponse
500Internal Server Error. Allowed error types and errors: [(type="availability", code="internal-error")]FailResponse
503Service Unavailable. Allowed error types and errors: [(type="availability", code="service-unavailable")]FailResponse

Produces

  • application/json

Report

GET /preview/catalog/products/batch/report/{operation-token}

Description

Get the report of an asynchronous batch operation previously requested

Parameters

TypeNameDescriptionSchema
Pathoperation-token
required
The token returned by the batch endpointString

Responses

HTTP CodeDescriptionSchema
200The report objectReportOkResponse
400Bad Request. Allowed error types and errors: [(type="validation", code="catalog-operation-token-is-malformed"),(type="validation", code="catalog-operation-report-is-expired")]FailResponse
401Unauthorized. Allowed error types and errors: [(type="authentication", code="not-authenticated")]FailResponse
403Forbidden. Allowed error types and errors: [(type="authorization", code="not-authorized")]FailResponse
404Not Found. Allowed error types and errors: [(type="validation", code="catalog-operation-not-found")]FailResponse
429Too Many RequestsNo Content
500Internal Server Error. Allowed error types and errors: [(type="availability", code="internal-error")]FailResponse
503Service Unavailable. Allowed error types and errors: [(type="availability", code="service-unavailable")]FailResponse

Produces

  • application/json

Definitions

BatchAcceptedResponse
A batch was accepted. The report can be accessed using the reporting endpoint.

NameSchema
operationToken requiredString

CustomAttribute
Defines a custom attribute of a product.

NameDescriptionSchema
name
required
The name of the attribute. Underscores will be replaced by spaces upon insertion.String
value
required
The value of the attribute.String

Error
Error descriptor.

NameDescriptionSchema
code
required
A MACHINE-READABLE error code string in kebab-case. Unique across CriteoString
detail
required
A HUMAN-READABLE detailed explanation specific to this occurrence of the problem.This should not be more that 1 paragraphString
instance
required
A MACHINE-READABLE URI reference that identifies the specific occurrence of the problem. This could be useful when we want to the return the API Endpoint identifying the exact resource related to the error.String
title
required
A short, HUMAN-READABLE summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.String
traceId
required
The MACHINE-READABLE correlation ID provided by the gatewayString
type
required
A MACHINE-READABLE code specifying error category. This information is used on client side to focus on certain type of error, to either retry some processing or display only certain type of errors.String

FailResponse
Error server response.

NameDescriptionSchema
errors
required
List of errors< Error > array
warnings
optional
List of warnings< Warning > array

Installment
Defines the installment of a product.

NameDescriptionSchema
amount optionalThe amount the buyer has to pay per month.Price
months optionalThe number of installments the buyer has to pay.Object

LoyaltyPoints
Defines how a client earns loyalty points after buying this product.

NameDescriptionSchema
name optionalName of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.String
pointsValue optionalThe retailer’s loyalty points in absolute value.Object
ratio optionalThe ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0.Number (double)

Price
Defines a price.

NameDescriptionSchema
currency optionalThe price represented as a number.String
value optionalThe currency of the price.String

Product
Defines a product to be inserted or updated.

namedescriptionschema
id requiredA unique identifier for the item. Aka Product ID.string
offerId optionalNot used by Criteo.string
title requiredTitle of the item. (500 UTF8 characters max).string
description optionalDescription of the item. RECOMMENDED. (5000 UTF8 characters max).string
link requiredURL directly linking to your item's page on your website. (1000 UTF8 characters max).string
imageLink requiredURL of an image of the item. Supported formats: PNG, JPEG, GIF. (2000 UTF8 characters max).string
additionalImageLinks optionalAdditional URLs of images of the item.< string > array
contentLanguage optionalThe two-letter ISO 639-1 language code for the item.string
targetCountry optionalThe CLDR territory code for the item.string
channel optionalThe item's channel (online only).enum (online)
expirationDate optionalDate on which the item should expire, as specified upon insertion, in ISO 8601 format. By default the value of the expirationDate is 30 days.string
adult optionalSet to true if the item is targeted towards adults. RECOMMENDED.boolean
kind optionalIdentifies what kind of resource this is.enum (content#product)
brand optionalBrand of the item. RECOMMENDED.string
color optionalColor of the item.string
googleProductCategory optionalGoogle's category of the item (see Google product taxonomy). RECOMMENDED.string
gtin optionalGlobal Trade Item Number (GTIN) of the item. RECOMMENDED.string
itemGroupId optionalShared identifier for all variants of the same product. RECOMMENDED.string
material optionalThe material of which the item is made.string
mpn optionalManufacturer Part Number (MPN) of the item. RECOMMENDED.string
pattern optionalThe item's pattern (e.g. polka dots).string
price optionalPrice of the item. RECOMMENDED.Price
salePrice optionalAdvertised sale price of the item. RECOMMENDED.Price
salePriceEffectiveDate optionalDate range during which the item is on sale.string
sizes optionalSize of the item. RECOMMENDED. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same itemGroupId value.< string > array
taxes optionalTax information.< ProductTax > array
customAttributes optionalA list of custom (merchant-provided) attributes. This is useful for submitting attributes not explicitly exposed by the API. Declaring attributes explicitly exposed by the API using is forbidden< CustomAttribute > array
identifierExists optionalFalse when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Required according to the Unique Product Identifier Rules for all target countries except for Canada.boolean
installment optionalNumber and amount of installments to pay for an item. Brazil only.Installment
loyaltyPoints optionalLoyalty points that users receive after purchasing the item. Japan only.LoyaltyPoints
multipack optionalThe number of identical products in a merchant-defined multipack. To avoid any overflow issue, pass it as a string.object
customLabel0 optionalCustom label 0 for custom grouping of items in a Shopping campaign.string
customLabel1 optionalCustom label 1 for custom grouping of items in a Shopping campaign.string
customLabel2 optionalCustom label 2 for custom grouping of items in a Shopping campaign.string
customLabel3 optionalCustom label 3 for custom grouping of items in a Shopping campaign.string
customLabel4 optionalCustom label 4 for custom grouping of items in a Shopping campaign.string
isBundle optionalWhether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price.boolean
mobileLink optionalaccounts.link to a mobile-optimized version of the landing page.string
availabilityDate optionalThe day a pre-ordered product becomes available for delivery, in ISO 8601 format.string
unitPricingMeasure optionalThe measure and dimension of an item.ProductUnitPricingMeasure
unitPricingBaseMeasure optionalThe preference of the denominator of the unit price.ProductUnitPricingBaseMeasure
shipping optionalShipping rules.< ProductShipping > array
shippingLabel optionalThe shipping label of the product, used to group product in account-level shipping rules.string
shippingLength optionalLength of the item for shipping.ProductShippingDimension
shippingWidth optionalWidth of the item for shipping.ProductShippingDimension
shippingHeight optionalHeight of the item for shipping.ProductShippingDimension
shippingWeight optionalWeight of the item for shipping.ProductShippingWeight
displayAdsId optionalAn identifier for an item for dynamic remarketing campaigns.string
displayAdsSimilarIds optionalAdvertiser-specified recommendations.string
displayAdsTitle optionalTitle of an item for dynamic remarketing campaigns.string
displayAdsLink optionalURL directly to your item's landing page for dynamic remarketing campaigns.string
displayAdsValue optionalOffer margin for dynamic remarketing campaigns.number (double)
sellOnGoogleQuantity optionalThe quantity of the product that is available for selling on Google. Supported only for online products.object
promotionIds optionalThe unique ID of a promotion.< string > array
maxHandlingTime optionalMaximal product handling time (in business days).object
minHandlingTime optionalMinimal product handling time (in business days).object
costOfGoodsSold optionalCost of goods sold. Used for gross profit reporting.Price
source optionalThe source of the offer, i.e., how the offer was created.enum (api, crawl, feed)
includedDestinations optionalThe list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in excludedDestinations.< string > array
excludedDestinations optionalThe list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).< string > array
adsLabels optionalSimilar to adsGrouping, but only works on CPC.< string > array
adsRedirect optionalAllows advertisers to override the item URL when the product is shown within the context of Product Ads.string
productTypeKeys optionalCategory keys of the item (formatted as in productTypes).
This information is required by RetailMedia.
< string > array
productTypes optionalCategories of the item (formatted as in products data specification).< string > array
ageGroup optionalTarget age group of the item.string
availability optionalAvailability status of the item. RECOMMENDED.string
condition optionalCondition or state of the item.string
gender optionalTarget gender of the item.string
sizeSystem optionalSystem in which the size is specified. Recommended for apparel items.string
sizeType optionalThe cut of the item. Recommended for apparel items.string
energyEfficiencyClass optionalThe energy efficiency class as defined in EU directive 2010/30/EU.string
minEnergyEfficiencyClass optionalThe energy efficiency class as defined in EU directive 2010/30/EU.string
maxEnergyEfficiencyClass optionalThe energy efficiency class as defined in EU directive 2010/30/EU.string
taxCategory optionalThe tax category of the product, used to configure detailed tax nexus in account-level tax settings.string
transitTimeLabel optionalThe transit time label of the product, used to group product in account-level transit time tables.string
sellerId optional⚠️Deprecated Field, please use externalSellerId instead

The external ID of the seller (case sensitive and 50 UTF8 characters max). This information is required by the Criteo Offsite Ads.
string
externalSellerId optionalThe external id of the seller (case sensitive and 50 UTF8 characters max). This information is required by the Criteo Offsite Ads and RetailMedia.string
externalSellerName optionalThe external name of the seller (case sensitive and 50 UTF8 characters max). This information is required by the Criteo Offsite Ads and RetailMedia.string
adsGrouping optionalUsed to group items in an arbitrary way. Only for CPA%, discouraged otherwise.string
numberOfReviews optionalThe number of customer reviews for the productinteger (int32)
productRating optionalThe product rating for the productstring
badge optionalURL of a badge image to display on the product.string

ProductShipping
Defines the shipping information of a product.

NameDescriptionSchema
country optionalThe CLDR territory code of the country to which an item will ship.string
locationGroupName optionalThe location where the shipping is applicable, represented by a location group name.string
locationId optionalThe numeric ID of a location that the shipping rate applies to as defined in the AdWords API.object
postalCode optionalThe postal code range that the shipping rate applies to, represented by a postal code, a postal code prefix followed by a * wildcard, a range between two postal codes or two postal code prefixes of equal length.string
price optionalFixed shipping price, represented as a number.Price
region optionalThe geographic region to which a shipping rate applies.string
service optionalA free-form description of the service class or delivery speed.string

ProductShippingDimension
Defines the shipping dimension of a product.

NameDescriptionSchema
unit optionalThe unit of value.string
value optionalThe dimension of the product used to calculate the shipping cost of the item.number (double)

ProductShippingWeight
Defines the shipping weight of a product.

NameDescriptionSchema
unit optionalThe unit of value.string
value optionalThe weight of the product used to calculate the shipping cost of the item.number (double)

ProductTax
Defines the tax information of a product.

NameDescriptionSchema
country optionalThe country within which the item is taxed, specified as a CLDR territory code.string
locationId optionalThe numeric ID of a location that the tax rate applies to as defined in the AdWords API.object
postalCode optionalThe postal code range that the tax rate applies to, represented by a ZIP code, a ZIP code prefix using wildcard, a range between two ZIP codes or two ZIP code prefixes of equal length. Examples: 94114, 94, 94002-95460, 94-95.string
rate optionalThe percentage of tax rate that applies to the item price.number (double)
region optionalThe geographic region to which the tax rate applies.string
taxShip optionalSet to true if tax is charged on shipping.boolean

ProductUnitPricingBaseMeasure
Defines a measurement.

NameDescriptionSchema
unit optionalThe unit of the denominator.string
value optionalThe denominator of the unit price.object

ProductUnitPricingMeasure
Defines a measurement.

NameDescriptionSchema
unit optionalThe unit of measure.string
value optionalThe measurement of an item.number (double)

ProductsCustomBatchRequest

NameDescriptionSchema
entries requiredThe request entries to be processed in the batch.< ProductsCustomBatchRequestEntry > array

ProductsCustomBatchRequestEntry
A batch entry encoding a single non-batch products request.

NameDescriptionSchema
batchId optionalAn entry ID, unique within the batch request.integer (int64)
feedId optionalNot used by Criteo.string
merchantId requiredThe ID of the managing account. Criteo: the partnerId.integer (int32)
method requiredThe method of the batch entry.enum (delete, insert)
product optionalThe product to insert. Only required if the method is insert.Product
productId optionalThe Product ID to delete. Only defined if the method is delete.string

ReportDetailError
An error on a batch operation.

NameSchema
isServerRelated requiredboolean
message optionalstring
type requiredenum (UnknownError, InvalidBigImageUrl, InvalidProductId, InvalidProductUrl, InvalidSmallImageUrl, JsonParsingIssue, MissingID, MissingImages, MissingName, MissingURL, NonAsciiId, OverlargeBigImage, OverlargeID, OverlargeSmallImage, OverlargeURL, ConfigurationError)

ReportDetailErrors
A list of errors on a batch operation.

NameSchema
errors required< ReportDetailError > array
productId requiredstring

ReportOkResponse
The report on a given operationToken is ready.

NameDescriptionSchema
errorDetails requiredThe list of errors with details.< ReportDetailErrors > array
importRequestTimestamp requiredThe date when the original batch request was sent.integer (int64)
numberOfProductsDeleted requiredThe number of products deleted.integer (int32)
numberOfProductsInTheBatch requiredThe number of products present in the batch.integer (int32)
numberOfProductsUpserted requiredThe number of products upserted.integer (int32)
numberOfProductsWithErrors requiredThe number of products with errors.integer (int32)
status requiredThe status of the operation. The operation is completed when the status is one of (VALIDATED,VALIDATED_WITH_ERRORS,FAILED)enum (ACCEPTED, IN_PROGRESS, VALIDATED, VALIDATED_WITH_ERRORS, FAILED)

For more information about the semantics of each field, please refer to Criteo Product Feed Specification.

For more information about this API reach out to your account technical contact in Criteo.