POST v1/Products

BETA

Creates a list of Products. Duplicated style codes or product option code in the request will cause the request to be rejected with a 400. If a product with the same style code or product option code already exists, it will be skipped and not created. **This endpoint is in BETA.**

Request Information

URI Parameters

None.

Body Parameters

Collection of CreateProductRequest
NameDescriptionTypeAdditional information

Name

The product name

string

Required

Max length: 250

Status

Will default to Public if not set. Status: Public, Inactive, ShowInB2B, Internal

ProductStatus

None.

StyleCode

The Product style code

string

Max length: 250

Description

The product description

string

Max length: 250

StockControl

Will default to FIFO if not set. Stock control: FIFO, Batch, Machine, Serial, Labour

StockControl

None.

OrderType

Will default to Order if not set. Order Type: Order, Kit, Limited Stock, Buy To Order, Pre-order, Gift Voucher

string

One of the allowed types: Order, Kit, Limited Stock, Buy To Order, Pre-order, Gift Voucher

Brand

The product brand name. Allow users to assign a brand name based on their preference. This doesn’t need to be part of the existing list of brands present in the backend.

string

Max length: 250

OptionLabel1

A label for the first product option (e.g., Color).

string

Max length: 250

OptionLabel2

A label for the second product option (e.g., Size).

string

Max length: 250

OptionLabel3

A label for the third product option (e.g., Fabric).

string

Max length: 250

SalesAccount

The sales account associated with the product.

string

Max length: 250

PurchasesAccount

The purchase account associated with the product.

string

Max length: 250

ImportCustomsDuty

The import customs duty applicable to the product.

string

Max length: 250

SkuRangeId

The id of the SKU Range available in Omni account.

integer

None.

CategoryIdArray

Array of category IDs assigned to the product.

Collection of integer

None.

Dimensions

Dimensions of the product like weight, height, width, length, volume

CreateProductDimensionsRequest

None.

ProductOptions

Prices and Costs of the product. *Only ONE Product Option* is supported at this time.

Collection of CreateProductOptionRequest

Required

Max length: 1

Min length: 1

SizeRangeId

The Id of the Size Range. This can be obtained from the GetSizeRanges Endpoint

integer

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "name": "sample string 1",
    "status": "Inactive",
    "styleCode": "sample string 2",
    "description": "sample string 3",
    "stockControl": "Undefined",
    "orderType": "sample string 4",
    "brand": "sample string 5",
    "optionLabel1": "sample string 6",
    "optionLabel2": "sample string 7",
    "optionLabel3": "sample string 8",
    "salesAccount": "sample string 9",
    "purchasesAccount": "sample string 10",
    "importCustomsDuty": "sample string 11",
    "skuRangeId": 12,
    "categoryIdArray": [
      1,
      2
    ],
    "dimensions": {
      "weight": 1.0,
      "height": 1.0,
      "width": 1.0,
      "length": 1.0,
      "volume": 1.0
    },
    "productOptions": [
      {
        "productOptionCode": "sample string 1",
        "retailPrice": 2.0,
        "cost": 3.0
      },
      {
        "productOptionCode": "sample string 1",
        "retailPrice": 2.0,
        "cost": 3.0
      }
    ],
    "sizeRangeId": 13
  },
  {
    "name": "sample string 1",
    "status": "Inactive",
    "styleCode": "sample string 2",
    "description": "sample string 3",
    "stockControl": "Undefined",
    "orderType": "sample string 4",
    "brand": "sample string 5",
    "optionLabel1": "sample string 6",
    "optionLabel2": "sample string 7",
    "optionLabel3": "sample string 8",
    "salesAccount": "sample string 9",
    "purchasesAccount": "sample string 10",
    "importCustomsDuty": "sample string 11",
    "skuRangeId": 12,
    "categoryIdArray": [
      1,
      2
    ],
    "dimensions": {
      "weight": 1.0,
      "height": 1.0,
      "width": 1.0,
      "length": 1.0,
      "volume": 1.0
    },
    "productOptions": [
      {
        "productOptionCode": "sample string 1",
        "retailPrice": 2.0,
        "cost": 3.0
      },
      {
        "productOptionCode": "sample string 1",
        "retailPrice": 2.0,
        "cost": 3.0
      }
    ],
    "sizeRangeId": 13
  }
]

Response Information

Resource Description

Collection of BatchResultItem
NameDescriptionTypeAdditional information

Index

​The index at which the record was positioned in an insert or update.

integer

None.

Success

​True if the record was successfully inserted or updated.

boolean

None.

Id

The record Id.

integer

None.

Code

The record code.

string

None.

Errors

A list of errors if the insert or update fails.

Collection of string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "index": 0,
    "success": true,
    "id": 1,
    "code": "SALE4-28",
    "errors": []
  },
  {
    "index": 1,
    "success": true,
    "id": 2,
    "code": "SALE5-29",
    "errors": []
  }
]