Changelog
What changed in the WeerOm API, newest first.
v1, webhooks
WeerOm posts a signed JSON message to the shop's addresses when a booking or a payment changes. Nothing in the API changed.
- Four events:
booking.created,booking.updated,booking.cancelledandpayment.completed. - The shop adds up to 5 addresses in its admin, under Settings, Features, Connections, and picks the events for each.
- Each address has its own secret,
whsec_and 64 hex characters. Every message carriesWeerOm-Signature: t=...,v1=..., an HMAC-SHA256 of the time and the body. data.objectis the booking or the payment asGET /bookings/{id}orGET /payments/{id}answers it.- 7 attempts over about 33 hours. An address that fails for 3 days is switched off.
- A test message from the admin.
See Webhooks.
v1, bookings and three kinds of key
The API takes bookings and changes them. Every field and code of the first release keeps its meaning.
GET /availability: the free times for a service, for 1 to 14 days, for one staff member or everyone who does the service.POST /bookings: books a free time through the shop's booking engine. The shop's rules apply, and the customer gets the shop's confirmation mail.POST /bookings/{id}/cancelandPOST /bookings/{id}/reschedule.PATCH /customers/{id}: changes a customer's name or blocks them.asin the body of a write:customerkeeps the shop's rules,staffacts as the shop.- Three kinds of key: read, write and public. A public key starts with
wo_pub_and may sit in a web page. Only an administrator of the shop makes keys. Idempotency-Keyon everyPOSTandPATCH, kept for 24 hours, withIdempotent-Replayed: trueon a replayed answer.- New error codes:
key_not_allowed,slot_taken,too_late,wrong_state,not_allowed,limit_reached,bookings_paused,idempotency_mismatchandrequest_in_progress. - A key holds the shop's number:
wo_live_1_3f9a.... - Examples on every object in openapi.json, so the reference shows a whole answer.
v1, first release
The first version of the API. It read a shop's data and changed nothing.
GET /shop: the shop the key belongs to.GET /servicesandGET /services/{id}, with the name in five languages.GET /staffandGET /staff/{id}.GET /customersandGET /customers/{id}. Filters:email,phone,updated_after.GET /bookingsandGET /bookings/{id}. Filters:status,staff_id,customer_id,starts_after,starts_before,updated_after.GET /paymentsandGET /payments/{id}. Filters:paid_after,paid_before,method.- Keys made by the shop under Settings, Features, Connections, on the Premium plan. Up to 10 for each shop.
- Cursor pagination, up to 100 objects a page.
- 120 requests a minute for each key, with
RateLimit-*headers. - One error shape, and
X-Request-Idon every answer. - An OpenAPI 3.1 file at /openapi.json.
Within v1, fields are added but never renamed or removed, and an error code never changes its meaning.
What is coming
These are planned. None of them works today.
- Adding and removing webhook addresses through the API.
- Webhook events for customers.
- Test keys with their own data.
- Expanding a related object inside another, such as the whole customer inside a booking.
- Changing a booking's service.
- Noting a payment.