v2

latestOpenAPI 3.1.02026-08-01244220427.0 KB
Gift Card Merchants

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 programId so callers can build a session without an additional API round-trip.

Status Codes:

  • 200: Merchant record created or updated successfully
  • 401: HMAC authentication failed
post/v2/giftcards/merchants/session

Request body

appTokenstring required
merchantIdstring required

Platform-specific merchant/company identifier

namestring nullable

Human-readable merchant/company name

platform'eposnow' | 'shopify' | 'clover' | 'wordpress'
locationIdstring nullable

Platform-specific location identifier

locationNamestring nullable
programIdstring nullable

Linked LoyaltyDog programme ID (per location)

userIdstring nullable

Optional LoyaltyDog User ID to link/onboard this merchant

rolestring nullable

Role of the merchant

cashierIdstring nullable

Platform-specific cashier identifier

terminalIdstring nullable

Platform-specific terminal identifier

Response

Successful Response

idstring required
merchantIdstring required
namestring nullable required
platformstring required
programIdstring nullable required
activeboolean required
locationIdstring nullable required
locationNamestring nullable required
cashierIdstring nullable
terminalIdstring nullable
rolestring nullable
sessionTokenstring nullable

Example response

{
  "merchantId": "5eb7cf5a86d9755df3a6c593"
}