Skip to content

Gift cards (company wide)

Gift cards sold outside the online shop: company, value, expiry and status (active, cancelled, expired). The balance is the sum of gift_card_entries. The code is not returned on read: the loyalty.sell_gift_card command and the show_code action give it. Actions: show_code, document, send, set_text, new_code, cancel, extend.

Module: Fidelizare (loyalty).

  • GET /api/v1/gift_cards - List with filters, sorting and pagination (scope loyalty:read)
  • GET /api/v1/gift_cards/{id} - A record by id (scope loyalty:read)
  • POST /api/v1/gift_cards/{id}/show_code - Codul unui card activ. Deschiderea se notează pe card (access_log). (scope loyalty:write)
  • POST /api/v1/gift_cards/{id}/document - PDF-ul cardului, în base64. recipient_name și message, dacă vin, rămân pe card. (scope loyalty:write)
  • POST /api/v1/gift_cards/{id}/send - Trimite cardul pe email, cu PDF-ul atașat, prin SMTP-ul companiei. (scope loyalty:write)
  • POST /api/v1/gift_cards/{id}/set_text - Schimbă numele și mesajul de pe card. (scope loyalty:write)
  • POST /api/v1/gift_cards/{id}/new_code - Cod nou, pentru când codul a ajuns la altcineva: cel vechi nu mai merge. (scope loyalty:write)
  • POST /api/v1/gift_cards/{id}/cancel - Închide cardul: soldul rămas iese, cu motiv și cu felul restituirii. (scope loyalty:write)
  • POST /api/v1/gift_cards/{id}/extend - Schimbă termenul unui card activ. (scope loyalty:write)
  • id (string, uuid; read): Unique identifier (UUID).
  • legal_entity_id (string, uuid; read)
  • code_last4 (string; read)
  • currency (string; read): Currency (ISO code, e.g. RON).
  • initial_value (number; read)
  • status (string; read)
  • expires_on (string, date; read)
  • buyer_party_id (string, uuid; read)
  • recipient_name (string; read)
  • note (string; read)
  • sale_method (string; read)
  • sale_reference (string; read)
  • location_id (string, uuid; read)
  • idempotency_key (string; read)
  • sold_by_name (string; read)
  • created_by (string; read)
  • created_at (string, date-time; read): Creation date (ISO 8601).
  • updated_at (string, date-time; read): Last modification date (ISO 8601).
  • gift_message (string; read)
  • access_log (object; read)
  • gift_cards.created
  • gift_cards.updated
  • gift_cards.deleted