Errors
HTTP status codes, the error envelope, and every error code the Open Network API returns.
The API uses standard HTTP status codes. When a request fails, the body has success: false, a
message for people and, for most failures, a machine-readable code.
{
"success": false,
"message": "This session quoted 90000 (minor units, BDT); you reported 9000. The order has NOT been marked paid.",
"code": "payment_amount_mismatch",
"details": { "expectedAmountMinor": 90000, "reportedAmountMinor": 9000 },
"requestId": "3f0c9f8e-6a1d-4f5e-9b1a-2f1c0d9e7a41"
}Status codes#
| Status | Meaning |
|---|---|
200 | Success. |
201 | A listing, a catalogue item or an imported image was created. A sandbox key's writes create nothing and answer 200 with "dryRun": true. |
400 | The request is invalid — a missing or malformed field, or malformed JSON. |
401 | The API key is missing, malformed, unknown, revoked or expired. |
403 | The key is valid but lacks the scope the endpoint needs, or your Localoy account is not active. |
404 | The resource does not exist, or it is not yours. |
409 | The request conflicts with the resource's current state. |
413 | The request body is larger than 1 MB, or an image you asked Localoy to import is larger than 10 MB. |
415 | An imported image is not a supported type. |
422 | Localoy could not download an image you named. |
429 | Too many requests. See Rate limits. |
500 | An unexpected error on Localoy's side. Retry with backoff. |
503 | A dependency is unavailable (returned by GET /health). |
Not yours looks like not found
A request for another partner's resource answers exactly like one for a resource that does not exist. The API never confirms that an ID belongs to someone else.
Error codes#
Authentication#
| Code | Status | Meaning |
|---|---|---|
open_network_key_invalid | 401 | The key is missing, malformed, unknown, has the wrong secret, is revoked or has expired. |
open_network_scope_required | 403 | The key lacks the endpoint's scope. details.requiredScope and details.grantedScopes say which. |
partner_account_inactive | 403 | Your Localoy account is not active, so its keys are paused — not revoked. details.accountStatus says which state it is in. They work again once Localoy approves the account. |
Business profile and images#
| Code | Status | Meaning |
|---|---|---|
field_read_only | 400 | PATCH /profile named name, email, phone, logoUrl or coverImageUrl. Change those in the Partner Portal. |
media_url_invalid | 400 | POST /media: the URL is not https, points at a private address, does not resolve, carries credentials or uses a blocked port. |
media_too_large | 413 | The image is larger than 10 MB. |
media_type_not_supported | 415 | The file is not a JPEG, PNG, WebP, GIF or AVIF image. |
media_fetch_failed | 422 | Your image server answered an error or nothing, redirected more than 3 times, or took longer than 10 seconds. |
Listings#
A listing or profile field that is missing or wrong answers 400 with a code named after the field and
details.field naming it:
| Code pattern | Meaning |
|---|---|
<field>_required | A required field is missing or empty — for example name_required, dates_required. |
<field>_invalid | A field has the wrong type, format or value — for example price_invalid, locationIds_invalid, tickets.tiers_invalid. |
<field>_too_long | A text field is longer than its limit. |
<field>_too_many | A list holds more entries than its limit — for example tags_too_many. |
<field>_duplicate | A list holds the same entry twice. |
Nested fields keep their path: a ticket tier's missing externalId is
tickets.tiers.externalId_required. Each endpoint's page lists its own rules and the codes that are not
named after a field.
| Code | Status | Meaning |
|---|---|---|
body_invalid | 400 | The body is not a JSON object. |
unknown_field | 400 | The body holds a field the endpoint does not accept. details.field names it. |
invalid_field | 400 | A field broke a rule that has no code of its own. message says which rule, details.field which field when it is known. |
empty_patch | 400 | PATCH /profile was sent with no fields. |
limit_invalid / offset_invalid | 400 | A list's limit is not a whole number from 1 to 200, or offset is not a whole number from 0. |
image_not_imported | 400 | A listing's image is not a URL from POST /media. |
externalId_invalid | 400 | The externalId in the path is not 1–128 letters, digits or . _ ~ : -. |
location_not_found | 400 | A locationIds entry is not one of your locations. |
resource_not_found | 404 | No listing with that externalId that you manage. |
dining_not_set_up / store_not_set_up | 409 | Set up your dining listing or store in the Partner Portal first. |
resource_busy | 409 | Another request is creating this externalId right now. Retry in a moment. |
resource_managed_elsewhere | 409 | A Technology Provider wrote an externalId another integration of the partner holds. |
provider_module_not_allowed | 403 | A Technology Provider without the module for this kind of listing. |
activity_not_set_up | 409 | Set up your activity listing in the Partner Portal first. |
too_many_classes / too_many_courts | 409 | You already have the most classes or courts an activity can hold. |
listing_has_bookings | 409 | An activity item, tour or event with bookings, orders or registrations cannot be deleted — that would delete them. Unpublish it. |
section_not_found | 404 | A catalogue path names a section other than wellness-services, wellness-packages, stay or pets. |
externalId_in_another_section | 409 | The externalId is already a catalogue item in another section. |
service_not_found | 400 | A wellness package names a service you have not created through the API. |
tour_not_ready | 409 | A tour is not complete enough to publish. details.blockers lists what is missing. |
package_has_bookings | 409 | A tour PUT left out a package that has bookings. |
event_not_ready | 409 | An event needs a venue, a date and a ticket tier (or RSVP set up in the portal) before it is published. details.blockers lists what is missing. |
payment_options_required | 409 | The event takes manual payment and has no receiving account; add one in the Partner Portal. |
Catalogue#
| Code | Status | Meaning |
|---|---|---|
open_network_item_not_found | 404 | No catalogue item of yours has that externalId. |
open_network_bookable_not_found | 404 | localoyRef points at an ID that is not one of your bookables. |
open_network_bookable_already_linked | 409 | Another of your items is already linked to that bookable. details.externalId names it. Unlink it first. |
external_id_immutable | 400 | A PATCH tried to change externalId. Delete the item and create it under the new ID. |
Payments#
| Code | Status | Meaning |
|---|---|---|
payment_session_not_found | 404 | No session of yours, in this key's environment, has that ID. |
payment_unreportable_status | 400 | status is not one of SUCCEEDED, FAILED, CANCELLED, PROCESSING. |
payment_amount_required | 400 | A SUCCEEDED result was sent without amountMinor. |
payment_invalid_transition | 409 | The session cannot move from its current status to the one reported. details.from and details.to say which. |
payment_amount_mismatch | 409 | The amount you charged differs from the session's. The order was not marked paid. |
payment_currency_mismatch | 409 | The currency differs from the session's. The order was not marked paid. |
payment_subject_not_chargeable | 409 | The order was already paid or refunded outside this session. details.paymentStatus says how. |
payment_session_conflict | 409 | Another request changed the session at the same moment. Read it back, then decide whether to retry. |
Catalogue and payment validation errors#
On the catalogue and payment endpoints,
invalid input on a single field is answered 400 with a message that names the field and the rule,
and no code — for example:
{
"success": false,
"message": "priceCents must be between 0 and 2147483647",
"requestId": "…"
}These are bugs in the calling code, not conditions to handle at run time. Log the message and fix the
request. The same applies to Malformed JSON body (400) and Request body is too large (413).
Handling errors#
| Status | Retry? |
|---|---|
400, 401, 403, 404 | No. Fix the request, the key or the ID first. |
409 | Not as is. Read the resource's current state, then decide. |
429 | Yes, after the Retry-After header's number of seconds. |
500, 503, network errors | Yes, with exponential backoff. For payment writes, send the same Idempotency-Key; see Idempotency. |