CowlendarOpen Cowlendar

๐Ÿ”‘ Public API (Beta): Generate Tokens and Read or Create Bookings

Generate a token, read services and bookings, and create bookings with product variants and prices.

Updated November 17, 2026

The Public API lets your own tools read your services and bookings, and create manual bookings from outside Shopify. It is in Beta.

You can read services and bookings, and create manual bookings. You cannot update, cancel, reschedule, confirm or decline bookings through the API. You also cannot read free slots or teammates, create or edit services, or manage subscriptions.

New: API bookings now work like bookings created from the admin. They are linked to a product variant, they get an automatic price and they can be rescheduled.

Note

Need to be notified when something happens instead of asking for data? Use Webhooks (Beta): Real-Time Notifications for Your Bookings together with the API.

Where to find it: Shopify admin > Apps > Cowlendar Booking > Settings > Public API.

The Public API page with the Beta badge, the blue note and the Tokens card, token prefixes cropped

What you can do

You can You cannot (yet)
List your services Create or edit services
List your bookings, with filters Cancel, reschedule, confirm or decline bookings
Create manual bookings Manage subscriptions
Read free slots or teammates

There are no update or delete endpoints. To reschedule a booking, use the admin or the team portal. See Rescheduling API bookings.

Step 1: Generate a token

Each token has full access to your shop's bookings and services. Tokens are shown in full only once, at creation. Store them securely.

  1. Open Settings > Public API.
  2. In the Tokens card, click Generate token.
  3. In the window Generate a new API token, type a name in the Name field (up to 60 characters). Choose a label that tells you what the token is for, for example CRM sync. Then click Generate.
  4. Copy the token and store it in a safe place, such as a password manager or an environment variable. You cannot see it again.

The Generate token form

The table lists your tokens with the columns Name, Prefix, Created, Last used and Actions. The prefix starts with cow_, so you can recognize a token without seeing it in full. Last used tells you if a token is still in use.

To stop a token from working, click Revoke on its row. Revoked tokens are hidden. Tick Show revoked to see them.

Warning

Never put a token in your website code, in a public repository or in a screenshot. If one is exposed, revoke it and generate a new one.

Step 2: Authenticate

Send the token in every request as a Bearer token.

  • Base address: https://app.cowlendar.com
  • Header: Authorization: Bearer cow_xxxxxxxxxxxxxxxx
Code Meaning
401 The token is missing or invalid.
403 The request is not allowed for this shop.
429 Too many requests. Wait and try again.

List your services

GET /public-api/v1/services

Returns the services that are not archived. Filters are all optional:

Parameter Use
limit Services per page, 1 to 100.
cursor Pagination cursor from the previous response.
is_active true or false.
type A service type, for example classic-checkout, classic-no-checkout, multiday-checkout, multiday-no-checkout, multislot-checkout, multislot-no-checkout, fullday-checkout or fullday-no-checkout.
q Search text, 1 to 120 characters.
sort -id (default), id, title or -title.

Example:

curl "https://app.cowlendar.com/public-api/v1/services?limit=10&is_active=true" \
  -H "Authorization: Bearer cow_xxxxxxxxxxxxxxxx"

Each service in the response includes its id, title, type, is_active, timezone, durations, default_duration, participants and equipments. It also includes product, with a list of variant_ids. Keep the id of the service, because you need it to create bookings. Use one of the product.variant_ids values as variant_id when you create a booking.

List your bookings

GET /public-api/v1/bookings

You can filter by date (start, end), service (service_id), subscription, status, attendance and customer email (customer_email). Use limit and cursor to paginate, and sort to choose the order.

Example:

curl "https://app.cowlendar.com/public-api/v1/bookings?limit=20&sort=-id" \
  -H "Authorization: Bearer cow_xxxxxxxxxxxxxxxx"

Each booking in the response includes the fields that matter for the new behavior:

Field What it tells you
variant_id The product variant the booking is linked to.
price An object with amount and currency.
quantity Top-level units booked.
unit_quantity Sub-units per top-level unit.
quantity_details The breakdown of participants or equipment.

Create a booking

POST /public-api/v1/bookings

Creates a manual booking, like the ones you create from the Bookings page. It does not create a Shopify order. See Create a Manual Booking from Your Admin.

Send a JSON body with the service, the start and end date, the time zone and the customer details. For a multislot (bundle) service, call the endpoint once for each date.

Body fields

