v2
latestOpenAPI 3.1.02026-08-01244220427.0 KBGift Card Merchants
Savemerchantsettings
Save Per-Location Merchant Settings
Saves the programId for a specific merchant location. Merchant identity is resolved from the validated X-Eposn-Merchant-Token session, so ownership is checked by confirming the programme belongs to that user.
Validation steps:
- Parse and look up the programId — must exist in the Programme collection.
- Confirm the programme type is GIFT_CARD.
- Confirm the programme's userId matches the authenticated user.
- Upsert the programId onto the target location of the matching GiftCardMerchant document (matched by merchantId == str(user.id)).
Status Codes:
- 200: Settings saved successfully
- 400: programId is invalid or wrong type
- 401: Not authenticated
- 403: Programme does not belong to this user
- 404: Programme or merchant not found
put/v2/giftcards/merchants/settings
Headers
X-Eposn-Merchant-Tokenstring nullable
Request body
Response
Successful Response
Example response
{
"merchantId": "5eb7cf5a86d9755df3a6c593"
}