Skip to content
Get started

Create Prices

products.create_prices(ProductCreatePricesParams**kwargs) -> ProductCreatePricesResponse
POST/api/v2/public/products/prices

Creates or updates standard product prices. Each price has a price group and a validity window, so future prices can be loaded ahead of time. For promotions use the discount prices endpoint.

ParametersExpand Collapse
body: Optional[Iterable[Body]]
price_id: str

Unique price identifier.

minLength1
product_number: str

The product number this price applies to.

minLength1
country_code: Optional[str]

Optional ISO country code restricting the price.

price: Optional[float]

Price value.

formatdouble
price_group: Optional[str]

Optional price group identifier.

price_quantity: Optional[float]

Quantity for which the price applies.

formatdouble
price_type: Optional[int]

Numeric price type.

formatint32
price_unit: Optional[str]

Unit of measure the price applies to.

store_number: Optional[str]

Optional store number restricting the price.

valid_from: Optional[Union[str, datetime]]

Start of the price’s validity period.

formatdate-time
valid_to: Optional[Union[str, datetime]]

End of the price’s validity period.

formatdate-time
ReturnsExpand Collapse
class ProductCreatePricesResponse: …

Standard success response returned by mutation endpoints.

success: bool

Indicates whether the operation completed successfully.

data: Optional[str]

Optional data payload returned by the operation.

message: Optional[str]

Human-readable message describing the result.

Create Prices

import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.products.create_prices()
print(response.success)
{
  "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."
}