Gift Cards
Gift card issuance, balance, and redemption
Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Query Parameters
Filter by location ID
Include authorized descendants of location_id.
falseOptional comma-separated subset of the resolved location hierarchy.
^[0-9]+(,[0-9]+)*$length <= 11000Filter by status
Value in
- "active"
- "redeemed"
- "expired"
- "frozen"
- "cancelled"
Exact code match (case-insensitive)
Filter by loyalty member ID
1 <= value11 <= value <= 100050"created_at"Value in
- "created_at"
- "valid_end_date"
- "balance_cents"
- "status"
- "code"
"DESC"Value in
- "ASC"
- "DESC"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/gift-cards"{ "status": "success", "data": { "giftCards": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" } ], "pagination": { "page": 0, "limit": 0, "total": 0, "totalPages": 0 } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Location ID
1 <= valueLegacy field; ignored. The issuing location determines card ownership.
1 <= valueGift card code (cryptographically generated if not provided)
1 <= length <= 50Initial balance in cents
1 <= value <= 2147483647Currency code
"SEK"Swedish VAT classification (defaults to location setting)
Value in
- "enfunktion"
- "flerfunktion"
Start of validity (YYYY-MM-DD; defaults to now)
dateEnd of validity (YYYY-MM-DD; computed from location defaults if not set)
dateGift card design template ID
uuidLoyalty member ID
email5 <= length <= 32emailpurchase_line_items.id for idempotency when generating gift cards from purchases
Send the e-card email to recipientEmail (backoffice flows). POS purchase flow sends automatically via sourcePurchaseLineItemId.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards" \ -H "Content-Type: application/json" \ -d '{ "locationId": 1, "initialBalanceCents": 1 }'{ "status": "success", "data": { "giftCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "transaction": { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Gift card UUID
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "status": "success", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string", "transactions": [ { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } ] }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Gift card UUID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
^[A-Za-z0-9-]+$3 <= length <= 503 <= length <= 500uuidemail5 <= length <= 32emailValue in
- "en"
- "sv"
dateResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "status": "success", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Required audit reason
3 <= length <= 500Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "reason": "string" }'{ "status": "success", "data": { "giftCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "transaction": { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Gift card UUID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Amount to add in cents
1 <= value <= 2147483647Unique client reference for this adjustment
Required audit reason
3 <= length <= 500Reject the operation if the balance no longer matches this value
0 <= value <= 2147483647Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/add-balance" \ -H "Content-Type: application/json" \ -d '{ "amountCents": 1, "reason": "string" }'{ "status": "success", "data": { "giftCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "transaction": { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
uuidQuery Parameters
1 <= value11 <= value <= 10050Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/audit"{ "status": "string", "data": { "events": [ { "id": "string", "giftCardId": "string", "action": "string", "changes": {}, "actorType": "string", "actorId": "string", "actor": { "name": "string", "email": "string", "imageUrl": "string" }, "requestId": "string", "reason": "string", "createdAt": "2019-08-24T14:15:22Z" } ], "pagination": { "page": 0, "limit": 0, "total": 0 } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Gift card UUID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Amount to deduct in cents
1 <= value <= 2147483647Unique client reference for this adjustment
Required audit reason
3 <= length <= 500Reject the operation if the balance no longer matches this value
0 <= value <= 2147483647Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/deduct" \ -H "Content-Type: application/json" \ -d '{ "amountCents": 1, "reason": "string" }'{ "status": "success", "data": { "giftCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "transaction": { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Required audit reason
3 <= length <= 500Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/freeze" \ -H "Content-Type: application/json" \ -d '{ "reason": "string" }'{ "status": "success", "data": { "giftCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "transaction": { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Gift card UUID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
User ID of the loyalty member
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/link-loyalty" \ -H "Content-Type: application/json" \ -d '{ "userId": 0 }'{ "status": "success", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Gift card UUID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
User ID of the loyalty member to unlink
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/link-loyalty" \ -H "Content-Type: application/json" \ -d '{ "userId": 0 }'{ "status": "success", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/resend-email"{ "status": "string", "data": { "queued": true }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Gift card UUID
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/transactions"{ "status": "success", "data": { "transactions": [ { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } ] }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Required audit reason
3 <= length <= 500Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/497f6eca-6276-4993-bfeb-53cbbbba6f08/unfreeze" \ -H "Content-Type: application/json" \ -d '{ "reason": "string" }'{ "status": "success", "data": { "giftCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "transaction": { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Query Parameters
Gift card code (case-insensitive)
1 <= valueResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/gift-cards/by-code?code=string"{ "status": "success", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Gift card code
1 <= length <= 501 <= valueResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/lookup" \ -H "Content-Type: application/json" \ -d '{ "code": "string" }'{ "status": "success", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string", "transactions": [ { "id": 0, "giftCardId": "9c83b4f5-280c-4968-8797-b9fdb3bd911c", "type": "create", "amountCents": 0, "balanceAfterCents": 0, "referenceType": "string", "referenceId": "string", "notes": "string", "actorType": "string", "actorId": "string", "createdAt": "2019-08-24T14:15:22Z" } ] }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= length <= 501 <= valueResponse Body
curl -X POST "https://example.com/api/v1/gift-cards/redeemable-issuers" \ -H "Content-Type: application/json" \ -d '{ "code": "string", "locationId": 1 }'Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Query Parameters
Overrides the X-Location-Id header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/gift-cards/settings"{ "status": "success", "data": { "locationId": 0, "voucherClassification": "enfunktion", "giftCardDefaultValidityDays": 0, "giftCardLiabilityAccount": "string", "giftCardDeliveryFeeAccount": "string", "giftCardPhysicalFeeAccount": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Overrides the X-Location-Id header
Value in
- "enfunktion"
- "flerfunktion"
1 <= value <= 7300^[1-9][0-9]{3}$^[1-9][0-9]{3}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/gift-cards/settings" \ -H "Content-Type: application/json" \ -d '{}'{ "status": "success", "data": { "locationId": 0, "voucherClassification": "enfunktion", "giftCardDefaultValidityDays": 0, "giftCardLiabilityAccount": "string", "giftCardDeliveryFeeAccount": "string", "giftCardPhysicalFeeAccount": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Query Parameters
Location ID; defaults to X-Location-Id
Include authorized descendants of location_id.
falseOptional comma-separated subset of the resolved location hierarchy.
^[0-9]+(,[0-9]+)*$length <= 11000Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/gift-cards/stats"{ "status": "success", "data": { "totalLiabilityCents": 0, "totalCards": 0, "activeCards": 0, "fullyRedeemedCards": 0, "expiredCards": 0, "totalIssuedCents": 0, "totalRedeemedCents": 0, "totalRefilledCents": 0, "totalExpiredCents": 0, "avgBalanceCents": 0, "avgInitialValueCents": 0, "redemptionRate": 0, "expiredRate": 0, "expiring": { "days30": { "count": 0, "valueCents": 0 }, "days90": { "count": 0, "valueCents": 0 }, "days365": { "count": 0, "valueCents": 0 } }, "last30Days": { "cardsCreated": 0, "cardsRedeemed": 0, "issuedCents": 0, "redeemedCents": 0 }, "monthlyFlow": [ { "month": "string", "issuedCents": 0, "redeemedCents": 0, "expiredCents": 0 } ] }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Gift card code
Location ID for context
1 <= valueResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gift-cards/validate" \ -H "Content-Type: application/json" \ -d '{ "code": "string", "locationId": 0 }'{ "status": "success", "data": { "valid": true, "reason": "string", "giftCard": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "locationId": 0, "companyId": 0, "code": "string", "status": "active", "balanceCents": 0, "initialBalanceCents": 0, "currency": "string", "voucherClassification": "enfunktion", "validStartDate": "2019-08-24T14:15:22Z", "validEndDate": "2019-08-24T14:15:22Z", "designId": "033e957b-7b88-4dd7-902f-29ec7b58670b", "loyaltyMemberId": 0, "recipientName": "string", "recipientEmail": "string", "recipientPhone": "string", "senderName": "string", "senderEmail": "string", "purchaserUserId": 0, "recipientAddress": { "property1": "string", "property2": "string" }, "emailLanguage": "string", "personalMessage": "string", "sourcePurchaseLineItemId": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "isInherited": true, "issuingLocationName": "string" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}