Segments

Segments are the customer groups, that can be defined and created in CRM CareCloud according to many different criteria. Customers in the Segment share some specific common information or property and can be managed via this resource.

Available methods

All available methods for resource Segment.

HTTP method Endpoint Description
[badge-blue GET] /segments Get information about all segments
[badge-blue GET] /segments/{segment_id} Get information about a segment

Available methods with sub-resources

All available methods for sub-resources of resource segments.

HTTP method Endpoint Description
[badge-blue GET] / segments/{segment_id}/segment-records Get all cutomers in a segment

Actions

Action methods for resource segments.

HTTP method Endpoint Description
[badge-green POST] /segments/{segment_id}/actions/add-customer Add a customer to a segment
[badge-green POST] /segments/{segment_id}/actions/remove-customer Remove a customer from a segment


Get all segments

Get information about segments as a list of all segments
[badge-blue GET] /segments

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
segments Segment[] List of all segments
total_items integer Count of all found segments


Get a segment

Get information about a specific segment
[badge-blue GET] /segments/{segment_id}

Path parameters

Parameter name Type Description
segment_id string The unique id for the segment

Response

Status code: 200 OK
Output structure : Segment


Add customer to a segment

Action method that adds customer to specified segment.
[badge-green POST] /segments/{segment_id}/actions/add-customer

Path parameters

Parameter name Type Description Mandatory (Yes/No)
segment_id string The unique id for the segment Yes

Request

Parameter name Type Description Mandatory (Yes/No)
customer_id string The unique id for the customer Yes

Response

Status code: 204 No Content


Remove customer from a segment

[badge-green POST] /segments/{segment_id}/actions/remove-customer
Action method that removes customer from a specified segment.

Path parameters

Parameter name Type Description Mandatory (Yes/No)
segment_id string The unique id for the segment Yes

Request

Parameter name Type Description Mandatory (Yes/No)
customer_id string The unique id for the customer Yes

Response

Status code: 204 No Content