Product

Get product and price by sku

Retrieves product and price details, along with its child products' details if there are any, by specific SKU and priceListId. If price details are not set up previously, it only retrieves the product information; price details are not returned in such cases.

get/api-offers/get-product/{sku}

Request

Path parameters

skustring required

SKU of the product whose details are to be retrieved. If the product has child products, details of the child products are also retrieved.

Query parameters

priceListIdstring

Get product by ID in a given price list. If priceListId is not provided, default priceList is selected to search the details for. If the SKUdoesn't belong to the default price list, price details are not returned.

limitnumber

The maximum number of records per page.

offsetnumber

The number of records to skip before returning records. For example, when offset is 20 and limit is 10, this endpoint returns records from 21 to 30.

Headers

x-site-contextstring required
Example:{"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account": "1234abcd5678efgh9ijklmno","stage":"production"}

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.

Response

OK

idstring

fabric internal ID of the product

channelnumber[]

Sales channel of the product

startDatestring date-time

Start date of the product

endDatestring date-time

End date of the product

groupstring[]

ID of the group or category the product belongs to

imageSetOnAttributesstring[]

Array of URLs to images of different variants or attributes

isDefaultboolean

false for parent product<br /> If a parent product has child items, true represents the default child item to be displayed, under the parent product, on the product listing page.

isActiveboolean

true if the item is active and displayed in the catalog. isActive will be true only when state is READY <br /> false if the state is DRAFT, and item is not displayed in the catalog

isSoftDeletedboolean

true indicates the product is deleted <br /> false indicates the product is not deleted

titlestring

Title of the product

skustring

SKU of the product

descriptionstring

Description of the product

statestring

Status of the product. It indicates if the product is ready to be published on the product listing page.

itemIdnumber

Item ID of the product

variantsstring[]

Different variants of the product

createdAtstring date-time

Creation date of the product

updatedAtstring date-time

Last updated date of the product

Example response

{
  "id": "60c789cfe6e0910008fdcd19",
  "channel": [
    12,
    13
  ],
  "startDate": "2021-06-14T16:53:56.020Z",
  "endDate": "2021-06-14T16:53:56.020Z",
  "group": [
    "60c7894b25c05d00087e882c"
  ],
  "imageSetOnAttributes": [
    "http://example.com/virpilalphal.jpg"
  ],
  "title": "Oval shaped table",
  "itemFamily": {
    "id": "60c789973af6bf0009c023df",
    "name": "Shoes"
  },
  "sku": "Ovaltable101",
  "description": "Oval shaped table used as home furniture",
  "state": "READY",
  "itemId": 1000000269,
  "images": [
    {
      "id": "5fd7577251a93f0007e48383",
      "label": "https://abchome-xpm-images.s3.amazonaws.com/12.01.20+Giving+Tuesday/Homepage/HP_HolidaySix_GI_1.jpg?w=1067",
      "source": [
        {
          "id": "5fd7577251a93f0007e48383",
          "url": "https://abchome-xpm-images.s3.amazonaws.com/12.01.20+Giving+Tuesday/Homepage/HP_HolidaySix_GI_1.jpg?w=1067"
        }
      ]
    }
  ],
  "attributes": [
    {
      "attributeGroupId": "5fd7577251a93f0007e48383",
      "value": "size"
    }
  ],
  "variants": [
    "VARIANT-01",
    "VARIANT-55"
  ],
  "createdAt": "2021-06-14T16:54:39.461Z",
  "updatedAt": "2021-06-14T16:54:39.461Z",
  "items": [
    {
      "_id": "cfbc28dd-26b8-40e6-9c37-f233c5a2d004"
    }
  ],
  "price": {
    "id": "5e31832ccaf608b232bb4cdrr",
    "itemId": 1000000269,
    "offerId": 1074,
    "createdAt": "2020-08-19T10:53:29.918Z",
    "updatedAt": "2020-08-19T10:53:29.918Z",
    "offers": [
      {
        "price": {
          "base": 229,
          "currency": "USD"
        },
        "channel": 12,
        "startDate": "2018-10-19T16:46:45Z",
        "endDate": "2099-12-31T00:00:00Z",
        "kind": 10000001
      }
    ],
    "query": {
      "limit": 10,
      "count": 50
    }
  },
  "priceRange": {
    "min": 35,
    "max": 12000
  },
  "livePrice": [
    {
      "price": {
        "base": 299,
        "sale": 199,
        "cost": 149,
        "currency": "USD"
      },
      "channel": 12,
      "startDate": "2099-12-31T10:51:00.000Z",
      "endDate": "2099-12-31T10:51:00.000Z",
      "kind": {
        "id": "5fe35c6244076c5ff4968917",
        "name": "Clearance",
        "channel": 12,
        "priceKindId": 12
      },
      "offerCode": 128755531,
      "range": {
        "min": 100,
        "max": 300
      }
    }
  ],
  "promoDates": {
    "startDate": "2099-12-31T10:51:00.000Z",
    "endDate": "2099-12-31T10:51:00.000Z"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.