Publicator REST API - Product

The product service provides access to the information in the product database. This service is only available to CommercePro customers.

The following endpoints are available:

Import

Service to import a product file to the product database.

Obtain the URL to the service (including the API key) by clicking the "How to upload product files using REST" link on the Products page in the Publicator.

The service accepts the following parameters:

Name Type Description
key GET (query parameter) The API key. Required for all API requests.
token POST (multipart/form-data) A unique token describing this request. Optional. Limited to 128 characters.
<any> POST (multipart/form-data) The import file. Required.

Exactly one of the form data parts must be the product file. Requests made with more than one product file are considered syntactically incorrect.

The token may be used to uniquely describe an import. This allows the same request to be sent multiple times without resulting in it being processed multiple times. This may be useful for retry and error handling logic.

The maximum size of the entire request is 50 MB.

The service responds with the following status codes:

Code Meaning
202 (Accepted) The file was received and has been scheduled for import.
400 (Bad Request) The request was syntactically incorrect. One or more parameters are incorrectly defined. For example, the key or file attachment are missing, the token is too long, or the request is too large.
403 (Forbidden) The user does not have access to the product database. The product database is only available to CommercePro customers.
404 (Not Found) No user could be found for the key specified in the request.
405 (Method Not Allowed) The request was made with a different method than POST.
503 (Service Unavailable) The server is unable to process the request. There are two potential reasons for this:
  • The server is processing another REST API request from this user.
  • The number of product files pending import exceeds the limit.

When a request is accepted, the progress and result of the import can be monitored through the Publicator. Email notifications can be configured on the Account Settings page.