Customer relation types

It is possible to create different relations between Customer accounts in the CareCloud platform. You can define the principle of the Customer account relation, set the specific properties of the relation type, and create customized Customer relations between two or more customer accounts.

Available methods

All available methods for resource customer relation types

HTTP method Endpoint Description
[badge-blue GET] /customer-relation-types Get information about all customer relation types
[badge-blue GET] /customer-relation-types/{customer_relation_id} Get information about specific customer relation types

Get all customer relation types

Get a list of customer relation types from CareCloud
[badge-blue GET ] /customer-relation-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
customer_relation_types CustomerRelationType[] List of the customer relation types
total_items integer Count of all found customer relation types

Example Request

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

Example response

HTTP/1.1 200 OK
Date: Tue, 04 Aug 2020 09:55:53 GMT
Content-Type: application/json; charset=utf-8

{
{
  "data": {
    "customer_relation_types": [
      {
        "customer_relation_type_id": "86e05affc7a7abefcd513ab400",
        "name": "Connected accounts",
        "state": 1,
        "last_change": "2019-05-02 14:31:53"
      },
      {
        "customer_relation_type_id": "8bed991c68a470e7aaeffbf048",
        "name": "Family",
        "state": 1,
        "last_change": "2021-03-03 18:07:14"
      },
      {
        "customer_relation_type_id": "8fd73167342d06899c4c015320",
        "name": "Friends",
        "state": 1,
        "last_change": "2020-12-18 15:42:07"
      }
    ],
    "total_items": 3
  }
}

}


Detail of a customer relation type

Get information about a specific customer relation type
[badge-blue GET] /customer-relation-types/{customer_relation_type_id}

Path parameters

Parameter name Type Description
customer_relation_type_id string The unique id of a customer relation type in CareCloud

Response

Status code: 200 OK
Output structure : CustomerRelationType

Example request

GET <projectURL>/rest-api/enterprise-interface/v1.0/customer-relation-types/8bed991c68a470e7aaefff048
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZWgEmEyZGFjZ3NmUzNDljNGYyMzlkOWQ0NA==

Example response

HTTP/1.1 200 OK
Date: Tue, 04 Aug 2020 10:08:13 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "customer_relation_type_id": "8bed991c68a470e7aaefff048",
    "name": "Family",
    "state": 1,
    "last_change": "2021-03-03 18:07:14"
  }
}