Read, publish or delete listings
List, retrieve, publish, unpublish and delete activity items, classes, courts, catalogue items, tours, events and watches.
{BASE_URL}/activity/{items|classes|courts}{BASE_URL}/activity/{items|classes|courts}/:externalId{BASE_URL}/activity/{items|classes|courts}/:externalId/publish{BASE_URL}/activity/{items|classes|courts}/:externalIdEvery listing kind has the same five operations. For catalogue items the path is
/catalogue/:section/items, for tours /tours, for events /events and for watches /watches.
| Operation | Path | Scope |
|---|---|---|
| List | GET … (limit 1–200, offset) | REGISTRATION |
| Retrieve | GET …/:externalId | REGISTRATION |
| Publish | POST …/:externalId/publish | UPDATE |
| Unpublish | POST …/:externalId/unpublish | UPDATE |
| Delete | DELETE …/:externalId | UPDATE |
Each listing has the shape its PUT returns. Lists hold what you created through the API, oldest
first — all of it for your own key, only its own for a Technology Provider. A catalogue list holds
only its section's items.
A sandbox key's publish, unpublish and delete change nothing and answer "dryRun": true.
Listings with bookings
DELETE /activity/items/:externalId, DELETE /tours/:externalId and DELETE /events/:externalId
answer 409 listing_has_bookings while the item, tour or event has bookings, orders or registrations, because deleting it would delete them. Unpublish it instead.
Classes, courts and catalogue items delete normally; their bookings stay. A watch has no bookings and always deletes.
Publishing a tour or event that is not complete answers 409 tour_not_ready or 409 event_not_ready
with details.blockers.
Status codes#
| Status | Code | When |
|---|---|---|
200 | — | Done, or "dryRun": true for a sandbox key on a publish, unpublish or delete. |
400 | limit_invalid, offset_invalid | limit is not a whole number from 1 to 200, or offset is not a whole number from 0. |
400 | externalId_invalid | The externalId is not 1–128 letters, digits or . _ ~ : -. |
403 | provider_module_not_allowed | A Technology Provider without the module for this kind of listing. |
404 | resource_not_found | No listing with that externalId that you manage. |
404 | section_not_found | A catalogue path names a section other than wellness-services, wellness-packages, stay or pets. |
409 | listing_has_bookings | Deleting an activity item, tour or event that has bookings, orders or registrations. Unpublish it. |
409 | tour_not_ready, event_not_ready | Publishing a tour or event that is not complete. details.blockers lists what is missing. |
409 | payment_options_required | Publishing an event that takes manual payment and has no receiving account. Add one in the Partner Portal. |
curl "$LOCALOY_BASE_URL/activity/courts?limit=100" \
-H "Authorization: Bearer $LOCALOY_API_KEY"curl -X POST "$LOCALOY_BASE_URL/catalogue/stay/items/deluxe-room/publish" \
-H "Authorization: Bearer $LOCALOY_API_KEY"{
"success": false,
"message": "This activity item has 3 bookings; deleting it would delete them too. Unpublish it instead.",
"code": "listing_has_bookings",
"details": { "bookings": 3 }
}