Skip to content
Get started

Create Discount Prices

POST/api/v2/public/products/discountprices

Creates or updates promotional prices, which override the standard price while they are valid. The is_flush header replaces all existing discount prices instead of merging, so only use it when sending the complete set.

Header ParametersExpand Collapse
is_expire_discounts: optional boolean
is_flush: optional boolean
Body ParametersJSONExpand Collapse
discounts: optional array of object { discount_description, discount_group, discount_id, 7 more }

The list of discount price entries.

discount_description: optional string

Human-readable description of the discount.

discount_group: optional string

Optional discount group identifier.

discount_id: optional string

Unique discount identifier.

discount_type: optional number

Numeric discount type.

formatint64
is_delete: optional boolean

When true, removes the existing discount entry.

line_number: optional number

Line number on the discount.

formatint64
price: optional number

Discounted price value.

formatfloat
product_number: optional string

The product number this discount applies to.

valid_from: optional string

Start of the discount’s validity period.

formatdate-time
valid_to: optional string

End of the discount’s validity period.

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 Discount Prices

curl https://api.colleqtive.net/api/v2/public/products/discountprices \
    -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."
}