Create Customization
POSTOverview
Section titled “Overview”Create a new recommendation customization with a target scope and list of pin definitions.
Request parameters
Section titled “Request parameters”Path parameters
Section titled “Path parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
TRACKER_ID | string | ✓ | Your unique tracker identifier. |
Request headers
Section titled “Request headers”| Header | Value | Description |
|---|---|---|
Content-Type | application/json; charset=utf-8 | Required. |
Date | HTTP date | Required for HMAC. |
Authorization | ApiAuth {TRACKER_ID}:{SIGNATURE} | Required for HMAC. |
Request body attributes
Section titled “Request body attributes”| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | ✓ | Recommender model, for example basket. |
target_type | string | ✓ | Scope type: item, criteria, or all. |
target_identity | string | Cond. | Target item ID when target_type is item. |
target_criteria | object | Cond. | Criteria definition when target_type is criteria. |
tags | array | Organizational tags for the scope. | |
target_metadata | object | Cond. | Optional item metadata, commonly title or image data. |
pin_definitions | array | ✓ | List of pin objects to apply. |
Pin object attributes
Section titled “Pin object attributes”| Parameter | Type | Required | Description |
|---|---|---|---|
position | integer | ✓ | Pin position. Use -1 for global and 0 for block. |
pin_type | string | ✓ | item or criteria. |
pin_identity | string | Cond. | Item ID when pin_type is item. |
pin_criteria | object | Cond. | Criteria definition when pin_type is criteria. |
widget_id | string | Widget identifier for the pin. | |
is_block_pin | boolean | Excludes matching items when true. | |
is_bundle_pin | boolean | Marks the pin as a bundle pin. | |
active_from | date-time | ISO 8601 start time. | |
active_to | date-time | ISO 8601 end time. |
How to Make a Request
Section titled “How to Make a Request”- Build the HMAC string from the method, content type, date, and request path.
- Generate the Base64-encoded HMAC SHA-256 signature with your private key.
- Send the JSON body together with
Date,Content-Type, andAuthorizationheaders.
Response structure
Section titled “Response structure”The response returns the created customization object with its generated ID.
Response attributes
Section titled “Response attributes”| Field | Type | Description |
|---|---|---|
id | string | Unique identifier of the customization. |
model | string | Recommender model. |
target_type | string | Target scope type. |
created_at | string | Creation timestamp. |
Error handling
Section titled “Error handling”| HTTP Status | Description |
|---|---|
201 Created | Customization created successfully. |
400 Bad Request | Invalid configuration provided. |
401 Unauthorized | Missing or invalid authentication. |
404 Not Found | Tracker not found. |
422 Unprocessable Entity | Invalid pin definition provided. |
Was this page helpful?
Thanks.