Update Your Catalog Source

Catalog source updates are required when you need to add or update products in your source, for reasons such as changing the price on a single item, or adding or removing a specific item. The difference between this and a full catalog upload is that you’re not required to send the entire item list of your catalog.

When the payload exceeds 256MB, it must be chunked in 256MB parts.

Step 1: Create a File Container

See Creating a File Container.

Step 2: Upload the Content Update into the File Container

Perform the following PUT request to upload the stream operations into the Amazon S3 file container you got from Step 1: Create a File Container.

Request template

PUT <MyUploadURI>
  
<HTTPHeaders>

Replace:

  • <MyUploadUri> with the value of the uploadUri property you got in the response when you created your file container in Step 1: Create a File Container.

  • <HTTPHeaders> with the keys-value pairs of the requiredHeaders object property you got in the response when you created your file container in Step 1: Create a File Container.

Payload example

{
   "addOrUpdate": [
       {
           "objecttype": "Product",
           "documentId": "https://www.acme.com/product/010",
           "title": "Sneaker 010",
           "productId": "010",
           "subcategory": "Sneakers",
           "gender": "Unisex",
           "departement": "Shoes"
       },
       {
           "objecttype": "Product",
           "documentId": "https://www.acme.com/product/011",
           "title": "Sneaker 011",
           "productId": "011",
           "subcategory": "Sneakers",
           "gender": "Unisex",
           "departement": "Shoes"
       },
       {
           "objecttype": "Variant",
           "documentId": "https://www.acme.com/product/010-blue",
           "title": "Sneaker 010 Royal Blue",
           "productId": "010",
           "sku": "010-blue",
           "width": "wide",
           "productSize": "9"
       },
       // ...More items to add or update...
   ],
   "delete": [
       {
           "documentId": "https://www.acme.com/store/montreal"
       },
        // ...More items to delete...
   ]
}

In the request body (see Item Models - BatchDocumentBody):

  • For each item you include in the addOrUpdate array (see Item Models - DocumentBody), specifying a unique documentId value for each item is mandatory.

  • For each item you include in the delete array (see Item Models - DeletedItem), specifying a unique documentId value for each item is mandatory.

A successful response (200 OK) has no content, but indicates that the content update was successfully uploaded to the Amazon S3 file container.

Successful response - 200 OK

{}

Step 3: Send the File Container to Update Your Catalog

Use the Add, update, or delete a large number of encrypted items in a source operation to push the Amazon S3 file container into a stream source.

Request template

PUT https://api.cloud.coveo.com/push/v1/organizations/<MyOrganizationId>/sources/<MySourceId>/stream/update?fileId=<MyFileId>
  
Content-Type: application/json
Authorization: Bearer <MyAccessToken>

Payload

{}

In the request path:

In the query string:

In the Authorization HTTP header:

A successful response (202 Accepted) has no content, but indicates that the operation was successfully forwarded to the service and that the batch of items is now enqueued to be processed by the Coveo Cloud indexing pipeline.

Successful response - 202 Accepted

null
What's Next for Me?