Batch API upload and processing

Website personalisation

All requests must be authenticated.

See: Batch API access and authentication

Upload the data

The Batch API has different workflows dependent on the type of batch operation you want to perform.

You will need to define the type of operation; e.g. a full catalogue re-index or a delta update.

Zip file

This is a multipart/form-data upload.

You'll need to send a request with a file attachment.

The attachment must be a ZIP file with the following content:

All files are JSON in format and should be written with a .json extension.

REST call

The upload verb used in the REST API is POST

{type} is required. This defines what the payload consists of.

Valid parameters include full or delta.

curl --location --request POST --header 'Authentication: Basic {{APIKEY}}' --form 'files=@/path/to/data/upload.zip' https://{{domainkey}}.api-{{locationkey}}.ometria.services/batch/upload/{{type}}

Store the receipt

If the data has successfully uploaded, the Batch API returns a receipt ID in the data node of the successful response.

The receipt ID is required for the next stage of the upload.

Example response:

{
"data": {
   "receipt": "***************************"
 }
}

Process the uploaded content

To process the uploaded content, you'll need to execute a request.

This is to make sure that you are in full control of your data processing.

The Batch API will extract and process the data uploaded by calling the 'process' endpoint along with the 'receipt' id.

The parameter delete_on_completion is optional.

If this is set to true, the uploaded content is removed from Ometria's secure storage immediately after processing.

This also means any attempt to request reprocessing of the respective data by the Batch API will also be void.

See also: Batch API: other operations

curl --location --request PUT --header 'Authentication: Basic {{APIKEY}}' https://{{domainkey}}.api-{{locationkey}}.ometria.services/batch/process/{{receipt}}?delete_on_completion={{delete_on_completion}}

Once the data has completed processing, the data processing report is updated with the results of the processing:

https://{{domainkey}}.api.ometria.services/