--- openapi: 3.0.2 info: title: Jammed Bookings API version: 2.0.6 license: name: Jammed Bookings url: https://jammed.app contact: email: api@jammed.app url: https://support.jammed.app x-logo: url: "https://fileshare.jammedapp.com/Profile%20Images/Artboard%205.png" altText: Jammed logo description: | Jammed API allows you to integrate with the Jammed system, and automate key events within third-party systems. We are adding endpoints and features as we need them and as studios request them. If there's an endpoint you need, please contact us. By subscribing to and listening to webhooks your studio can automate sending reminders, automate customer lists and mailing systems, finance and accounting packages, and anything you can imagine really. # Introduction Jammed is powering scheduling and bookings for independent creative spaces, and we're building a new way to connect with them. You can read more about [Jammed on the support pages](https://support.jammedapp.com). Jammed offers webhooks and a polling API, so you can integrate how ever you like with the system. You can also see the version history and roadmap for the [Jammed API on the public Github project](https://github.com/jammed-org/api). # Authentication You authenticate with the API using an API key - this is found in the website settings of the admin section. Issue this header with all requests to the API or it will return a `401 Unauthorized` error. # Getting started To get started, you'll need to create a Jammed account and create a studio account. Once you have setup your studio, head the to Website Setting page and press the 'Enable webhooks' button. From there, you can set the webhook URLs you want Jammed to send to. x-tagGroups: - name: Endpoints tags: - Booking Endpoints - Customer Endpoints - Group Endpoints - Room Endpoints - Coupon Endpoints - Promocode Endpoints - name: Webhooks tags: - Booking Webhooks - Customer Webhooks - Booking Webhooks - name: Models tags: - booking_model - customer_model - group_model - room_model - coupon_model - promocode_model tags: - name: Booking Webhooks description: Events that happen with a booking - name: Customer Webhooks description: Events that happen with a customer - name: Group Webhooks description: Events that happen with a group/band - name: Booking Endpoints description: Polling API for bookings - name: Customer Endpoints description: Polling API for customers - name: Group Endpoints description: Polling API for groups - name: Room Endpoints description: Polling API for rooms - name: booking_model x-displayName: Booking Model description: | - name: customer_model x-displayName: Customer Model description: | - name: group_model x-displayName: Group Model description: | - name: room_model x-displayName: Room Model description: | - name: coupon_model x-displayName: Coupon Model description: | - name: promocode_model x-displayName: Promocode Model description: | servers: - url: https://api.jammed.app/api/v2/ description: Jammed API endpoint paths: /bookings.json: get: tags: - Booking Endpoints summary: All bookings description: Returns all bookings, ordered by creation date operationId: getBookings responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/booking' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " /bookings/cancelled.json: get: tags: - Booking Endpoints summary: Cancelled bookings description: Returns all cancelled bookings, ordered by cancellation date operationId: getBookingsCancelled responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/booking' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " /bookings/started.json: get: tags: - Booking Endpoints summary: Started bookings description: Returns all started bookings, ordered by start time operationId: getBookingsStarted responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/booking' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " /bookings/finished.json: get: tags: - Booking Endpoints summary: Finished bookings description: Returns all finished bookings, ordered by start time operationId: getBookingsFinished responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/booking' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " /customers.json: get: tags: - Customer Endpoints summary: Find all customers description: Returns all customers operationId: getCustomers responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/customer' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " post: tags: - Customer Endpoints summary: Create a customer description: | Create a new customer on Jammed. With a new customer, you must at least provide an **name** and **email address**. You can also issue `actions` to the endpoint, to create and invite the customer to set a password - Jammed will then send them an email from your account with a link to set their password. You can't create a customer with an email address that already exists as a registered customer on Jammed. You can create a customer with an email address that already exists, so long as the customer is not yet registered on Jammed. **Jammed API doesn't accept passwords for customer creation process** - they must be set by the customer themselves in the invitation process to verify the email and to improve security. operationId: createCustomer responses: "201": description: Customer created content: application/json: schema: type: array items: $ref: '#/components/schemas/customer' "401": description: Unauthorized - Invalid API key "422": description: Unprocessable - the customer parameters you provided are invalid content: application/json: schema: $ref: '#/components/schemas/unprocessable_error' requestBody: description: Create a new customer in Jammed required: true content: form-data: schema: $ref: '#/components/schemas/customer_create' parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " /customers/{id}.json: get: tags: - Customer Endpoints summary: Find a customer by ID description: Returns customer with the given ID operationId: getCustomer responses: "200": description: successful operation content: application/json: schema: $ref: '#/components/schemas/customer' "401": description: Unauthorized - Invalid API key "404": description: Not found - Customer was not found parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " - name: id in: path required: true schema: type: integer /coupons/{id}.json: get: tags: - Coupon Endpoints summary: Find a coupon by ID description: Returns coupon with the given ID operationId: getCoupon responses: "200": description: successful operation content: application/json: schema: $ref: '#/components/schemas/coupon' "401": description: Unauthorized - Invalid API key "404": description: Not found - Coupon was not found parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " - name: id in: path required: true schema: type: integer /coupons.json: get: tags: - Coupon Endpoints summary: Find all coupons description: Returns all coupons operationId: getCoupons responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/coupon' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " post: tags: - Coupon Endpoints summary: Create a coupon description: | Create a new coupon on Jammed. With a new coupon, you must at least provide an **name**, **amount** and **discount_type**. `discount type` is either `fixed_amount`, or `percentage` - and `amount` is in pence/cents or whole pencentage points. Once created, a Coupon can be used by staff members only on a booking. To allow customers to use the Coupon, you need to generate Promocode for the Coupon. operationId: createCoupon responses: "201": description: Coupon created content: application/json: schema: $ref: '#/components/schemas/coupon' "401": description: Unauthorized - Invalid API key "422": description: Unprocessable - the coupon parameters you provided are invalid content: application/json: schema: $ref: '#/components/schemas/unprocessable_error' requestBody: description: Create a new coupon in Jammed required: true content: form-data: schema: $ref: '#/components/schemas/coupon_create' parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " /coupons/{coupon_id}/promocodes.json: get: tags: - Promocode Endpoints summary: Find all promocodes description: Returns all promocodes operationId: getPromocodes responses: "200": description: successful operation content: application/json: schema: $ref: '#/components/schemas/promocode' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " - name: coupon_id description: Coupon ID to list the promocodes for in: path required: true schema: type: integer example: 123 post: tags: - Promocode Endpoints summary: Create a promocode description: | Create a promocode for a coupon You can provide the API with a **code**, but if you don't we'll generate one for you. You can just `POST` an empty body to create a promocode for a coupon with a generated code. With promocodes you can specify minimum booking values, redemptions limits, limit only to one customer, and limit one use per customer. Once created, a Promocode can be used to apply the Coupon to a booking via the customer booking form operationId: createPromocode responses: "201": description: Promocode created content: application/json: schema: type: array items: $ref: '#/components/schemas/promocode' "401": description: Unauthorized - Invalid API key "422": description: Unprocessable - the promocode parameters you provided are invalid content: application/json: schema: $ref: '#/components/schemas/unprocessable_error' requestBody: description: Create a new promocode in Jammed required: true content: form-data: schema: $ref: '#/components/schemas/promocode_create' parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " - name: coupon_id description: Coupon ID to create promocode for in: path required: true schema: type: integer example: 123 /coupons/{coupon_id}/assign_to_customer.json: post: tags: - Coupon Endpoints summary: Assign Coupon to Customer description: | Assign a Coupon to a Customer Using the Coupon ID and a Customer ID, we can assign a Coupon to a Customer This will mean that the Customer will automatically be able to use the Coupon when booking without the use of a promocode operationId: assignPromocode responses: "201": description: Promocode assigned content: application/json: schema: $ref: '#/components/schemas/promocode' "401": description: Unauthorized - Invalid API key "422": description: Coupon has already been assigned to this Customer content: application/json: schema: $ref: '#/components/schemas/unprocessable_error' requestBody: description: Assign a Coupon to a Customer required: true content: form-data: schema: $ref: '#/components/schemas/coupon_assign_to_customer' parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " - name: coupon_id description: Coupon ID to create promocode for in: path required: true schema: type: integer example: 123 /groups.json: get: tags: - Group Endpoints summary: Find all groups description: Returns all groups operationId: getGroups responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/group' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " /rooms.json: get: tags: - Room Endpoints summary: Find all rooms description: Returns all rooms operationId: getRooms responses: "200": description: successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/room' "401": description: Unauthorized - Invalid API key parameters: - name: Authorization in: header required: true schema: type: string example: "Bearer " x-webhooks: booking.created: get: summary: booking.created description: Made when a Jammed booking is made by a customer online, or made by an admin user. Use the taken_by parameter to distinguish. When taken online, taken_by=online - otherwise it is the name of the admin user that took the booking. tags: - Booking Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/booking" example: "$ref": "#/components/examples/booking_example/value" booking.updated: get: summary: booking.updated description: Triggered when a booking is updated by a staff member tags: - Booking Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/booking" example: "$ref": "#/components/examples/booking_example/value" booking.cancelled: get: summary: booking.cancelled description: Triggered when a booking is cancelled by a customer or by a staff member. Cancellations will free up this time to other customers wishing to book the same time. tags: - Booking Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/booking" example: "$ref": "#/components/examples/booking_example/value" booking.reminder: get: summary: booking.reminder description: Booking reminders in Jammed are customisable, but by default are triggered 24 hours prior to the start of the booking. An email is sent to the user, but this event exists so you can also hook in other integrations at this point tags: - Booking Webhooks responses: "200": description: Response content: application/json: example: "$ref": "#/components/examples/booking_example/value" booking.one_hour_before: get: summary: booking.one_hour_before description: Triggered 1 hour before the booking starts tags: - Booking Webhooks responses: "200": description: Response content: application/json: example: "$ref": "#/components/examples/booking_example/value" booking.started: get: summary: booking.started description: Triggered when the booking starts tags: - Booking Webhooks responses: "200": description: Response content: application/json: example: "$ref": "#/components/examples/booking_example/value" booking.finished: get: summary: booking.finished description: Triggered when the booking finishes tags: - Booking Webhooks responses: "200": description: Response content: application/json: example: "$ref": "#/components/examples/booking_example/value" group.created: get: summary: group.created description: Trigger when a group is made on Jammed (also known as bands). It can be manually made in the admin interface, or made at booking time if the group is new tags: - Group Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/group" example: "$ref": "#/components/examples/group_example/value" group.updated: get: summary: group.updated description: Trigger when a group is updated on Jammed (also known as bands) tags: - Group Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/group" example: "$ref": "#/components/examples/group_example/value" group.deleted: get: summary: group.deleted description: Trigger when a group is deleted on Jammed (also known as bands) tags: - Group Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/group" example: "$ref": "#/components/examples/group_example/value" customer.created: get: summary: customer.created description: Trigger when a customer is made on Jammed. It can be manually made in the admin interface, or made at booking time if the customer is new tags: - Customer Webhooks responses: "200": description: Response content: application/json: schema: $ref: "#/components/schemas/customer" example: $ref: "#/components/examples/customer_example/value" customer.updated: get: summary: customer.updated description: Trigger when a customer is updated on Jammed tags: - Customer Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/customer" example: "$ref": "#/components/examples/customer_example/value" customer.deleted: get: summary: customer.deleted description: Trigger when a customer is deleted on Jammed tags: - Customer Webhooks responses: "200": description: Response content: application/json: schema: "$ref": "#/components/schemas/customer" example: "$ref": "#/components/examples/customer_example/value" components: schemas: customer_create_body: type: object title: Customer info properties: name: type: string title: Name description: "The customers given full name" email: type: string title: Email description: "The customers email address" mobile: type: string title: Mobile description: "The customers mobile phone number" reminders_opt_in: type: boolean title: Reminders opt-in description: "Whether this customer wants to receive reminders" mailing_list_opt_in: type: boolean title: Mailing list opt-in description: "Whether this customer wants to be on the mailing list" required: - name - email customer_create_actions: type: object title: Customer creation actions - optional properties: invite: type: boolean title: Invite description: Invite this customer to set a password on Jammed. An email will be sent to them and the invite code will last 2 days customer_create: type: object description: "" properties: customer: "$ref": "#/components/schemas/customer_create_body" actions: "$ref": "#/components/schemas/customer_create_actions" short_room: type: object title: Basic room info properties: name: type: string title: Name description: "The name of the room" code: type: string title: Code description: "The code of the room - used internally by Jammed" required: - name - code additionalProperties: false short_extra: type: object title: Basic extra info properties: name: type: string title: Name description: "The name of the extra" category: type: string title: Category description: "The category of the extra" required: - name additionalProperties: false short_customer: type: object title: Basic customer info description: "" properties: name: type: string title: Name description: "The customers given full name" properties: {} email: type: string title: Email description: "The customers email address" properties: {} mobile: type: string title: Mobile description: "The customers mobile phone number" properties: {} avatar: type: string title: Avatar description: "The customers avatar image URL, if any" properties: {} reminders_opt_in: type: boolean title: Reminders opt-in description: "Whether this customer wants to receive reminders" mailing_list_opt_in: type: boolean title: Mailing list opt-in description: "Whether this customer wants to be on the mailing list" required: - name - email additionalProperties: false short_group: type: object title: Basic group info description: "" properties: name: type: string title: Name description: "The name of the group" code: type: string title: Code description: "The code of the group - used internally by Jammed" number_of_members: type: integer title: NumberOfMembers description: "The number of members in the group" required: - name - code additionalProperties: false booking_custom_answer: type: object properties: question_id: type: integer title: QuestionId description: "The ID of the question that was asked" name: type: string title: Name description: "The name of the question" response: type: string title: Response description: "The response/answer to the question" booking: type: object properties: group: "$ref": "#/components/schemas/short_group" customer: "$ref": "#/components/schemas/short_customer" room: "$ref": "#/components/schemas/short_room" extras: type: array title: Extras description: "The addons/extras added to the booking" items: "$ref": "#/components/schemas/short_extra" custom_answers: type: array title: Custom Answers description: "The responses to custom questions added to the booking" items: "$ref": "#/components/schemas/booking_custom_answer" source_data: type: object title: Source Data description: "The source metadata of the booking, how and where the booking was made" properties: source: type: string title: Source description: "The source of the booking: app, online, regular_booking etc." platform: type: string title: Platform description: "The platform where the booking was made: booking_form, dashboard, staff_section, calendar, app etc." referrer: type: string title: Referrer description: "The referrer - the URL of the booking page" code: type: string title: Code description: "The code of the booking - seen by customers on the booking page" id: type: string title: id description: "Same as code" recording: type: boolean title: Recording description: "Whether the room has been marked as a recording" regular: type: boolean title: Regular description: "Whether the booking is part of a regular booking" online_booking: type: boolean title: OnlineBooking description: "Whether the booking was made online by the customer" created_at: type: integer title: CreatedAt description: "Unix timestamp from epoch" updated_at: type: integer title: UpdatedAt description: "Unix timestamp from epoch" approved_at: type: integer title: ApprovedAt description: "Unix timestamp from epoch - when the booking was approved (if approved)" rejected_at: type: integer title: RejectedAt description: "Unix timestamp from epoch - when the booking was rejected (if rejected)" price: type: integer title: Price description: "The price of the booking time only in cents/pence/units" price_currency: type: string title: PriceCurrency description: "The currency of the price" title: type: string title: Title description: "The title of the booking - this is generated from the customer and group names" start_at: type: integer title: StartAt description: "Unix timestamp from epoch" end_at: type: integer title: EndAt description: "Unix timestamp from epoch" duration: type: integer title: Duration description: "The duration of the booking in seconds" duration_hours: type: number title: DurationHours description: "The duration of the booking in hours, e.g. 1pm-2.30pm = `2.5` hours" duration_full_hours: type: integer title: DurationFullHours description: "The duration of the booking in hours, rounded up to each full hour, e.g. 1pm-2.30pm = `3` hours" activity_name: type: string title: ActivityName description: "The name of the activity the booking is part of - e.g. 'Rehearsal'" dates: type: array title: Dates description: "The dates that the booking is part of in local time - given as strings YYYYMMDD format" items: type: string timezone: type: string title: Timezone description: "The timezone of the booking" has_amount_due: type: boolean title: HasAmountDue description: "Whether the booking still has an amount due" remaining_amount: type: integer title: RemainingAmount description: "The remaining amount due for the booking" cancelled: type: boolean title: Cancelled description: "Whether the booking has been cancelled" taken_by: type: string title: TakenBy description: "The name of the staff member who took the booking - if null, the booking was made by the customer themselves" room: type: object properties: id: type: string title: id description: "Same as code" code: type: string title: Code description: "The code of the room - used internally by Jammed" name: type: string title: Name description: "The name of the room" description: type: string title: Description description: "The description of the room - you can set this in the admin interface" space_for: type: integer title: SpaceFor description: "The capacity of the room" order: type: integer title: Order twenty_four_hour_booking: type: boolean title: TwentyFourHourBooking description: "Whether the room can be booked 24 hours a day" space_type: type: string title: SpaceType description: "The type of space the room is" hex_colour: type: string title: HexColour description: "The hex colour of the room on the dashboard" active: type: boolean title: Active description: "Whether the room is active for Jammed online bookings" prices_set: type: integer title: PricesSet description: "The count of prices set for the room" price_to: type: string title: PriceTo description: "The maximum price for the room" price_from: type: string title: PriceFrom description: "The minimum price for the room" images: type: array title: Images description: "The images of the room" items: type: object properties: original: type: string title: original description: "Image URL" data: type: object title: Data description: "The hidden data of the room - can be set and used by back-end systems" customer: type: object properties: id: type: integer title: ID description: "Use to identify the customer in other API calls" name: type: string title: Name description: "The customers given full name" email: type: string title: Email description: "The customers email address" mobile: type: string title: Mobile description: "The customers mobile phone number" avatar: type: string title: Avatar description: "The customers avatar image URL, if any" credit_balance: type: integer title: CreditBalance description: "The customers current credit balance in cents/pence/units\n\nThis cannot be changed via the API" status: $ref: "#/components/schemas/customer_statuses" reminders_opt_in: type: boolean title: Reminders opt-in description: "Whether this customer wants to receive reminders" mailing_list_opt_in: type: boolean title: Mailing list opt-in description: "Whether this customer wants to be on the mailing list" signed_up: type: boolean title: SignedUp description: "Whether the customer has signed up" signed_up_at: type: integer title: SignedUpAt description: "Unix timestamp from epoch - when the customer signed up" regular_bookings_count: type: integer title: RegularBookingsCount description: "The number of regular bookings the customer has made" bookings_count: type: integer title: BookingsCount description: "The number of bookings the customer has made" created_at: type: integer title: CreatedAt description: "Unix timestamp from epoch - when the customer was created" updated_at: type: integer title: UpdatedAt description: "Unix timestamp from epoch - when the customer was last updated" last_booking_at: type: integer title: LastBookingAt description: "Unix timestamp from epoch - when the customer last booked" regular_bookings: type: array title: RegularBookings description: "The customer's regular bookings" items: type: object title: "" description: "" properties: name: type: string title: Name description: "" id: type: integer title: Id description: "" bands: type: array title: Bands or Groups description: "" items: "$ref": "#/components/schemas/short_group" group: type: object properties: name: type: string title: Name description: "The name of the group" group_type: type: string title: GroupType description: "The type of the group - e.g. band" number_of_members: type: integer title: NumberOfMembers description: "The number of members in the group" customer_count: type: integer title: CustomerCount description: "The number of customers assigned to the group" regular_bookings_count: type: integer title: RegularBookingsCount description: "The number of regular bookings the group has" bookings_count: type: integer title: BookingsCount description: "The number of bookings the group has" created_at: type: integer title: CreatedAt description: "Unix timestamp from epoch - when the group was created" updated_at: type: integer title: UpdatedAt description: "Unix timestamp from epoch - when the group was last updated" last_booking_at: type: integer title: LastBookingAt description: "Unix timestamp from epoch - when the group last booked" customers: type: array title: Customers description: "The customers assigned to the group" items: "$ref": "#/components/schemas/short_customer" regular_bookings: type: array title: RegularBookings description: "The group's regular bookings" items: type: object title: "" description: "" properties: name: type: string title: Name description: "The name of the regular booking" id: type: integer title: Id description: "The ID of the regular booking" promocode: type: object properties: id: type: integer code: type: string description: | The code the customer can use to redeem the promocode, they enter this code when booking. The code is case-insensitive and must be unique minimum_booking_value: type: integer description: | The minimum booking value the Promocode can be used for. If attempted for a booking below this value, the Coupon will not be applied first_time_use_only: type: boolean description: | If set to true, the Promocode will only be usable once per customer - applies to logged in customers only coupon: type: object properties: id: type: integer name: type: string description: A label for the coupon - this is seen by your customers discount_type: type: string description: | The type of discount the coupon gives Either: 'fixed_amount' or 'percentage' amount: type: integer description: | The integer decimal amount, or percentage that the coupon will deduct. For `discount_type=percentage`, `10` would mean 10% For `discount_type=fixed_amount`, `10` would mean $0.10 or £0.10 etc all_new_customers: type: boolean description: Set to true if you want the coupon to apply to all new customers automatically expires_at: type: string description: The ISO8601 timestamp when the coupon expires. If not set, the coupon will never expire created_at: type: string description: The ISO8601 timestamp when the coupon was created fully_used: type: boolean description: Is set as true if the coupon has been used up, and cannot be used anymore expired: type: boolean description: Is set as true if the coupon has expired status: type: string description: | The status of the coupon: `active`, `deleted`, `expired`, `fully used` duration: type: string description: | The duration of the coupon: `once`, `forever` If `forever`, the coupon can be used over and over by the same customer If `once`, the coupon can only be used once by the same customer total_number_of_uses: type: integer description: The total number of times the coupon can be used number_of_times_used: type: integer description: The number of times the coupon has been used promocodes: type: array description: | The promocodes that are linked to this coupon. items: type: object properties: coupon: "$ref": "#/components/schemas/promocode" coupon_create: type: object description: "" properties: coupon: "$ref": "#/components/schemas/coupon_create_body" coupon_create_body: type: object title: Coupon info properties: name: type: string description: A label for the coupon - this is seen by your customers amount: type: string description: | The integer decimal amount, or percentage that the coupon will deduct. For `discount_type=percentage`, `10` would mean 10% For `discount_type=fixed_amount`, `10` would mean $0.10 or £0.10 etc duration: type: string description: | The duration of the coupon: `once`, `forever` If `forever`, the coupon can be used over and over by the same customer If `once`, the coupon can only be used once by the same customer discount_type: type: string description: | The type of discount the coupon gives Either: 'fixed_amount' or 'percentage' all_new_customers: type: boolean description: Set to true if you want the coupon to apply to all new customers automatically total_number_of_uses: type: integer description: The total number of times the coupon can be used expires_at: type: string description: The ISO8601 timestamp when the coupon expires. If not set, the coupon will never expire required: - name - duration - amount - discount_type promocode_create: type: object description: "" properties: promocode: "$ref": "#/components/schemas/promocode_create_body" promocode_create_body: type: object title: Promocode info properties: code: type: string description: | The code the customer can use to redeem the promocode, they enter this code when booking. The code is case-insensitive and must be unique minimum_booking_value: type: integer description: | The minimum booking value the Promocode can be used for. If attempted for a booking below this value, the Coupon will not be applied coupon_assign_to_customer: type: object title: Coupon assignment properties: customer_id: type: integer description: | The Customer's ID to assign the Coupon to unprocessable_error: type: object properties: status: type: string description: Error status example: "error" message: type: string description: Error message example: "The model parameters you provided are invalid" customer_statuses: type: string title: CustomerStatus enum: - unregistered - invited - registered - banned - behind_payment description: | The status of the customer `unregistered`: The customer has booked but not registered an account `invited`: The customer has been invited to register an account `registered`: The customer has registered an account `banned`: The customer has been marked as banned from booking (and will not be able to book) `behind_payment`: The customer has been marked as behind on payments (and will not be able to book) examples: booking_example: value: name: Rush group_type: band number_of_members: 3 customers: - name: Geddy Lee email: geddy22@yahoo.ca - name: Neil Peart email: theprofessor2112@gmail.com mobile: "+447584948502" - name: Alex Lifeson email: alex-lifeson@me.com mobile: "+442072983029" customer_count: 3 regular_bookings: - name: Monday 8pm Red Room id: 503 regular_bookings_count: 1 bookings_count: 61 created_at: 1646247874 updated_at: 1646247874 customer_example: value: email: Geddy Lee avatar: https://www.gravatar.com/avatar/02e414a53149473ddd8ed541fac40b6f?d=mp&s=45 status: unregistered signed_up: false bands: - name: Rush code: DI3EK30SP number: 3 booking_count: 9 regular_bookings_count: 1 regular_bookings: - name: Geddy Lee (Rush) id: 2112 bookings_count: 9 last_booking_at: 1643799530 created_at: 1643799530 updated_at: 1643799530 group_example: value: name: Rush group_type: band number_of_members: 3 customers: - name: Geddy Lee email: geddy22@yahoo.ca mobile: "+447584948502" - name: Neil Peart email: theprofessor2112@gmail.com mobile: "+447584948502" - name: Alex Lifeson email: alex-lifeson@me.com mobile: "+442072983029" customer_count: 3 regular_bookings: - name: Geddy Lee (Rush) id: 2112 regular_bookings_count: 1 bookings_count: 6171 created_at: 1646247874 updated_at: 1646247874 securitySchemes: apiKey: type: apiKey name: "Authorization: 'Bearer '" in: header description: | Issue a http header with the key 'Authorization' and value 'Bearer api_key'