Update a product price

PATCH /company/prices/@id

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 The ID of the product price you want to update

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 Update all fields

PATCH /company/prices/252 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 754969533b326ac1787289ccab7a6e9a82388c373e1b9cb0eff91b3a65f45cdd9314c55938b4b164428dfeed94135acabcdb7780a9ecebea150d7df70b65b76784c029cbf52b1ef9c06968096298a829e2cdb61cb20a809631bdb00985017d6c69fbb5d7
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 125
{
    "name": {
        "nl": "Groot",
        "en": "Big",
        "fr": "Grand"
    },
    "price": 100,
    "order": 120
}

Example request 2 Update name

PATCH /company/prices/252 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 754969533b326ac1787289ccab7a6e9a82388c373e1b9cb0eff91b3a65f45cdd9314c55938b4b164428dfeed94135acabcdb7780a9ecebea150d7df70b65b76784c029cbf52b1ef9c06968096298a829e2cdb61cb20a809631bdb00985017d6c69fbb5d7
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 94
{
    "name": {
        "nl": "Medium",
        "en": "Medium",
        "fr": "Medium"
    }
}

Example request 3 Update price

PATCH /company/prices/252 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 754969533b326ac1787289ccab7a6e9a82388c373e1b9cb0eff91b3a65f45cdd9314c55938b4b164428dfeed94135acabcdb7780a9ecebea150d7df70b65b76784c029cbf52b1ef9c06968096298a829e2cdb61cb20a809631bdb00985017d6c69fbb5d7
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 20
{
    "price": 105
}

Example request 4 Update product price order

PATCH /company/prices/252 HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 754969533b326ac1787289ccab7a6e9a82388c373e1b9cb0eff91b3a65f45cdd9314c55938b4b164428dfeed94135acabcdb7780a9ecebea150d7df70b65b76784c029cbf52b1ef9c06968096298a829e2cdb61cb20a809631bdb00985017d6c69fbb5d7
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 20
{
    "order": 100
}

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 Update all fields

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

{
    "id": 252,
    "name": {
        "en": "Big",
        "fr": "Grand",
        "nl": "Groot"
    },
    "price": 100,
    "order": 120,
    "price_look_up_code": "6139",
    "code": "7371"
}

Example response 2 Update name

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

{
    "id": 252,
    "name": {
        "en": "Medium",
        "fr": "Medium",
        "nl": "Medium"
    },
    "price": 100,
    "order": 120,
    "price_look_up_code": "6139",
    "code": "7371"
}

Example response 3 Update price

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

{
    "id": 252,
    "name": {
        "en": "Medium",
        "fr": "Medium",
        "nl": "Medium"
    },
    "price": 105,
    "order": 120,
    "price_look_up_code": "6139",
    "code": "7371"
}

Example response 4 Update product price order

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

{
    "id": 252,
    "name": {
        "en": "Medium",
        "fr": "Medium",
        "nl": "Medium"
    },
    "price": 105,
    "order": 100,
    "price_look_up_code": "6139",
    "code": "7371"
}
1.5.0 stable