PUT
/
api-offers
/
sku-list
/
{skuListId}
Update specific sku-list
curl --request PUT \
  --url https://live.copilot.fabric.inc/api-offers/sku-list/{skuListId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "title": "GlobalExc_1",
  "listType": "GLOBAL_EXCLUSION",
  "applicableOn": [
    "PRODUCT_PRICE"
  ],
  "targetProducts": [
    {
      "kind": "SKU",
      "value": [
        1000000123
      ]
    }
  ],
  "startDate": "2022-05-04T09:23:51.459Z",
  "endDate": "2099-12-31T00:00:00.000Z",
  "deleted": false,
  "createdAt": "2020-12-14T12:15:43.646Z",
  "updatedAt": "2021-12-14T12:15:43.646Z"
}'
{
  "_id": "614b58924e92f6861ac9d43b",
  "title": "GlobalExc_1",
  "listType": "GLOBAL_EXCLUSION",
  "applicableOn": [
    "PRODUCT_PRICE"
  ],
  "targetProducts": [
    {
      "kind": "SKU",
      "value": [
        1000000123
      ]
    }
  ],
  "startDate": "2022-05-04T09:23:51.459Z",
  "endDate": "2099-12-31T00:00:00.000Z",
  "deleted": false,
  "createdAt": "2020-12-14T12:15:43.646Z",
  "updatedAt": "2021-12-14T12:15:43.646Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-site-context
string
required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Path Parameters

skuListId
number
required

ID of the SKU list to update

Body

application/json
title
string
required

SkuList name or title

Example:

"GlobalExc_1"

applicableOn
enum<string>[]
required

Applicable scope of skulist

targetProducts
object[]
required
startDate
string<date-time>
required

Start date of sku-list. From this date, the products provided in the SKU list will be exempted from being discounted. The value must be in the future.

Example:

"2022-05-04T09:23:51.459Z"

endDate
string<date-time>
required

End date of sku-list. The value must be greater than the start date. From this date the products mentioned in the SKU list will again be applicable for discount to be applied.

Example:

"2099-12-31T00:00:00.000Z"

listType
enum<string>

Type of skulist

Available options:
GLOBAL_EXCLUSION
Example:

"GLOBAL_EXCLUSION"

deleted
boolean

true: sku-list is deleted<br /> false: sku-list is not deleted

Example:

false

createdAt
string<date-time>

Creation date of the record

Example:

"2020-12-14T12:15:43.646Z"

updatedAt
string<date-time>

Last updated date of the record

Example:

"2021-12-14T12:15:43.646Z"

Response

OK

_id
string

fabric database objectId of the record

Example:

"614b58924e92f6861ac9d43b"

title
string

SkuList name or title

Example:

"GlobalExc_1"

listType
enum<string>

Type of skulist

Available options:
GLOBAL_EXCLUSION
Example:

"GLOBAL_EXCLUSION"

applicableOn
enum<string>[]

Applicable scope of skulist

targetProducts
object[]

Array of products to be exempted from being discounted

startDate
string<date-time>

Start date of sku-list. The value must be in the future. It indicates the date from when the discount will not be applicable to the products mentioned in the sku-list.

Example:

"2022-05-04T09:23:51.459Z"

endDate
string<date-time>

End date of sku-list. The value must be greater than the start date. It indicates the date from when discount be applicable to the products mentioned in the sku-list.

Example:

"2099-12-31T00:00:00.000Z"

deleted
boolean

true: sku-list is deleted<br /> false: sku-list is not deleted

Example:

false

createdAt
string<date-time>

Creation date of the record

Example:

"2020-12-14T12:15:43.646Z"

updatedAt
string<date-time>

Last updated date of the record

Example:

"2021-12-14T12:15:43.646Z"