POST
/
products
curl --request POST \
  --url https://api.fabric.inc/v3/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sku": "XP-123345",
  "categoryId": "QWE1234CCVFDDERW21",
  "isActive": true,
  "type": "ITEM",
  "attributes": [
    {
      "id": "6d7329dfd5288b0011332311",
      "value": "blue"
    }
  ],
  "parentProduct": {
    "id": "AASSBCC12334FCD12334V"
  },
  "bundleProducts": [
    {
      "sku": "XP-123345",
      "quantity": 2
    }
  ],
  "status": "LIVE",
  "localizedProperties": {
    "en-US": {
      "attributes": [
        {
          "id": "W123333RRTT555y1",
          "value": "blue"
        }
      ]
    },
    "en-IN": {
      "attributes": [
        {
          "id": "W123333RRTT555AA",
          "value": "blue"
        }
      ]
    }
  }
}'
{
  "id": "5g7329dfd5288b00113323p7",
  "sku": "QWERTTY56DDFFVVV",
  "type": "ITEM",
  "isActive": true,
  "hasDraft": true,
  "hasLive": true,
  "status": "LIVE",
  "attributes": [
    {
      "id": "227329dfd5288b0011332315",
      "name": "Color",
      "type": "string",
      "isDeleted": false,
      "value": "blue",
      "isInherited": true
    }
  ],
  "localizedProperties": {
    "en-US": {
      "attributes": [
        {
          "id": "637329dfd5288b0011332354",
          "name": "Color",
          "type": "string",
          "isDeleted": false,
          "value": "blue",
          "isInherited": true
        }
      ]
    },
    "en-IN": {
      "attributes": [
        {
          "id": "8f7329dfd5288b0011332334",
          "name": "Colour",
          "type": "string",
          "isDeleted": false,
          "value": "blue",
          "isInherited": true
        }
      ]
    }
  },
  "variants": [
    {
      "id": "967329dfd5288b0011332356"
    }
  ],
  "categoryId": "7f7329dfd5288b0011332378",
  "createdAt": "2021-09-14T22:10:30.618Z",
  "updatedAt": "2021-09-14T22:10:30.618Z"
}

Authorizations

Authorization
string
header
required

S2S access token (JWT) from fabric Identity service (during Login)

Headers

x-fabric-tenant-id
string

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

Example:

"517fa9dfd42d8b00g1o3k312"

x-fabric-request-id
string

Unique request ID

Example:

"263e731c-45c8-11ed-b878-0242ac120002"

Body

application/json

Request body for creating Items, Variants and Bundles

sku
string
required

Unique product ID that maps to fabric's standard attribute called SKU. <br /> <b>Note:</b> sku shouldn't include ; or =

Example:

"XP-123345"

categoryId
string
required

24-character system-generated category ID

Example:

"QWE1234CCVFDDERW21"

type
enum<string>
required

Supported product types

Available options:
ITEM,
VARIANT,
BUNDLE
Example:

"ITEM"

status
enum<string>
required

Represents the current status of product. This value takes precedence over isActive if both are sent in the request.

Available options:
DRAFT,
LIVE
Example:

"LIVE"

isActive
boolean
deprecated

Determines if the Product is published or unpublished. Status parameter takes precedence

Example:

true

attributes
object[]

Array of product attributes

Details of product attributes

parentProduct
object

ID or SKU of parent product

bundleProducts

Bundle ID or SKU

localizedProperties
object
Example:
{
  "en-US": {
    "attributes": [
      { "id": "W123333RRTT555y1", "value": "blue" }
    ]
  },
  "en-IN": {
    "attributes": [
      { "id": "W123333RRTT555AA", "value": "blue" }
    ]
  }
}

Response

200
application/json
OK

Details of Item by ID

id
string

Product ID

Example:

"AASSBCC12334FCD12334V"

sku
string

Unique product ID that maps to fabric's standard attribute called SKU. <br /> <b>Note:</b> sku shouldn't include ; or =

Example:

"XP-123345"

type
enum<string>

Supported product types

Available options:
ITEM,
VARIANT,
BUNDLE
Example:

"ITEM"

isActive
boolean

true: Product is active <br /> false: Product is inactive

Example:

true

hasDraft
boolean

true: Product has a Draft version <br /> false: Product doesn't have a Draft version

Example:

true

hasLive
boolean

true: Product has a Live version <br /> false: Product doesn't have a Live version

Example:

true

status
enum<string>

Represents the current status of product. This value takes precedence over isActive if both are sent in the request.

Available options:
DRAFT,
LIVE
Example:

"LIVE"

attributes
object[]

Attributes of product

Details of product attributes

localizedProperties
object

Localized attribute names

Example:
{
  "en-US": {
    "attributes": [
      {
        "id": "4e7329dfd5288b0011332366",
        "name": "Color",
        "type": "string",
        "isDeleted": false,
        "value": "blue",
        "isInherited": true
      }
    ]
  }
}
parentProduct
object

Parent item ID of the Variant

variants
object[]

Product variants by ID

categoryId
string

24-character system-generated category ID of product

Example:

"6h7329dfd5288b001133231d"

bundleProducts
object[]

Items or variants that are part of Bundle by ID

createdAt
string

Time of product creation (UTC)

Example:

"2021-09-14T22:10:30.618Z"

updatedAt
string

Time of last update to product (UTC)

Example:

"2021-09-14T22:10:30.618Z"

Was this page helpful?