Sub-resources of card-types

All available methods for the sub-resources of the resource card-types.


Get a collection of cards

Get information about all cards by card types resource
[badge-blue GET] /card-types/{card_type_id}/cards

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
customer_id string The unique id for the customer No
is_valid boolean If in validity range - true, before or after validity range - false No

Path parameters

Parameter name Type Description Mandatory (Yes/No)
card_type_id string The unique id for the card type Yes

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
cards Card[] List of cards
total_items integer Count of all found cards

Example request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/card-types/86e05afc7a7abefcd513ab400/cards?customer_id=85ca0e716e939939f8027d12b&is_valid=true
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmU2ZTBkMjg4MDllMzM3ZDjNGEmEyZGFjZ3NmUzNDljNGYyMzlkOWEwZmQyM2Q0NA0NA0NA==

Example response

HTTP/1.1 200 OK
Date: Tue, 04 Aug 2020 11:35:32 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "cards": [
      {
        "card_id": "82db62087b0f79a6e14e5747e7",
        "customer_id": "85ca0e716e9359939f8027d12b",
        "card_type_id": "86e05affc7a7abefcd513ab400",
        "card_number": "2001990000047",
        "state": 1,
        "valid_from": null,
        "valid_to": null,
        "store_id": null,
        "last_change": "2013-01-03 08:58:48.782443"
      },
      {
        "card_id": "8fd17bf437555cf56a6ecf05fc",
        "customer_id": "85ca0e716e9359939f8027d12b",
        "card_type_id": "86e05affc7a7abefcd513ab400",
        "card_number": "2001990000344",
        "state": 1,
        "valid_from": "2020-08-04",
        "valid_to": null,
        "store_id": null,
        "last_change": "2020-08-04 13:01:39"
      }
    ],
    "total_items": 2
  }
}