Field Required What it does Example
service_id Yes The ID of the service to book. "123"
start_date Yes Start of the booking, in RFC 3339 format. "2026-12-01T10:00:00Z"
end_date Yes End of the booking, in RFC 3339 format. "2026-12-01T11:00:00Z"
timezone Yes The time zone of the booking, 1 to 80 characters. "America/New_York"
customer Yes The customer. Includes email, firstname and lastname, and also name, phone and locale. {"email": "[email protected]", "firstname": "Jane", "lastname": "Doe"}
variant_id No The Shopify variant ID of the service's product to book. It must be one of the product.variant_ids of the service. If you leave it out, the first variant of the product is used. 123456789
price No The net total price for the whole booking, from 0 to 1000000. If you leave it out, the price is computed from the variant. 25
currency No The ISO 4217 currency code for the price you send, for example "USD". It is ignored if you do not send price. "USD"
quantity No Top-level units booked, from 1 to 1000. It is ignored if you send quantity_details. 2
unit_quantity No Sub-units per top-level unit, from 1 to 1000. Use the number of days or nights for a multiday service. Use 1 for other services. 1
quantity_details No The breakdown of how the quantity is made up, for example adults and children, or equipment. Each entry can have name, quantity, type, participant_id, equipment_id, equipment_sku, is_shared and capacity. See the API docs
form_data No Extra questions and answers from your booking form, as key and value pairs. {"Special requests": "Window seat"}
teammate_id No The team member to assign. If you leave it out, Cowlendar picks one for you. "456"
subscription_id No Links the booking to an existing subscription, for example a 10-class pass. "789"

The phone number in customer.phone must be in E.164 format, with a leading + and the country code, for example +33612345678. National formats without a country code are rejected.

Create a manual booking in the API docs, showing the body fields variant_id and price

Example 1: Simple booking, no variant and no price

Cowlendar uses the first variant and computes the price from it.

curl https://app.cowlendar.com/public-api/v1/bookings \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer cow_xxxxxxxxxxxxxxxx' \
  --data '{
    "service_id": "123",
    "start_date": "2026-12-01T10:00:00Z",
    "end_date": "2026-12-01T11:00:00Z",
    "timezone": "America/New_York",
    "customer": {
      "email": "[email protected]",
      "firstname": "Jane",
      "lastname": "Doe"
    },
    "quantity": 1,
    "unit_quantity": 1
  }'

Response (shortened, example values):

{
  "data": {
    "id": "456",
    "booking_str": "BK-456",
    "service": {
      "id": "123",
      "title": "Regular session",
      "type": "classic-checkout"
    },
    "start_date": "2026-12-01T10:00:00Z",
    "end_date": "2026-12-01T11:00:00Z",
    "timezone": "America/New_York",
    "customer": {
      "email": "[email protected]",
      "firstname": "Jane",
      "lastname": "Doe"
    },
    "quantity": 1,
    "unit_quantity": 1,
    "variant_id": 123456789,
    "price": {
      "amount": 40,
      "currency": "USD"
    },
    "confirmation_status": "confirmed",
    "attendance": "booked",
    "is_canceled": false,
    "created_at": "2026-11-17T10:00:00Z",
    "updated_at": "2026-11-17T10:00:00Z"
  }
}

Example 2: Booking with a variant

Use variant_id when the service has more than one variant and you want a specific one.

curl https://app.cowlendar.com/public-api/v1/bookings \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer cow_xxxxxxxxxxxxxxxx' \
  --data '{
    "service_id": "123",
    "start_date": "2026-12-01T10:00:00Z",
    "end_date": "2026-12-01T11:00:00Z",
    "timezone": "America/New_York",
    "customer": {
      "email": "[email protected]",
      "firstname": "Jane",
      "lastname": "Doe"
    },
    "variant_id": 987654321
  }'

The response has the same structure as Example 1. Its variant_id is 987654321, and its price is the price of that variant.

Example 3: Booking with a custom price

Use price when you want to set the price yourself. Your price has priority over the variant price.

curl https://app.cowlendar.com/public-api/v1/bookings \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer cow_xxxxxxxxxxxxxxxx' \
  --data '{
    "service_id": "123",
    "start_date": "2026-12-01T10:00:00Z",
    "end_date": "2026-12-01T11:00:00Z",
    "timezone": "America/New_York",
    "customer": {
      "email": "[email protected]",
      "firstname": "Jane",
      "lastname": "Doe"
    },
    "price": 25,
    "currency": "USD"
  }'

The response shows "price": {"amount": 25, "currency": "USD"}. Note that the request sends price as a number, but the response returns price as an object with amount and currency.

Responses

Code Meaning
201 The booking was created.
400 Validation error. Check the fields in the body.
401 The token is missing or invalid.
403 The plan is not eligible or the shop is inactive.
404 The service was not found.
422 The booking was rejected. For example, the slot is unavailable, the teammate is unavailable, or the variant is not in the service.
429 Too many requests. Wait and try again.

