v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Operation for POST /v3/promotions/enrol

Endpoint for POST /v3/promotions/enrol

post/v3/promotions/enrol

Headers

X-CAP-API-ATTRIBUTION-TILL-CODEstring

Specifies the till code to attribute the enrolment or opt-in to, when authenticating via OAuth. This is the header that determines the attributed till — if X-CAP-API-AUTH-ENTITY-ID is also sent, this value still takes priority. If omitted, attribution falls back to the till mapped to your OAuth credentials.

X-CAP-API-AUTH-ENTITY-IDinteger

Use this header if your integration identifies tills by their numeric ID rather than their code. Must be sent together with X-CAP-API-ATTRIBUTION-TILL-CODE — the platform validates the till ID, but the till actually attributed is always the one specified in X-CAP-API-ATTRIBUTION-TILL-CODE. If you already know the till code, send it directly and omit this header.

Request body

requestIdstring
actionstring
programIdinteger

Example request

{
  "requestId": "some-test-id",
  "action": "ENROL",
  "promotion": {
    "id": "68c3f64bbd0a8a0aa705c793",
    "promotionId": 1133590053
  },
  "customer": {
    "identifierName": "id",
    "source": "INSTORE"
  },
  "programId": 3334
}

Response

OK