Skip to content
Get started

Create Store Products

POST/api/v2/public/stores/{store_number}/storeproducts

Ranges products in a store, creating the store product records that hold per-store settings such as minimum and maximum levels, shelf capacity and replenishment. Use the PUT on the same path to change products already ranged.

Path ParametersExpand Collapse
store_number: string
Body ParametersJSONExpand Collapse
body: optional array of object { product_number, attention_codes, average_array, 20 more }
product_number: string

Product to range in the store. Required.

attention_codes: optional array of string

Attention codes that flag this product for special handling in this store.

average_array: optional array of number

Average sales per period, matching average_keys.

average_keys: optional array of string

Labels for the periods in average_array, in the same order.

default_salesorder_type: optional string

Sales order type used by default for this product.

delivery_datetimes: optional array of string

All upcoming delivery moments.

demand_until_delivery: optional number

Expected demand between now and the next delivery.

formatfloat
discount_price: optional number

Discounted sales price in this store.

formatfloat
expiry_date_time: optional string

Expiry date to record for this product in this store.

formatdate-time
forecast_array: optional array of number

Forecast demand per period, matching forecast_keys.

forecast_keys: optional array of string

Labels for the periods in forecast_array, in the same order.

history_array: optional array of number

Sales history per period, matching history_keys.

history_keys: optional array of string

Labels for the periods in history_array, in the same order.

is_promotion: optional boolean

true when the product is on promotion in this store.

is_replenishment: optional boolean

true when the product is replenished automatically.

max: optional number

Maximum stock level. Replenishment does not order above this.

formatint32
min: optional number

Minimum stock level. Replenishment aims to keep stock above this.

formatint32
next_delivery_date: optional string

Next moment a delivery is expected.

formatdate-time
next_ordering_date: optional string

Next moment an order can be placed for this product.

formatdate-time
order_level: optional number

Stock level at which the product is reordered.

formatfloat
ordering_datetimes: optional array of string

All upcoming ordering moments.

price: optional number

Sales price in this store.

formatfloat
validate_expiry_date_time: optional string

When the expiry date should next be checked.

formatdate-time
ReturnsExpand Collapse
success: boolean

Indicates whether the operation completed successfully.

data: optional string

Optional data payload returned by the operation.

message: optional string

Human-readable message describing the result.

Create Store Products

curl https://api.colleqtive.net/api/v2/public/stores/$STORE_NUMBER/storeproducts \
    -X POST \
    -H "Authorization: $COLLEQTIVE_BEARER_TOKEN"
{
  "success": true,
  "data": "data",
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}
Returns Examples
{
  "success": true,
  "data": "data",
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}