Skip to main content

Common API errors

The full list of codes is in the error reference. Here are the cases that come up most, and how to fix them.

Every error has the same shape: a readable message (in the language of the x-lang header), an errorCode formatted STATUS:CODE (e.g. 404:MODEL_NOT_FOUND), the path called and the date.

Number one: JSON sent to a multipart endpoint​

Creates and updates that accept an image expect multipart/form-data:

EndpointContent-Type
POST/coupons, POST/events, POST/transits, POST/hotelsmultipart/form-data
PATCH/store-cards, PATCH/wallets, PATCH/clients/{id}/specificmultipart/form-data
POST/communications, POST/csv-operations/import-csvmultipart/form-data
Customers, passes, notifications, tripsapplication/json

Related errors: INVALID_MULTIPART (missing or malformed boundary), UNSUPPORTED_MEDIA_TYPE (415), FILE_REQUIRED (required image missing).

Three multipart rules:

  1. Let the tool write the header. With curl -F or a JavaScript FormData, the Content-Type and its boundary are added for you. A hand-written header without a boundary breaks the request.
  2. Nested objects as JSON strings. colors, security, locations, displayOptions, iosHeader, date: one form field holding JSON.
  3. Booleans as text: "true" / "false". Images PNG or JPEG, 1 KB to 5 MB.
POST/couponsTry it
curl -L 'https://api-v2.test.eldowallet.fr/coupons' \
-H 'Accept: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>' \
-F 'strip=@"strip.png"' \
-F 'name="Welcome"' \
-F 'description="10% off your next purchase"' \
-F 'barcodeFormat="QR_CODE"' \
-F 'isWelcomeCoupon="true"' \
-F 'colors="{\"backgroundColor\":\"\#59358B\",\"foregroundColor\":\"\#FFFFFF\",\"labelColor\":\"\#F2FBCE\"}"'

401: not authenticated​

403: forbidden​

You are authenticated, but the resource is not yours (template or customer from another wallet), or your role is not enough: FORBIDDEN. A customer from another wallet returns CLIENT_DOES_NOT_BELONG_TO_THIS_WALLET.

404: not found​

  • MODEL_NOT_FOUND: unknown id. Ids are ObjectIds: 24 hexadecimal characters.
  • PATH_NOT_FOUND: unknown URL. Check the base URL (https://api-v2.test.eldowallet.fr in test, see Environments) and the path.
  • PASS_NOT_FOUND: the scanned barcode matches no pass on that template.
  • STORECARD_NOT_FOUND: the wallet’s loyalty card is not configured yet (PATCH/store-cards).

409: conflict​

  • EMAIL_ALREADY_EXISTS, CLIENT_ALREADY_EXISTS: this customer already exists in the wallet. Update instead of recreating.
  • BARCODE_ALREADY_EXISTS: this barcode is already taken.
  • OVERLAPPING_DATES: the hotel room is already booked on those dates.
  • PUSH_NOTIFICATION_SCHEDULE_CONFLICT: a notification is already scheduled too close to that time.
  • STORE_CARD_ALREADY_EXISTS: a wallet has only one loyalty card. Edit it with PATCH/store-cards.

400: bad request​

5xx: server or external service error​

  • 500 (UNKNOWN_ERROR): retry. If it persists, contact support with the path, the date and the body sent.
  • 502: the SMS provider failed (SMS_SEND_FAILED…). Try again later.
  • 503 (PASS_BUILDER_ERROR): the pass generation service is down. Try again later.

Go further​

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