Read, publish or delete listings

List, retrieve, publish, unpublish and delete activity items, classes, courts, catalogue items, tours, events and watches.

GET{BASE_URL}/activity/{items|classes|courts}
GET{BASE_URL}/activity/{items|classes|courts}/:externalId
POST{BASE_URL}/activity/{items|classes|courts}/:externalId/publish
DELETE{BASE_URL}/activity/{items|classes|courts}/:externalId

Every 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.

OperationPathScope
ListGET … (limit 1–200, offset)REGISTRATION
RetrieveGET …/:externalIdREGISTRATION
PublishPOST …/:externalId/publishUPDATE
UnpublishPOST …/:externalId/unpublishUPDATE
DeleteDELETE …/:externalIdUPDATE

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#

StatusCodeWhen
200—Done, or "dryRun": true for a sandbox key on a publish, unpublish or delete.
400limit_invalid, offset_invalidlimit is not a whole number from 1 to 200, or offset is not a whole number from 0.
400externalId_invalidThe externalId is not 1–128 letters, digits or . _ ~ : -.
403provider_module_not_allowedA Technology Provider without the module for this kind of listing.
404resource_not_foundNo listing with that externalId that you manage.
404section_not_foundA catalogue path names a section other than wellness-services, wellness-packages, stay or pets.
409listing_has_bookingsDeleting an activity item, tour or event that has bookings, orders or registrations. Unpublish it.
409tour_not_ready, event_not_readyPublishing a tour or event that is not complete. details.blockers lists what is missing.
409payment_options_requiredPublishing an event that takes manual payment and has no receiving account. Add one in the Partner Portal.
cURL
curl "$LOCALOY_BASE_URL/activity/courts?limit=100" \
  -H "Authorization: Bearer $LOCALOY_API_KEY"
cURL
curl -X POST "$LOCALOY_BASE_URL/catalogue/stay/items/deluxe-room/publish" \
  -H "Authorization: Bearer $LOCALOY_API_KEY"
Response · 409
{
  "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 }
}