Reservable products

The set of Products that could be reserved can be limited. We call this group Reservable Products. You can get the details of Reservable Products and search within this group by this resource.

Available methods

All available methods for resource reservable products.

HTTP method Endpoint Description
[badge-blue GET] /reservable-products Collection of available reservable products
[badge-blue GET] /reservable-products/{reservable_product_id} Detail of reservable product

Actions

Action method for resource reservable-products

HTTP method Endpoint Description
[badge-blue POST] /reservable-products/actions/search-reservable-products Searching in reservable products


Get all reservable products

Get the information as a list of reservable products
[badge-blue GET] /reservable-products

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No
name string Name of the reservable product No
code string Code of the reservable product No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
reservable_products Product[] List of reservable products
total_items integer Count of all found reservable products

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/reservable-products?code=8050
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 14:04:47 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "reservable_products": [
      {
        "product_id": "8fa5de241bc33241e911b8a757",
        "name": "Tex mex 400g",
        "code": "8050",
        "external_id": "677",
        "product_group_id": "8fc648d27b540d03975055f4f3",
        "product_brand_id": null,
        "additional_properties": [],
        "last_change": "2017-12-06 14:14:55",
        "state": 1
      }
    ],
    "total_items": 1
  }
}


Get a reservable product

Get information about a specific reservable product
[badge-blue GET] /reservable-products/{reservable_product_id}

Path parameters

Parameter name Type Description
reservable_product_id string The unique id for the reservable product

Response

Status code: 200 OK
Output structure : Product

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/reservable-products/8fa5de241bc33241e911b8a757
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 14:05:20 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "product_id": "8fa5de241bc33241e911b8a757",
    "name": "Tex mex 400g",
    "code": "8050",
    "external_id": "677",
    "product_group_id": "8fc648d27b540d03975055f4f3",
    "product_brand_id": null,
    "additional_properties": [],
    "last_change": "2017-12-06 14:14:55",
    "state": 1
  }
}


Search reservable products

[badge-green POST] /reservable-products/actions/search-reservable-products

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No

Request

Parameter name Type Description Mandatory (Yes/No)
search_string string String used for searching the results Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
search_results SearchResult[] List of the results
total_items integer Count of the results

Example Request

POST https://<projectURL>/rest-api/enterprise-interface/v1.0/reservable-products/actions/search-reservable-products
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6NDU3NDJhMDAxNmEyZjc1NDI3YWUwMTM0NmMyOWQxNmE4NzI1MWZlzZmMzcwNmI2MDJmDfN2Q2Mw==

{
  "search_string" : "Ca"
}

Example response

HTTP/1.1 200 OK
Date: Tue, 20 Oct 2020 14:07:59 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "search_results": [
      {
        "search_result_string": "Campari soda 2dc",
        "resource_id": "84b2d99e84c3d730beba523799",
        "flags": []
      },
      {
        "search_result_string": "Cabernet Carmen fl",
        "resource_id": "89a2c5591df147c831ab955857",
        "flags": []
      }
    ],
    "total_items": 2
  }
}