Point types

You can create different types of loyalty points in CareCloud platform and get the details of loyalty point types in this resource.

Available methods

All available methods for resource point types

HTTP method Endpoint Description
[badge-blue GET] /point-types Get information about all point types
[badge-blue GET] /point-types/{point_id} Get information about a point type


Get all point types

Get a list of all point types
[badge-blue GET] /point-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
point_types PointType[] List of the point types
total_items integer Count of all found point types

Example Request

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

Example response

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

{
  "data": {
    "point_types": [
      {
        "point_type_id": "8bed991c68a470e7aaeffbf048",
        "name": "Cancellation",
        "last_change": null
      },
      {
        "point_type_id": "8fdd651ff3f615bcebebad87ce",
        "name": "10x more points",
        "last_change": "2020-04-22 13:53:54"
      }
    ],
    "total_items": 38
  }
}


Get a point type

Get information about a specific point type
[badge-blue GET] /point-types/{point_type_id}

Path parameters

Parameter name Type Description
point_type_id string The unique id for the point type

Response

Status code: 200 OK
Output structure : PointType

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/point-types/8bed991c68a470e7aaeffbf048
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:05:02 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "point_type_id": "8bed991c68a470e7aaeffbf048",
    "name": "Cancellation",
    "last_change": null
  }
}