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.

Error envelope
{
  "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#

StatusMeaning
200Success.
201A listing, a catalogue item or an imported image was created. A sandbox key's writes create nothing and answer 200 with "dryRun": true.
400The request is invalid — a missing or malformed field, or malformed JSON.
401The API key is missing, malformed, unknown, revoked or expired.
403The key is valid but lacks the scope the endpoint needs, or your Localoy account is not active.
404The resource does not exist, or it is not yours.
409The request conflicts with the resource's current state.
413The request body is larger than 1 MB, or an image you asked Localoy to import is larger than 10 MB.
415An imported image is not a supported type.
422Localoy could not download an image you named.
429Too many requests. See Rate limits.
500An unexpected error on Localoy's side. Retry with backoff.
503A 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#

CodeStatusMeaning
open_network_key_invalid401The key is missing, malformed, unknown, has the wrong secret, is revoked or has expired.
open_network_scope_required403The key lacks the endpoint's scope. details.requiredScope and details.grantedScopes say which.
partner_account_inactive403Your 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#

CodeStatusMeaning
field_read_only400PATCH /profile named name, email, phone, logoUrl or coverImageUrl. Change those in the Partner Portal.
media_url_invalid400POST /media: the URL is not https, points at a private address, does not resolve, carries credentials or uses a blocked port.
media_too_large413The image is larger than 10 MB.
media_type_not_supported415The file is not a JPEG, PNG, WebP, GIF or AVIF image.
media_fetch_failed422Your 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 patternMeaning
<field>_requiredA required field is missing or empty — for example name_required, dates_required.
<field>_invalidA field has the wrong type, format or value — for example price_invalid, locationIds_invalid, tickets.tiers_invalid.
<field>_too_longA text field is longer than its limit.
<field>_too_manyA list holds more entries than its limit — for example tags_too_many.
<field>_duplicateA 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.

CodeStatusMeaning
body_invalid400The body is not a JSON object.
unknown_field400The body holds a field the endpoint does not accept. details.field names it.
invalid_field400A field broke a rule that has no code of its own. message says which rule, details.field which field when it is known.
empty_patch400PATCH /profile was sent with no fields.
limit_invalid / offset_invalid400A list's limit is not a whole number from 1 to 200, or offset is not a whole number from 0.
image_not_imported400A listing's image is not a URL from POST /media.
externalId_invalid400The externalId in the path is not 1–128 letters, digits or . _ ~ : -.
location_not_found400A locationIds entry is not one of your locations.
resource_not_found404No listing with that externalId that you manage.
dining_not_set_up / store_not_set_up409Set up your dining listing or store in the Partner Portal first.
resource_busy409Another request is creating this externalId right now. Retry in a moment.
resource_managed_elsewhere409A Technology Provider wrote an externalId another integration of the partner holds.
provider_module_not_allowed403A Technology Provider without the module for this kind of listing.
activity_not_set_up409Set up your activity listing in the Partner Portal first.
too_many_classes / too_many_courts409You already have the most classes or courts an activity can hold.
listing_has_bookings409An activity item, tour or event with bookings, orders or registrations cannot be deleted — that would delete them. Unpublish it.
section_not_found404A catalogue path names a section other than wellness-services, wellness-packages, stay or pets.
externalId_in_another_section409The externalId is already a catalogue item in another section.
service_not_found400A wellness package names a service you have not created through the API.
tour_not_ready409A tour is not complete enough to publish. details.blockers lists what is missing.
package_has_bookings409A tour PUT left out a package that has bookings.
event_not_ready409An 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_required409The event takes manual payment and has no receiving account; add one in the Partner Portal.

Catalogue#

CodeStatusMeaning
open_network_item_not_found404No catalogue item of yours has that externalId.
open_network_bookable_not_found404localoyRef points at an ID that is not one of your bookables.
open_network_bookable_already_linked409Another of your items is already linked to that bookable. details.externalId names it. Unlink it first.
external_id_immutable400A PATCH tried to change externalId. Delete the item and create it under the new ID.

Payments#

CodeStatusMeaning
payment_session_not_found404No session of yours, in this key's environment, has that ID.
payment_unreportable_status400status is not one of SUCCEEDED, FAILED, CANCELLED, PROCESSING.
payment_amount_required400A SUCCEEDED result was sent without amountMinor.
payment_invalid_transition409The session cannot move from its current status to the one reported. details.from and details.to say which.
payment_amount_mismatch409The amount you charged differs from the session's. The order was not marked paid.
payment_currency_mismatch409The currency differs from the session's. The order was not marked paid.
payment_subject_not_chargeable409The order was already paid or refunded outside this session. details.paymentStatus says how.
payment_session_conflict409Another 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:

Response · 400
{
  "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#

StatusRetry?
400, 401, 403, 404No. Fix the request, the key or the ID first.
409Not as is. Read the resource's current state, then decide.
429Yes, after the Retry-After header's number of seconds.
500, 503, network errorsYes, with exponential backoff. For payment writes, send the same Idempotency-Key; see Idempotency.