Purchase types

You can get the list of the available purchase types here.

Available methods

All available methods for resource purchase types.

HTTP method Endpoint Description
[badge-blue GET] /purchase-types Get information about all purchase types

Get all purchase types

Get a list of purchase types accepted in CRM CareCloud
[badge-blue GET ] /purchase-types

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

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
purchase_types Purchase-type[] List of the purchase types
total_items integer Count of all found purchase types

Example Request

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

Example response

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

{
  "data": {
    "purchase_types": [
      {
        "type_id": "86e05affc7a7abefcd513ab400",
        "name": "Store purchase"
      },
      {
        "type_id": "81eaeea13b8984a169c490a325",
        "name": "Cancelled purchase"
      }
    ],
    "total_items": 2
  }
}