Events (Bookings)
Event Fields
Section titled “Event Fields”Recommended minimum fields
Section titled “Recommended minimum fields”| Field | Description |
|---|---|
title | Name of the booking. |
description | Long text for the booking description. |
start_date | Start date of the event, most date types supported. |
end_date | End date of the event, most date types supported. |
start_time | Start time of the event (HH:MM). |
end_time | End time of the event (HH:MM). |
booking_type | String. Use to group bookings of a certain type on a calendar. |
Additional fields
Section titled “Additional fields”| Field | Description |
|---|---|
location | Location string, typically building name or place. |
location_address_string | Location address string, use commas to separate multiple lines. |
location_postal_code | Zip or post code of the location. |
location_country | Location country. |
website | An external event web site. |
external_web_link | An external event web link to a booking / purchase page. |
external_image | An externally hosted image for the event. |
hide_from_self_service | Boolean to control showing the event with the sheepApp. |
member_only_event | Boolean to limit purchase of event tickets to members. |
has_available_tickets | Boolean to indicate available tickets. |
is_sold_out | Boolean to indicate sold out. Use in conjunction with has_available_tickets. |
maximum_ticket_price | Upper price for tickets. Used to show price range. |
minimum_ticket_price | Lower price for tickets. Used to show price range. |
start_sales_date | Date when tickets will be available from. |
waitlist_available | Boolean to show if a waiting list is available. |
eventbrite_id | String. The Eventbrite UID for the event (when event is controlled by Eventbrite). |
use_access_code | Boolean. Eventbrite control field. |
controller | String. Which system is controlling the event, e.g. Eventbrite, Ticketsolve, CraftEvents, sheepCRM. |
lifecycle_emails | Boolean. Turn on lifecycle emails for this booking. |
Getting Events
Section titled “Getting Events”The version 2 API is recommended for read access to event listings. Series of events are collapsed into a single record (the most recent within the date range). current is defined as events from the last couple of weeks falling within the next few months. running events are those happening at the time (end date > now > start date).
GET https://api.sheepcrm.com/api/v1/$FLOCK/booking/?sort=-start_date&series_id=S018Authorization: Bearer $API_KEYCreate a New Event
Section titled “Create a New Event”Recommended endpoint — using booking definitions
Section titled “Recommended endpoint — using booking definitions”| Field | Required | Description |
|---|---|---|
title | Yes | Name of the booking. |
start_date | Yes | Start date of the event. |
start_time | Yes | Start time of the event (HH:MM). |
booking_defn | Yes | The URI of the booking definition. |
end_time | No | End time of the event (HH:MM). |
end_date | No | End date of the event. |
group | No | The URI of the group. |
POST https://api.sheepcrm.com/api/v1/$FLOCK/events/Authorization: Bearer $API_KEYContent-Type: application/json
{ "title": "my new booking", "start_date": "2022-01-17", "start_time": "10:23", "booking_defn": "/example/booking_defn/610d1c5feb69265309cf6cb2/"}Original/standard endpoint
Section titled “Original/standard endpoint”POST https://api.sheepcrm.com/api/v1/$FLOCK/booking/Authorization: Bearer $API_KEYEvent Lifecycle
Section titled “Event Lifecycle”Accept an event enquiry
Section titled “Accept an event enquiry”PUT https://api.sheepcrm.com/api/v1/$FLOCK/booking/{uid}/accept/Authorization: Bearer $API_KEYReject an event enquiry
Section titled “Reject an event enquiry”PUT https://api.sheepcrm.com/api/v1/$FLOCK/booking/{uid}/reject/Authorization: Bearer $API_KEYCancel an event
Section titled “Cancel an event”PUT https://api.sheepcrm.com/api/v1/$FLOCK/booking/{uid}/cancel/Authorization: Bearer $API_KEYUncancel an event
Section titled “Uncancel an event”PUT https://api.sheepcrm.com/api/v1/$FLOCK/booking/{uid}/uncancel/Authorization: Bearer $API_KEYTicket Stock
Section titled “Ticket Stock”Enable stock control
Section titled “Enable stock control”PUT https://api.sheepcrm.com/api/v1/example/booking/{uid}/Authorization: Bearer $API_KEYContent-Type: application/json
{"ticket_stock_control": true}Check ticket stock
Section titled “Check ticket stock”GET https://api.sheepcrm.com/api/v1/example/booking/{uid}/ticket_stock/Authorization: Bearer $API_KEY
HTTP/1.1 200 OK{ "errors": [], "skus": { "/example/ticket_type/56d5c3fb3078f80d1dbd896b/": { "allocated": 2, "amount": "12.00", "available": 18, "currency": "gbp", "description": " ", "name": "Standard", "number_of_attendees_per_ticket": "1", "pricing": "full_price", "reserved": 0, "single_use": null, "tags": [], "tax": "standard" }, "total_available": 19 }}Create stock for an event
Section titled “Create stock for an event”| Field | Required | Description |
|---|---|---|
ticket_type | Yes | The URI of the ticket type. |
quantity | Yes | Ticket quantity (limited to 250 per API call). |
available_from_date | No | Stock is only available for use after this date. Default is None. |
available_until_date | No | Stock is only available until this date. Default is None. |
POST https://api.sheepcrm.com/api/v1/example/booking/{uid}/ticket_stock/Authorization: Bearer $API_KEYContent-Type: application/json
{ "ticket_type": "/example/ticket_type/56d5c3fb3078f80d1dbd896b/", "quantity": 25}
HTTP/1.1 201 OK{ "errors": [], "skus": { "/example/ticket_type/56d5c3fb3078f80d1dbd896b/": { "allocated": 0, "available": 25, "reserved": 0 }, "total_available": 0 }}Remove ticket stock
Section titled “Remove ticket stock”| Field | Required | Description |
|---|---|---|
ticket_type | Yes | The URI of the ticket type. |
quantity | Yes | Ticket quantity. |
DELETE https://api.sheepcrm.com/api/v1/example/booking/{uid}/ticket_stock/Authorization: Bearer $API_KEYContent-Type: application/json
{ "ticket_type": "/example/ticket_type/56d5c3fb3078f80d1dbd896b/", "quantity": 5}Allocate a ticket from stock
Section titled “Allocate a ticket from stock”| Field | Required | Description |
|---|---|---|
ticket_type | Yes | The URI of the ticket type. |
buyer | Yes | The URI of the ticket buyer. |
quantity | No | Ticket quantity. Default = 1. |
POST https://api.sheepcrm.com/api/v1/example/booking/{uid}/allocate_ticket_from_stock/Authorization: Bearer $API_KEYContent-Type: application/json
{ "ticket_type": "/example/ticket_type/56d5c3fb3078f80d1dbd896b/", "buyer": "/example/person/5ff0c404cd59d5159d426aed/"}
HTTP/1.1 200 OK{ "stock": ["/example/sku/61b9bb27683e8011b976a00a/"], "ticket": "/example/ticket/61b9c226683e8011bd76a078/"}Return a ticket to stock
Section titled “Return a ticket to stock”POST https://api.sheepcrm.com/api/v1/example/ticket/{uid}/return_to_stock/Authorization: Bearer $API_KEY
HTTP/1.1 200 OK{ "stock": ["/example/sku/61b9bb27683e8011b976a00a/"], "ticket": "/example/ticket/61b9c226683e8011bd76a078/"}Event Series
Section titled “Event Series”Where a series of events is needed, a series can be created.
View events in a series
Section titled “View events in a series”GET https://api.sheepcrm.com/api/v1/example/booking/{uid}/series/Authorization: Bearer $API_KEY
HTTP/1.1 200 OK{ "errors": [], "series_bookings": [ { "end_datetime": "2019-02-06T14:30:00", "series_counter": 1, "start_datetime": "2019-02-06T13:00:00", "status": "new", "title": "--booking--title", "uri": "/example/booking/5faa709180859e1f88d765e4/" }, { "end_datetime": "2019-02-07T14:30:00", "series_counter": 2, "start_datetime": "2019-02-07T13:00:00", "status": "new", "title": "--booking--title", "uri": "/example/booking/61bb2b1b9d13ab37fbb93225/" } ], "series_id": "bcd0e1c3f3"}Create a series
Section titled “Create a series”A series is one base event repeated with different dates. The base event should be fully configured before it can be repeated. All event data fields will be copied onto the new events.
| Field | Required | Description |
|---|---|---|
repeat | Yes | daily, weekly, monthly. Contact our team to request other repeating sequences. |
number_of_events | No | How many events in the series. |
until | No | Repeat events until this date (exclusive). |
Series are limited to 2 years or 100 events.
POST https://api.sheepcrm.com/api/v1/example/booking/{uid}/series/Authorization: Bearer $API_KEYContent-Type: application/json
{"number_of_events": 3, "repeat": "daily"}Delete from a series
Section titled “Delete from a series”| Field | Description |
|---|---|
delete | all — delete all bookings in series including this booking. following — delete all bookings after this event in the series, including this booking. |
DELETE https://api.sheepcrm.com/api/v1/example/booking/{uid}/series/Authorization: Bearer $API_KEYContent-Type: application/json
{"delete": "following"}Remove a single event from a series
Section titled “Remove a single event from a series”DELETE https://api.sheepcrm.com/api/v1/example/booking/{uid}/delete_from_series/Authorization: Bearer $API_KEYExtend a series
Section titled “Extend a series”Series can be extended from the end. The repeat gap is determined by the existing series.
| Field | Description |
|---|---|
number_of_events | How many events to add to the series. |
until | Repeat events until this date (exclusive). |
PUT https://api.sheepcrm.com/api/v1/example/booking/{uid}/series/Authorization: Bearer $API_KEYContent-Type: application/json
{"number_of_events": 2}