Initmerchantsession
Init or Refresh Merchant Session
Called by eposn-giftcards immediately after resolving a valid platform token.
Looks up the merchant by (merchantId, platform). If a record exists the
info is updated; if not, a new GiftCardMerchant document is created.
Locations are stored as embedded sub-documents. If locationId is provided,
the matching location is upserted within the merchant document.
programId is stored per location — if supplied it will update only the
active location’s programId, not a merchant-level field.
Returns:
- Full merchant context including the active location’s
programIdso callers can build a session without an additional API round-trip.
Status Codes:
- 200: Merchant record created or updated successfully
- 401: HMAC authentication failed
Authorizations
JWT access token obtained from POST /v2/token.
Body
Payload sent by eposn-giftcards after resolving a platform token.
Fields are intentionally generic so that EPOS Now, Shopify, and future platforms all use the same endpoint.
1 - 512Platform-specific merchant/company identifier
1 - 100Human-readable merchant/company name
255eposnow, shopify, clover, wordpress Platform-specific location identifier
100255Linked LoyaltyDog programme ID (per location)
100Optional LoyaltyDog User ID to link/onboard this merchant
100Role of the merchant
100Platform-specific cashier identifier
100Platform-specific terminal identifier
100Response
Successful Response
Returned after a successful merchant session init or validation.
Contains everything needed to populate the eposn-giftcards session without an additional core_api round-trip.
24^[0-9a-f]{24}$"5eb7cf5a86d9755df3a6c593"
