Skip to main content
POST
/
v2
/
loyalties
/
card-definitions
/
{cardDefinitionId}
/
draft
Draft Card Definition
curl --request POST \
  --url {protocol}://{host}/v2/loyalties/card-definitions/{cardDefinitionId}/draft \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "id": "<string>",
  "name": "<string>",
  "type": "INDIVIDUAL",
  "code_config": {
    "pattern": "<string>",
    "length": 123,
    "charset": "<string>",
    "prefix": "<string>",
    "postfix": "<string>"
  },
  "points_expiration": {
    "rolling_expiration": {
      "period": {
        "value": 123
      },
      "rounding": {
        "value": 6
      }
    },
    "calendar_expiration": {
      "expiration_dates": [
        {
          "day": 16,
          "month": 6
        }
      ]
    },
    "sliding_expiration": {
      "custom_activity_types": [
        "<string>"
      ],
      "period": {
        "value": 123
      },
      "earning_activity": true,
      "spending_activity": true,
      "custom_activity": true
    }
  },
  "pending_points": {
    "period_based": {
      "period": {
        "value": 123
      }
    },
    "fixed_dates": {
      "dates": [
        {
          "day": 16,
          "month": 6
        }
      ]
    },
    "event_based": {
      "event_types": [
        "<string>"
      ],
      "cancel_period": {
        "value": 123
      }
    }
  },
  "earning_limits": {
    "global": {
      "limits": [
        {
          "type": "<string>",
          "max": 123
        }
      ]
    },
    "transactions": {
      "limits": [
        {
          "type": "<string>",
          "max": 123
        }
      ]
    }
  },
  "spending_limits": {
    "global": {
      "limits": [
        {
          "type": "<string>",
          "max": 123
        }
      ]
    },
    "transactions": {
      "limits": [
        {
          "type": "<string>",
          "max": 123
        }
      ]
    }
  },
  "refunds": {
    "spent_points": {
      "methods": [
        {
          "type": "<string>"
        }
      ]
    },
    "earned_points": {
      "methods": [
        {
          "type": "<string>"
        }
      ]
    }
  },
  "balance_settings": {
    "allow_negative": true
  },
  "pay_with_points": {
    "exchange_ratio": {
      "formula": "<string>"
    }
  },
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "object": "<string>"
}
{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}
{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}
{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}
{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

X-App-Id
string
header
required
X-App-Token
string
header
required

Path Parameters

id
string
required

Unique card definition ID. Pattern: ^lcdef_[a-f0-9]+$.

Pattern: ^lcdef_[a-f0-9]+$

Response

The drafted card definition.

A card definition.

id
string
required

Unique card definition ID.

Pattern: ^lcdef_[a-f0-9]+$
name
string
required

Card definition name.

type
enum<string>
required

Card definition type.

Available options:
INDIVIDUAL
status
enum<string>
required

Current card definition status.

Available options:
DRAFT,
ACTIVE,
DELETED
code_config
object
required

Card code generation configuration. Always present with server-side defaults applied.

points_expiration
object
required

Points expiration policy. Always present; defaults to NO_EXPIRATION.

pending_points
object
required

Pending points activation policy. Always present; defaults to IMMEDIATE.

earning_limits
object
required

Points earning limits. Always present; defaults to NO_LIMIT for both scopes.

spending_limits
object
required

Points spending limits. Always present; defaults to NO_LIMIT for both scopes.

refunds
object
required

Refund handling configuration. Always present; defaults to NONE for both scopes.

balance_settings
object
required

Card balance settings. Always present; defaults to allow_negative: false.

pay_with_points
object
required

Pay-with-points configuration. Always present; defaults to NO_PAYMENTS.

metadata
object
required

Arbitrary key-value metadata. Empty object when not set.

created_at
string<date-time>
required

Creation timestamp (ISO 8601).

updated_at
string<date-time> | null
required

Last update timestamp (ISO 8601). Null when the card definition has never been updated.

object
string
required

Object type marker. Always card_definition.

Allowed value: "card_definition"
Last modified on July 9, 2026