Card types

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.

Available methods

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

Available methods with sub-resources

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


Create a new card type

Add a new customer card type
[badge-green POST] /card-types

Request

Parameter name Type Description Mandatory (Yes/No)
card_type CardType CardType resource Yes

Response

Status code: 201 Created
Output structure : object

Parameter name Type Description
card_type_id string The unique id for the card type

Example request

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" : ""
  }
}

Example response

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

Get information about all card types as a list of all customer card types
[badge-blue GET] /card-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
name string Name of the card type No

Response

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

Example request

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==

Example response

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 a card type

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

Path parameters

Parameter name Type Description
card_type_id string The unique id for the card type

Response

Status code: 200 OK
Output structure : CardType

Example request

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==

Example response

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 card type

Update a specific customer card type
[badge-grey PUT] /card-types/{card_type_id}

Request

Parameter name Type Description Mandatory (Yes/No)
card_type CardType CardType resource Yes

Response

Status code: 204 No Content

Example request

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"
  }
}

Example response

HTTP/1.1 204 No Content
Date: Tue, 04 Aug 2020 11:16:12 GMT
Content-Type: application/json; charset=utf-8