Products

Products used in CareCloud.

Available methods

All available methods for resource products.

HTTP method Endpoint Description
[badge-blue GET] /products Collection of all available products
[badge-blue GET] /products/{product_id} Detail of a product

Collection of available products

Get information about all available products
[badge-blue GET] /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 product No
code string Code of the product No
external_id string External id of the product No
external_type_code string Every product can have more than one external id depends of the bussiness requirements. This paramter allows to pick from witch list of external ids you want to choose. For the list of external type codes please contact you account manager. If the parameter is not set, API uses as a default value GLOBAL No

Response

Status code: 200 OK
Output structure : object

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

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/products?code=649&name=Vodka%20tonic
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZVcmZhY2U6YmVlZDA2ZjBmYhTEyUwOWIzNzk2ZjMODEEyZTIxNmVkMM5NDE5Zj2NzMwZmRj2w

Example response

HTTP/1.1 200 OK
Date: Tue, 29 Sep 2020 15:12:54 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "products": [
      {
        "product_id": "89bdacbffb5c82f2c52cb9ae8f",
        "name": "Vodka tonic",
        "code": "649",
        "external_id": "668",
        "product_group_id": "85cfc89601efa1ba2c2aa3b6a0",
        "product_brand_id": null,
        "additional_properties": [],
        "last_change": "2012-12-18 11:55:07",
        "state": 1
      }
    ],
    "total_items": 1
  }
}

Detail of a product

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

Path parameters

Parameter name Type Description
product_id string The unique id for the product

Response

Status code: 200 OK
Output structure : Product

Example Request

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

Example response

HTTP/1.1 200 OK
Date: Tue, 29 Sep 2020 15:14:11 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "product_id": "89bdacbffb5c82f2c52cb9ae8f",
    "name": "Vodka tonic",
    "code": "649",
    "external_id": "668",
    "product_group_id": "85cfc89601efa1ba2c2aa3b6a0",
    "product_brand_id": null,
    "additional_properties": [],
    "last_change": "2012-12-18 11:55:07",
    "state": 1
  }
}