Create a product price

POST /company/products/@id/prices

Request

Authentication

This endpoint requires authentication.

Header Value
Authorization Set the value to Bearer + + access_token

URL parameters

Replace the @ keywords in the URL with their corresponding value.

A dictionary with fields

Field Type Description
id Int Product ID. Create a product price for this product

Body

Pass the following properties via application/json or form encoding in the body of the request.

Field Type Description
name [Language: String] Name of the product price (translated)
price UInt Price of this product price (cents)
order Int The product prices of a product are sorted on the order property (descending). If you specify the same order for multiple product prices, the id of the product price is used. Setting the same order for all product prices is discouraged.
price_look_up_code String? Optional. Nullable. A String value
code String? Optional. Nullable. A custom code. You can set this to your own code and use this field to map your prices to Bakeronline prices

Example request 1 Create a simple product price

POST /company/products/189674/prices HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer a3ed22e7df0f060fc5d61fb3db4ad3a731710444984d6d88dec0a8df582696d85e0c306f97477a04c8c9cf8dc7bd743dc68dfaede971a2a044ef4c78712ae095460a57a1215a3c722cfdf448ac14894afd7c6140327cdcc89a63cc27bda6eaabc6c3ccc3
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 126
{
    "name": {
        "nl": "Groot",
        "en": "Big",
        "fr": "Grand"
    },
    "price": 100,
    "order": 1234
}

Response

Field Type Description
name [Language: String] Name of the product price (translated)
price UInt Price of this product price (cents)
id Int Id of the product price
order Int The product prices of a product are sorted on the order property (descending). If you specify the same order for multiple product prices, the id of the product price is used. Setting the same order for all product prices is discouraged.
price_look_up_code String? Optional. Nullable. A String value
code String? Optional. Nullable. A custom code. You can set this to your own code and use this field to map your prices to Bakeronline prices

Example response 1 Create a simple product price

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 196

{
    "id": 11750823,
    "name": {
        "nl": "Groot",
        "en": "Big",
        "fr": "Grand"
    },
    "price": 100,
    "order": 1234,
    "price_look_up_code": null,
    "code": null
}
1.5.0 stable