Reset the order numbers for specified shops

POST /company/companies/@id/reset-order-numbers

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 company ID that is owner of shops.

Body

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

Array of Dictionary: [Dictionary]

Dictionary

A dictionary with fields

Field Type Description
shop_id Int The ID of the shop

Example request 1 Shop does not exist

POST /company/companies/3083/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 52bef77937ab528538958398d248ea9fea18a837bfafc225bbd757892400a1e9db9c9161ed8851aeeb356bf22daa01f329bf5c03e6cb5b32126f656fedbdd04839ff2940ffcfde83c667dc676e81cf97e543df57e98579344b685aa47ebcc56054212d14
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 36
[
    {
        "shop_id": 0
    }
]

Example request 2 Shop does not belong to company

POST /company/companies/3086/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 5e94a6f21a8a8b974627b676dae274f313292bfc5ad5aed583229487884e83cf41d4c7ee43d0bcf93af1669f3fb4ce77587854073d21aa4aee6e90f18a9136974164f65b7509aab3819fd813878ec907eb3890cc97f7cc9778b49692d7a8e9054fed5d56
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 39
[
    {
        "shop_id": 3240
    }
]

Example request 3 Shop order numbers can only be reset when POS is not used

POST /company/companies/3088/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer c6e8df656cf5743326e31b4bb48aea65a5d286d0babc8ca704d0f0b6ad3ae0124e289c04288ddcdac8fb23c8d329e558d89d45af89c9414b81b2e3a7d0c25dd3d2d21cebfb6d31a62814307b05643fcb88de5f1859265d3f65068a99739187b75dbdfa3f
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 39
[
    {
        "shop_id": 3241
    }
]

Example request 4 Shop order numbers can only be reset when external order numbers are not used

POST /company/companies/3090/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 548c20f59a5a94eeb92caac1d644d31f466f87196f4305f3394ce51cbbe38c01371fdd055def1f1cc7d99842c6a4a9a6fd89d410712af5385683c6f9c7ff85ef292f0d5872d521747def9e00b7623a232236633fef403b1e86a6a80f48ab0f92d3fd34b6
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 39
[
    {
        "shop_id": 3243
    }
]

Example request 5 User has no permissions for shop

POST /company/companies/3092/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 8454a139dd29b2e9ff3986588e46a9b6a53b55ca1067a880ffc89239063483d1d9a5d44b5116932d56a9289ec550c98fe0c93f355cc2eb8b52bfa796b0a6080589961bb0054b6da1dd6a7f25e3a04a1b0ebe25dcf9966a57f23d61cb6d7b08608704103a
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 39
[
    {
        "shop_id": 3246
    }
]

Example request 6 User has no permissions for shop orders

POST /company/companies/3094/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer d42da09ba7ace44d0620d44e193016a92af86f5f5ca11c92249963845f66e4a004189fbe4bdda5962d4e4b54f1e2f7e968fe8feb027e1e913571318ee3f53c61a8eed69a33440a7ff9ea650ebecc33a7a6f9e04b7c4fe776407d5099ac996199f380e6a9
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 39
[
    {
        "shop_id": 3248
    }
]

Example request 7 Shop order numbers can only be reset daily

POST /company/companies/3095/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 17efd36c21071c398aa3c8c7c916f0aeb583aa60df90b02f758d13b614b483cb832d9d600ee5b278e881817176f93276dc4ae88a572a33fed393605444239ff6ce4675a0867ea64d1c2dcd58a9bf0d636d607be4995debd1d62c0af9bfd5af3e97c5a994
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 39
[
    {
        "shop_id": 3249
    }
]

Example request 8 Shop order numbers can be reset

POST /company/companies/3097/reset-order-numbers HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 79e8d537ece2efb7373a5e71dfc6409e03b90ac5776f7863e88fd534822ddc900c905084b02fda0db1fef52550ee615fb0ea7ce778133b5915da8f67cffadcca46ca396b1798a37ec03e65165808cec04be2bc6c91e11d75d91ae3db04557f499e6fcd83
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 39
[
    {
        "shop_id": 3251
    }
]

Response

Example response 1 Shop does not exist

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 160

[
    {
        "code": "invalid_field",
        "message": "The shop with id 0 doesn't exist or belong to the given company",
        "field": "data.0"
    }
]

Example response 2 Shop does not belong to company

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 163

[
    {
        "code": "invalid_field",
        "message": "The shop with id 3240 doesn't exist or belong to the given company",
        "field": "data.0"
    }
]

Example response 3 Shop order numbers can only be reset when POS is not used

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 118

[
    {
        "code": "invalid_field",
        "message": "This shop uses a POS.",
        "field": "data.0"
    }
]

Example response 4 Shop order numbers can only be reset when external order numbers are not used

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 135

[
    {
        "code": "invalid_field",
        "message": "This shop uses external order numbers.",
        "field": "data.0"
    }
]

Example response 5 User has no permissions for shop

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 142

[
    {
        "code": "access_denied",
        "message": "You don't have permission to access this shop",
        "field": "data.0"
    }
]

Example response 6 User has no permissions for shop orders

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 154

[
    {
        "code": "access_denied",
        "message": "You don't have permissions to access orders for this shop",
        "field": "data.0"
    }
]

Example response 7 Shop order numbers can only be reset daily

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 139

[
    {
        "code": "invalid_field",
        "message": "Order numbers can only be reset once a day",
        "field": "data.0"
    }
]

Example response 8 Shop order numbers can be reset

HTTP/1.1 204 No Content
Version update available Please adjust your integration to the latest stable version (1.5.2)
1.5.0 stable