Different customer card types can be managed in CRM CareCloud. Credit Card, Loyalty Card, mobile Card, skipass, virtual Card or any other type of customer unique personal ID or any other customer identification method like barcode, QR code or any other key can be used. The customer card types can be differenciated by a prefix, name or design and managed by this resource.
All available methods for resource card-types.
HTTP method | Endpoint | Description |
---|---|---|
[badge-green POST] | /card-types | Create a new type of card |
[badge-blue GET] | /card-types | Get information about all card types |
[badge-blue GET] | /card-types/{card_type_id} | Get information about a specific card type |
[badge-grey PUT] | /card-types/{card_type_id} | Update a specific card type |
All available methods for sub-resources of resource card-types.
HTTP method | Endpoint | Description |
---|---|---|
[badge-blue GET] | /card-types/{card_type_id}/cards | Collection of cards depending on card type resource |
Add a new customer card type
[badge-green POST] /card-types
Parameter name | Type | Description | Mandatory (Yes/No) |
---|---|---|---|
card_type | CardType | CardType resource | Yes |
Status code: 201 Created
Output structure : object
Parameter name | Type | Description |
---|---|---|
card_type_id | string | The unique id of the card type |
POST https://<projectURL>/rest-api/enterprise-interface/v1.0/card-types
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmU2ZTBkMjg4MDllMzM3ZDdjNGEmEZGFjZ3NmUzNDljNGYyMzlkOWEwZmQyM2Q0NA0NA==
{
"card_type": {
"name" : "REST API card type",
"prefix" : ""
}
}
HTTP/1.1 201 Created
Date: Tue, 04 Aug 2020 11:13:38 GMT
Content-Type: application/json; charset=utf-8
{
"data": {
"card_type_id": "8fd17bf437555cf56a6ecf05fc"
}
}
Get information about all card types as a list of all customer card types
[badge-blue GET] /card-types
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 card type | No |
Status code: 200 OK
Output structure : object
Parameter name | Type | Description |
---|---|---|
card_types | CardType[] | Collection of all card types |
total_items | integer | Count of all found card types |
GET https://<projectURL>/rest-api/enterprise-interface/v1.0/card-types?name=BasicCard
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmU2ZTBkMjg4MDllMzM3ZDdNGEmEyZGFjZ3NmUzNDljNGYyMzlkOWEwZmQyM2Q0NA0NA==
HTTP/1.1 200 OK
Date: Tue, 04 Aug 2020 11:09:01 GMT
Content-Type: application/json; charset=utf-8
{
"data": {
"card_types": [
{
"card_type_id": "86e05affc7a7abefcd513ab400",
"name": "BasicCard",
"prefix": "0"
},
{
"card_type_id": "8bd48117006496e0b1788109b8",
"name": "BasicCard 2",
"prefix": "12"
}
],
"total_items": 2
}
}
Get information about a specific customer card type
[badge-blue GET ]/card-types/{card_type_id}
Parameter name | Type | Description |
---|---|---|
card_type_id | string | The unique id of the card type |
Status code: 200 OK
Output structure : CardType
GET https://<projectURL>/rest-api/enterprise-interface/v1.0/card-types/86e05affc7a7abefcd513ab400
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmU2ZTBkMjg4MDllMzM3ZDdjGEmEyZGFjZ3NmUzNDljNGYyMzlkOWEwZmQyM2Q0NA==
HTTP/1.1 200 OK
Date: Tue, 04 Aug 2020 11:10:17 GMT
Content-Type: application/json; charset=utf-8
{
"data": {
"card_type_id": "86e05affc7a7abefcd513ab400",
"name": "BasicCard",
"prefix": "0"
}
}
Update a specific customer card type
[badge-grey PUT] /card-types/{card_type_id}
Parameter name | Type | Description |
---|---|---|
card_type_id | string | The unique id of the card type |
Parameter name | Type | Description | Mandatory (Yes/No) |
---|---|---|---|
card_type | CardType | CardType resource | Yes |
Status code: 204 No Content
PUT https://<projectURL>/rest-api/enterprise-interface/v1.0/card-types/8fd17bf437555cf56a6ecf05fc
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmU2ZTBkMjg4MDllMzM3ZDdjNGEmEyZGFjZ3NmUzNDljNGYyMzlkOWEwZmQyM2Q0NA0NA==
{
"card_type": {
"name" : "REST card type edit",
"prefix" : "2"
}
}
HTTP/1.1 204 No Content
Date: Tue, 04 Aug 2020 11:16:12 GMT
Content-Type: application/json; charset=utf-8