Skip to content

Get Cards (GET /v1/cards)

Retrieves all Cards with pagination and optional filtering.

URL test:

https://test.lightcms.io/loyalty/v1/cards

Method:

GET

Path Items

/v1/cards

Parameters

Name Location Type Required Description
accept header string Yes Media types that are acceptable for the response (e.g., */*).
cardid query integer (int64) No Filter by internal Card ID.
accountid query string No Filter by external account identifier.
page query integer (int32) No Zero‑based page index (default 0).
size query integer (int32) No Number of items per page (default 20).
sort query string No Sorting expression, e.g., createdAt,desc.

Example cURL

    curl -X GET "https://test.lightcms.io/loyalty/v1/cards?page=0&size=20&sort=createdAt,desc" \
         -H "accept: */*"

Responses:

200 - OK

Status Code: 200 OK

[
  {
    "id": 1,
    "cardId": 123456,
    "holderExternalId": "holder-abc-123",
    "extStatus": "ACTIVE",
    "association": "VISA",
    "cardProductDefinitionCode": "CPD001",
    "createdAt": "2024-05-10T14:30:00Z",
    "updatedAt": "2025-01-22T09:15:00Z"
  },
  {
    "id": 2,
    "cardId": 789012,
    "holderExternalId": "holder-def-456",
    "extStatus": "BLOCKED",
    "association": "MC",
    "cardProductDefinitionCode": "CPD002",
    "createdAt": "2024-06-01T08:20:00Z",
    "updatedAt": "2025-02-10T11:45:00Z"
  }
]

Parameter Location Type Description
id body integer (int64) Unique identifier of the Card record.
cardId body integer (int64) Identifier of the Card as known in the card system.
holderExternalId body string External identifier of the Card holder (from CMS).
extStatus body string Current status of the Card (e.g., ACTIVE, BLOCKED).
association body string Card association/brand (e.g., VISA, MC).
cardProductDefinitionCode body string Card Product Definition (CPD) code.
createdAt body string (date‑time) Timestamp when the Card record was created.
updatedAt body string (date‑time) Timestamp of the last update to the Card record.
500 - Internal Server Error

Status Code: 500 Internal Server Error

{
  "errorMessage": "Internal error"
}