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

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 CreateProductOptionsRequest

Required

Max length: 1

Min length: 1

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",
    "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
      }
    ]
  },
  {
    "name": "sample string 1",
    "status": "Inactive",
    "styleCode": "sample string 2",
    "description": "sample string 3",
    "stockControl": "Undefined",
    "orderType": "sample string 4",
    "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
      }
    ]
  }
]

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": []
  }
]