Commit Generation
POSTOverview
Section titled “Overview”When synchronizing your catalog through periodic batch jobs, identifying objects that were deleted since the last sync can be difficult. Content Generations provide a straightforward way to remove this stale data.
By assigning a generation marker to all objects in your current batch, you can update your active catalog and then commit the generation. This tells Luigi’s Box to delete any objects of the specified type that do not match the current generation marker.
Synchronization workflow
Section titled “Synchronization workflow”- Mark: Add a shared
generationattribute, such as1534199032554, to all objects in your Content Update payload. - Upload: Send the payload via the Content Update API. Existing objects are updated and new ones are created.
- Commit: Call this endpoint with the same generation marker and object
type. All unmarked objects of this type will be deleted.
Committing is type-specific. If you use nested items, you must commit their respective types separately, for example product, category, and brand.
Send a Commit Request
Section titled “Send a Commit Request”This endpoint expects query parameters to specify the target type and the generation string. No JSON body is required.
Query parameters
Section titled “Query parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
type | String | ✓ | Object type to commit the generation for, such as item, category, or article. |
generation | String | ✓ | The generation marker that was used during the Content Update, for example 1534199032554. |
Authentication is required for all requests. You will need your dynamically generated HMAC signature.
Error handling
Section titled “Error handling”| HTTP Status | Description |
|---|---|
| 400 Bad Request | The request structure is invalid, or the generation does not have any objects present in the index. Check the response body for details. |
| 403 Forbidden | The request is not allowed for your site in Luigi’s Box. |
| 429 Too Many Requests | The rate limit has been exceeded. |
Was this page helpful?
Thanks.