Path parameters

  • channelLinkId string Required

    The unique identifier of a channel link for a store location. Please check this URL

application/json

Body Required

  • account string Required

    The unique identifier of a customer account

  • location string Required

    The unique identifier of a location within a customer account

  • items array[object] Required

    Items in the order which upsell recommendations will be based on

    Hide items attributes Show items attributes object
    • plu string Required

      Unique identifier for a product

    • quantity integer Required

      Amount of items ordered

      Default value is 1.

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • items array[object]

      Items which have a high likelihood of being ordered together with the items included in the provided order.

      Hide items attributes Show items attributes object
      • plu string
      • quantity integer
    • upsellMetricId string
  • 403 application/json

    Forbidden

  • 422 application/json

    Validation Error

POST /upsell/channel/{channelLinkId}
curl \
 --request POST 'https://api.staging.deliverect.com/upsell/channel/{channelLinkId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"account\": \"{accountId}\",\n  \"location\": \"{locationId}\",\n  \"channelLink\": \"{channelLinkId}\",\n  \"items\": [\n    {\n      \"plu\": \"PLU-1\",\n      \"quantity\": 1\n    },\n    {\n      \"plu\": \"PLU-2\",\n      \"quantity\": 2\n    },\n    {\n      \"plu\": \"PLU-3\",\n      \"quantity\": 1\n    }\n  ]\n}"'
Request example
{
  "account": "{accountId}",
  "location": "{locationId}",
  "channelLink": "{channelLinkId}",
  "items": [
    {
      "plu": "PLU-1",
      "quantity": 1
    },
    {
      "plu": "PLU-2",
      "quantity": 2
    },
    {
      "plu": "PLU-3",
      "quantity": 1
    }
  ]
}
Response examples (200)
{
  "items": [
    {
      "plu": "PLU-4",
      "quantity": 1
    },
    {
      "plu": "PLU-5",
      "quantity": 1
    },
    {
      "plu": "PLU-6",
      "quantity": 1
    }
  ],
  "upsellMetricId": "{upsellMetricId}"
}
Response examples (403)
{
  "code": "insufficient_permissions",
  "description": "Not allowed to access this location."
}
{
  "code": "insufficient_permissions",
  "description": "Not allowed to access this location."
}
Response examples (422)
[
  {
    "type": "missing",
    "loc": [
      "location"
    ],
    "msg": "Field required"
  }
]
[
  {
    "type": "missing",
    "loc": [
      "location"
    ],
    "msg": "Field required",
    "input": {
      "account": "67f93fc709a75f7e9e36da7f",
      "channelLink": "67f94128c490d2ed895a34e7",
      "items": [
        "<Item plu:PLU1 price:0 quantity:0 type:1 subItems:[]>",
        "<Item plu:PLU2 price:0 quantity:0 type:1 subItems:[]>",
        "<Item plu:PLU3 price:0 quantity:0 type:1 subItems:[]>"
      ]
    },
    "url": "https://errors.pydantic.dev/2.10/v/missing"
  }
]