Skip to main content

Send coupons

POST

https://api-v2.test.eldowallet.fr/coupons/:id/passes/send

Sends a coupon to existing clients or to recipients who are not clients. With clientId, the client's store card data is used; without clientId, firstName, lastName and email are required. Accepts multipart/form-data to override the strip image. webhookUrl and forceSync are optional. Returns a bulk operation: track its status and results with GET /bulk-operations/{operationId}.

Good to know
  • Body is multipart/form-data: nested objects (colors, security, locations…) are sent as a JSON string, booleans as "true"/"false". Images: PNG or JPEG, 1 KB to 5 MB.
  • clients[].firstName is required when clientId is missing or false.
  • clients[].lastName is required when clientId is missing or false.
  • clients[].email is required when clientId is missing or false.
  • Send a coupon to existing clients ({clientId}) or to non-clients ({firstName,lastName,email}); per-recipient overrides: barcode, promoCode, description, value, expirationDate. An empty clients array means all wallet clients. Runs as a bulk operation (webhookUrl, forceSync). acceptPartialDelivery covers the case of insufficient credit on some channels (409:INSUFFICIENT_CREDIT_PARTIAL). Accepts application/json or multipart (when overrideStripImage is a file; it may also be a URL string).

Request​

path parameters
  • id string required
    ID of the coupon template to send.
header parameters
  • x-lang string
    Language for responses
    enum: en, frdefault: "en"
Body application/json required
  • webhookUrl string
    Webhook URL to receive notification when bulk operation completes. Auth headers: append #headers=Authorization:Bearer%20token
    example: https://example.com/webhook#headers=Authorization:Bearer%20token
  • forceSync boolean
    Execute synchronously (max 1000 items). If true and items >= 1000, request is rejected.
    default: false
  • overrideStripImage string <binary>
    Optional strip image override. In form-data: upload image file (PNG/JPEG). In application/json: provide image URL.
  • clients object[] required
    • clientId string
    • firstName string
    • lastName string
    • email string <email>
    • phoneNumber string
    • barcode string
    • promoCode string
    • description string
    • value string
    • expirationDate string <date-time>
Body multipart/form-data required
  • webhookUrl string
    Webhook URL to receive notification when bulk operation completes. Auth headers: append #headers=Authorization:Bearer%20token
    example: https://example.com/webhook#headers=Authorization:Bearer%20token
  • forceSync boolean
    Execute synchronously (max 1000 items). If true and items >= 1000, request is rejected.
    default: false
  • overrideStripImage string <binary>
    Optional strip image override. In form-data: upload image file (PNG/JPEG). In application/json: provide image URL.
  • clients object[] required
    • clientId string
    • firstName string
    • lastName string
    • email string <email>
    • phoneNumber string
    • barcode string
    • promoCode string
    • description string
    • value string
    • expirationDate string <date-time>

Responses​

Schema application/json
  • operationId string required
    Unique identifier for the bulk operation
    example: 507f1f77bcf86cd799439011
  • totalItems number required
    Total number of items in the operation
    example: 100
  • successCount number required
    Number of successfully processed items
    example: 95
  • failureCount number required
    Number of failed items
    example: 5
  • status string required
    Current status of the operation
    enum: pending, processing, completed, failedexample: pending
    • operationErrors object[]
      Array of errors for failed items
      • itemId string required
        ID of the item that failed
        example: 507f1f77bcf86cd799439011
      • message string required
        Error message
        example: Client not found
      • code string
        Error code if available
        example: 404:MODEL_NOT_FOUND
    • results object[]
      Array of results for successful items
      • itemId string required
        ID of the item
        example: 507f1f77bcf86cd799439011
      • result object
        Result data
    • createdAt string <date-time> required
      Timestamp when the operation was created
      example: 2024-01-01T00:00:00.000Z
    • completedAt string <date-time>
      Timestamp when the operation was completed
      example: 2024-01-01T00:05:00.000Z

    API news, once a month

    New endpoints, upcoming changes, guides and use cases. No spam, one-click unsubscribe.

    Report a technical problem

    An API error, a pass that does not update, an email that does not arrive? Describe the problem: our technical team will answer.

    For a fast answer, include:

    • The method and endpoint (e.g. POST /clients)
    • The error code returned (errorCode) and the body sent
    • The date and time of the call
    • The identifiers involved (customer, template, pass)

    Never include an API token or a password.

    AI assistant

    Beta

    Loading…

    AI-generated answers (Claude): double-check important details.

    Sign in to use the assistant