What's new in API bookings

Until now, bookings created through the API were handled separately. They were not linked to a Shopify product variant, and their price was 0 when you did not send one. Now API bookings are handled the same way as bookings created manually from the admin.

Before Now
Product variant Not linked to a variant. Each booking is linked to a variant. The first variant is used by default. You can send another one with variant_id.
Price when you do not send one Saved as 0. Computed from the variant.
Custom price Saved as you sent it. Saved as you sent it. It has priority over the variant price.
Rescheduling Not possible. Possible from the admin and the team portal, including older API bookings.

No action is required. Your existing integrations keep working without changes. The API documentation has also been updated.

Product variant and price: how Cowlendar decides

Cowlendar follows these steps for every API booking:

  1. If you send variant_id, Cowlendar uses that variant. If you do not, Cowlendar uses the first variant of the product.
  2. If you send price, Cowlendar saves that price as it is. It has priority over the variant price. A price of 0 makes the booking free.
  3. If you do not send price, Cowlendar computes the price from the variant.
  4. If you change the quantity of the booking later, Cowlendar recalculates the price from the Shopify variant.
What you send Variant used Price saved
No variant_id, no price The first variant of the product. The price of that variant.
variant_id, no price The variant you sent. The price of that variant.
No variant_id, price The first variant of the product. The price you sent.
variant_id, price The variant you sent. The price you sent.

Your custom price can differ from the price of the variant in Shopify. This is expected. Cowlendar does not reconcile the two prices.

Services with dynamic pricing

If the price of a service depends on the duration, the number of participants, the season or the equipment, Cowlendar uses the variant that matches the real configuration of the booking. This happens even when you send a different variant_id.

For example, imagine a service that costs 20 for 30 minutes and 40 for 60 minutes, with one variant for each duration. If you send the 30-minute variant for a 60-minute booking, Cowlendar saves the 60-minute variant and its price. This is an example only, to show how the rule works.

Rescheduling API bookings

You can now reschedule API bookings in two places:

  • The Bookings page in the Cowlendar admin.
  • The team portal.

This includes bookings created before this update. Open the booking from the Bookings page and reschedule it from there. The API does not offer a reschedule endpoint.

Note

For older API bookings, the rescheduling screen may show Free instead of the real price. This is only a display issue. The stored booking price does not change.

Billing and sales volume

The amounts of API bookings, both automatic and custom prices, also count toward the total sales volume used to calculate usage-based billing. To learn more, read Pricing, Plans, Booking Limits and Billing.

Things to keep in mind

  • A custom price can differ from the price of the variant in Shopify. Cowlendar does not reconcile the two prices.
  • If you change the quantity of a booking, the price is recalculated from the Shopify variant.
  • On a service with dynamic pricing, Cowlendar uses the variant that matches the real booking, even if you send another variant_id.
  • The API does not create a Shopify order.

Tips

  • Use a separate token per tool, with a clear name, so you can revoke only one.
  • Check Last used from time to time and revoke tokens you no longer use.
  • Send phone numbers in E.164 format, for example +33612345678.
  • Go through the View API documentation button on the Public API page for the complete reference of fields.

Common questions

I lost my token.

You cannot see it again. Revoke it and generate a new one.

I get 401.

Check that the header is exactly Authorization: Bearer followed by the token, with no extra spaces or quotes.

Can I limit what a token can do?

No. There is no permission selector. Every token has full access to bookings and services.

Why is my API booking price not 0 anymore?

Before, a booking created through the API was saved at 0 if you did not send a price. Now the booking uses the price of the product variant, unless you send your own price.

Can I choose which product variant an API booking uses?

Yes. Send variant_id with the Shopify variant ID. If you do not send it, the first variant of the product is used.

My custom price is different from the price in Shopify. Is that a problem?

No, this is expected. Cowlendar does not reconcile your custom price with the Shopify variant price. If you later change the quantity of the booking, the price is recalculated from the Shopify variant.

Why does the reschedule screen show "Free" on an old API booking?

This is a display issue on the rescheduling screen. The stored price of the booking does not change.

Do I need to change my integration after this update?

No. Existing integrations keep working without changes.

Does the API booking price count in my billing?

Yes. API booking amounts, both automatic and custom prices, count toward the total sales volume used for usage-based billing.

Why was my variant ignored on a service with dynamic pricing?

If the price depends on duration, participants, season or equipment, Cowlendar uses the variant that matches the real booking. This happens even if you send a different variant_id.

Did this answer your question?