> ## Documentation Index
> Fetch the complete documentation index at: https://www.spacebring.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a booking

> Update a booking. Fields left out of the request keep their current value. <h3>OAuth</h3>Required scopes: <code>resources</code>



## OpenAPI

````yaml /assets/openapi.json patch /resources/bookings/v1/{bookingId}
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /resources/bookings/v1/{bookingId}:
    patch:
      tags:
        - Resources
      summary: Update a booking
      description: >-
        Update a booking. Fields left out of the request keep their current
        value. <h3>OAuth</h3>Required scopes: <code>resources</code>
      operationId: patchBooking
      parameters:
        - in: path
          name: bookingId
          required: true
          description: >-
            ID of the booking. For a single occurrence of a repeating booking,
            append the occurrence date: `<bookingId>_<ISO date>`.
          schema:
            type: string
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      requestBody:
        $ref: '#/components/requestBodies/patchBooking'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getBooking'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - resources
components:
  requestBodies:
    patchBooking:
      content:
        application/json:
          schema:
            type: object
            properties:
              booking:
                type: object
                properties:
                  attendees:
                    description: >-
                      Full list of attendees to keep on the booking. Attendees
                      left out are removed. Supported for room resources.
                    type: array
                    items:
                      type: object
                      properties:
                        user:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: User id of the attendee.
                          required:
                            - id
                      required:
                        - user
                  endDate:
                    type: string
                    format: date-time
                    description: ISO timestamp when the booking ends.
                  entire:
                    description: >-
                      Set to true to book the entire resource instead of
                      individual seats. Supported for office resources.
                    type: boolean
                  memo:
                    description: Internal note attached to the booking.
                    type: string
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: >-
                      Key-value data to merge into the booking metadata. Keys
                      left out keep their value, and a key set to `null` is
                      removed. Values cannot be objects or arrays. Available
                      only for admins.
                  recurrence:
                    description: >-
                      RRULE lines that replace how the booking repeats, e.g.
                      `RRULE:FREQ=WEEKLY;COUNT=10`. The DTSTART line is derived
                      from the booking start, and the occurrences already
                      detached from the series stay excluded. Only supported for
                      a repeating booking, and only with updateRepeatingScope
                      set to `thisAndNext`.
                    type: array
                    items:
                      type: string
                  resourceRef:
                    description: >-
                      ID of the resource to move the booking to. The target must
                      belong to the same location, be of an interchangeable
                      type, and sell the booking's payment method at the same
                      price. Not supported for repeating bookings.
                    type: string
                    format: uuid
                  seats:
                    description: >-
                      Number of seats to reserve. Supported for desk and office
                      resources.
                    type: integer
                    minimum: 1
                    maximum: 9007199254740991
                  sendUpdates:
                    description: >-
                      Whether to notify the owner and the attendees about the
                      update. Defaults to the value stored on the booking.
                    type: string
                    enum:
                      - none
                      - all
                  startDate:
                    description: >-
                      ISO timestamp when the booking starts. Patching it without
                      an endDate moves the booking and keeps its current
                      duration.
                    type: string
                    format: date-time
                  title:
                    description: Custom title for the booking.
                    type: string
                description: >-
                  Booking fields to update. Fields left out keep their current
                  value.
              updateRepeatingScope:
                default: singleOccurrence
                description: >-
                  For a repeating booking, whether to update only the addressed
                  occurrence or that one and every later occurrence.
                type: string
                enum:
                  - singleOccurrence
                  - thisAndNext
            required:
              - booking
      required: true
  schemas:
    getBooking:
      type: object
      properties:
        booking:
          type: object
          additionalProperties: false
          description: The booking.
          properties:
            attendees:
              type: array
              items:
                type: object
                additionalProperties: false
                properties:
                  membershipRef:
                    description: Membership id of the attendee.
                    type: string
                    format: uuid
                  user:
                    description: User profile of the attendee.
                    type: object
                    properties:
                      about:
                        description: Short bio of the user.
                        nullable: true
                        type: string
                      company:
                        description: Company the user belongs to, if any.
                        nullable: true
                        type: object
                        properties:
                          title:
                            type: string
                            description: Company display name.
                        required:
                          - title
                        additionalProperties: false
                      email:
                        description: Email address of the user.
                        nullable: true
                        type: string
                        format: email
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the user.
                      name:
                        description: First name of the user.
                        nullable: true
                        type: string
                      phoneNumber:
                        description: Phone number of the user.
                        nullable: true
                        type: string
                      photoUrl:
                        nullable: true
                        description: Profile photo URL of the user.
                        type: string
                      surname:
                        description: Last name of the user.
                        nullable: true
                        type: string
                    required:
                      - id
                    additionalProperties: false
              description: >-
                Attendees of the booking. Empty when the caller has no access to
                booking details.
            createDate:
              type: string
              format: date-time
              description: ISO timestamp when the booking was created.
            customer:
              description: >-
                Customer the booking belongs to. Omitted when the caller has no
                access.
              type: object
              properties:
                company:
                  description: >-
                    Company the booking was made for, recorded when the owner
                    was a member of a company at the time of the booking.
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: Unique identifier of the company.
                    title:
                      description: Company name.
                      type: string
                  required:
                    - id
                    - title
                  additionalProperties: false
                id:
                  type: string
                  format: uuid
                  description: Customer id of the booking owner.
                user:
                  description: >-
                    Profile of the booking owner. Omitted when the owner has
                    restricted visibility.
                  type: object
                  properties:
                    about:
                      description: Short bio of the user.
                      nullable: true
                      type: string
                    company:
                      description: Company the user belongs to, if any.
                      nullable: true
                      type: object
                      properties:
                        title:
                          type: string
                          description: Company display name.
                      required:
                        - title
                      additionalProperties: false
                    email:
                      description: Email address of the user.
                      nullable: true
                      type: string
                      format: email
                    id:
                      type: string
                      format: uuid
                      description: Unique identifier of the user.
                    name:
                      description: First name of the user.
                      nullable: true
                      type: string
                    phoneNumber:
                      description: Phone number of the user.
                      nullable: true
                      type: string
                    photoUrl:
                      nullable: true
                      description: Profile photo URL of the user.
                      type: string
                    surname:
                      description: Last name of the user.
                      nullable: true
                      type: string
                  required:
                    - id
                  additionalProperties: false
              required:
                - id
              additionalProperties: false
            deleteDate:
              description: ISO timestamp when the booking was cancelled.
              type: string
              format: date-time
            endDate:
              type: string
              format: date-time
              description: ISO timestamp when the booking ends.
            entire:
              description: >-
                Whether the booking reserves the entire resource rather than
                individual seats.
              type: boolean
            id:
              type: string
              description: >-
                Unique identifier of the booking. For recurring occurrences,
                formatted as `{bookingId}_{isoDate}`.
            membershipRefOwner:
              deprecated: true
              description: >-
                Deprecated. Use `customer.id` instead. Customer id of the
                booking owner. Omitted when the caller has no access.
              type: string
              format: uuid
            memo:
              description: >-
                Note attached to the booking. Visible to the booking owner and
                to admins.
              type: string
            metadata:
              type: object
              additionalProperties: {}
              description: >-
                Key-value data attached to the booking. Values cannot be objects
                or arrays. Available only for admins.
            payment:
              deprecated: true
              description: Deprecated. Use `payments` instead.
              type: object
              properties:
                createDate:
                  description: ISO timestamp of when the payment was made.
                  type: string
                  format: date-time
                discounts:
                  description: Discounts applied to the price. Omitted when none applied.
                  type: array
                  items:
                    type: object
                    properties:
                      coupon:
                        type: object
                        properties:
                          amountOff:
                            description: Fixed discount amount, in the coupon's currency.
                            type: number
                          currencyCode:
                            description: Currency code for amountOff.
                            type: string
                          id:
                            description: Coupon id.
                            type: string
                          percentOff:
                            description: Percentage discount amount.
                            type: number
                          productTypes:
                            description: Product types this coupon applies to.
                            type: array
                            items:
                              type: string
                          type:
                            description: Coupon type.
                            type: string
                        additionalProperties: false
                        description: Applied coupon.
                      promocode:
                        description: Applied promocode.
                        type: object
                        properties:
                          code:
                            type: string
                            description: >-
                              Promocode string, the way a purchase references
                              the promocode back.
                          expiration:
                            description: Promocode expiration.
                            type: object
                            properties:
                              date:
                                description: ISO timestamp of when the promocode expires.
                                type: string
                              enabled:
                                type: boolean
                                description: Whether the promocode expires.
                            required:
                              - enabled
                            additionalProperties: false
                          id:
                            type: string
                            description: Promocode id.
                          limitByFirstPurchase:
                            description: >-
                              Whether the promocode is limited to a first
                              purchase.
                            type: boolean
                        required:
                          - code
                          - id
                        additionalProperties: false
                      subscriptionId:
                        description: Subscription the discount was granted by.
                        type: string
                    required:
                      - coupon
                    additionalProperties: false
                    description: Discount recorded on a settled payment.
                dispute:
                  description: Chargeback dispute raised against the payment, if any.
                  type: object
                  properties:
                    createDate:
                      type: string
                      format: date-time
                      description: ISO timestamp of when the dispute was opened.
                  additionalProperties: false
                method:
                  type: object
                  properties:
                    credits:
                      description: Set when `type` is `credits`.
                      type: object
                      properties:
                        customer:
                          type: object
                          properties:
                            id:
                              description: >-
                                Customer id. Absent when the payer record is no
                                longer available.
                              type: string
                              format: uuid
                            location:
                              description: Location the payer belongs to.
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                  description: Location id.
                                title:
                                  description: Location display name.
                                  type: string
                              required:
                                - id
                              additionalProperties: false
                            name:
                              description: First name. Present for `user` payers.
                              nullable: true
                              type: string
                            surname:
                              description: Last name. Present for `user` payers.
                              nullable: true
                              type: string
                            title:
                              description: Company name. Present for `company` payers.
                              type: string
                            type:
                              type: string
                              enum:
                                - company
                                - user
                              description: >-
                                Whether the booking was paid by a company or by
                                a user. Defaults to `user` for a personal card
                                payment, which records no payer of its own.
                          required:
                            - type
                          additionalProperties: false
                          description: Customer whose credits were spent.
                      required:
                        - customer
                      additionalProperties: false
                    dayPasses:
                      description: Set when `type` is `dayPasses`.
                      type: object
                      properties:
                        customer:
                          type: object
                          properties:
                            id:
                              description: >-
                                Customer id. Absent when the payer record is no
                                longer available.
                              type: string
                              format: uuid
                            location:
                              description: Location the payer belongs to.
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                  description: Location id.
                                title:
                                  description: Location display name.
                                  type: string
                              required:
                                - id
                              additionalProperties: false
                            name:
                              description: First name. Present for `user` payers.
                              nullable: true
                              type: string
                            surname:
                              description: Last name. Present for `user` payers.
                              nullable: true
                              type: string
                            title:
                              description: Company name. Present for `company` payers.
                              type: string
                            type:
                              type: string
                              enum:
                                - company
                                - user
                              description: >-
                                Whether the booking was paid by a company or by
                                a user. Defaults to `user` for a personal card
                                payment, which records no payer of its own.
                          required:
                            - type
                          additionalProperties: false
                          description: Customer whose day passes were spent.
                      required:
                        - customer
                      additionalProperties: false
                    external:
                      description: Set when `type` is `external`.
                      type: object
                      properties:
                        customer:
                          type: object
                          properties:
                            id:
                              description: >-
                                Customer id. Absent when the payer record is no
                                longer available.
                              type: string
                              format: uuid
                            location:
                              description: Location the payer belongs to.
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                  description: Location id.
                                title:
                                  description: Location display name.
                                  type: string
                              required:
                                - id
                              additionalProperties: false
                            name:
                              description: First name. Present for `user` payers.
                              nullable: true
                              type: string
                            surname:
                              description: Last name. Present for `user` payers.
                              nullable: true
                              type: string
                            title:
                              description: Company name. Present for `company` payers.
                              type: string
                            type:
                              type: string
                              enum:
                                - company
                                - user
                              description: >-
                                Whether the booking was paid by a company or by
                                a user. Defaults to `user` for a personal card
                                payment, which records no payer of its own.
                          required:
                            - type
                          additionalProperties: false
                          description: Customer who paid outside of Spacebring.
                      required:
                        - customer
                      additionalProperties: false
                    invoice:
                      description: Set when `type` is `invoice`.
                      type: object
                      properties:
                        customer:
                          type: object
                          properties:
                            id:
                              description: >-
                                Customer id. Absent when the payer record is no
                                longer available.
                              type: string
                              format: uuid
                            location:
                              description: Location the payer belongs to.
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                  description: Location id.
                                title:
                                  description: Location display name.
                                  type: string
                              required:
                                - id
                              additionalProperties: false
                            name:
                              description: First name. Present for `user` payers.
                              nullable: true
                              type: string
                            surname:
                              description: Last name. Present for `user` payers.
                              nullable: true
                              type: string
                            title:
                              description: Company name. Present for `company` payers.
                              type: string
                            type:
                              type: string
                              enum:
                                - company
                                - user
                              description: >-
                                Whether the booking was paid by a company or by
                                a user. Defaults to `user` for a personal card
                                payment, which records no payer of its own.
                          required:
                            - type
                          additionalProperties: false
                          description: Customer the booking was invoiced to.
                        invoiceItemRef:
                          description: ID of the invoice item the booking was billed on.
                          type: string
                        subscriptionRef:
                          description: Subscription the invoice item belongs to.
                          type: string
                          format: uuid
                      required:
                        - customer
                      additionalProperties: false
                    paymentGateway:
                      description: Set when `type` is `paymentGateway`.
                      type: object
                      properties:
                        customer:
                          type: object
                          properties:
                            id:
                              description: >-
                                Customer id. Absent when the payer record is no
                                longer available.
                              type: string
                              format: uuid
                            location:
                              description: Location the payer belongs to.
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                  description: Location id.
                                title:
                                  description: Location display name.
                                  type: string
                              required:
                                - id
                              additionalProperties: false
                            name:
                              description: First name. Present for `user` payers.
                              nullable: true
                              type: string
                            surname:
                              description: Last name. Present for `user` payers.
                              nullable: true
                              type: string
                            title:
                              description: Company name. Present for `company` payers.
                              type: string
                            type:
                              type: string
                              enum:
                                - company
                                - user
                              description: >-
                                Whether the booking was paid by a company or by
                                a user. Defaults to `user` for a personal card
                                payment, which records no payer of its own.
                          required:
                            - type
                          additionalProperties: false
                          description: Customer who was charged.
                        gateway:
                          description: Payment gateway that processed the charge.
                          type: string
                          enum:
                            - authorizenet
                            - flow
                            - fondy
                            - freedompay
                            - hyperpay
                            - kakaopay
                            - maya
                            - mercadopago
                            - mollie
                            - paypal
                            - paystack
                            - payway
                            - plata
                            - stripe
                            - tap
                            - wayforpay
                            - xendit
                        label:
                          description: Saved payment method label, e.g. `Visa •••• 4242`.
                          type: string
                        mask:
                          description: Masked payment method identifier.
                          type: string
                        title:
                          description: Display name of the payment gateway, e.g. `Stripe`.
                          type: string
                      required:
                        - customer
                      additionalProperties: false
                    type:
                      type: string
                      enum:
                        - credits
                        - dayPasses
                        - external
                        - invoice
                        - paymentGateway
                      description: >-
                        How the booking was paid for. The matching property
                        below carries the details.
                  required:
                    - type
                  additionalProperties: false
                  description: How the booking was paid for, and by whom.
                price:
                  description: What the booking was charged.
                  type: object
                  properties:
                    credits:
                      description: Set when `type` is `credits`.
                      type: object
                      properties:
                        expiringAmount:
                          description: >-
                            Expiring credits charged. Omitted on a
                            per-transaction entry, which records no split.
                          type: number
                        permanentAmount:
                          description: >-
                            Permanent credits charged. Omitted on a
                            per-transaction entry, which records no split.
                          type: number
                        totalAmount:
                          type: number
                          description: Total credits charged.
                      required:
                        - totalAmount
                      additionalProperties: false
                    dayPasses:
                      description: Set when `type` is `dayPasses`.
                      type: object
                      properties:
                        expiringAmount:
                          description: >-
                            Expiring day passes charged. Omitted on a
                            per-transaction entry, which records no split.
                          type: number
                        permanentAmount:
                          description: >-
                            Permanent day passes charged. Omitted on a
                            per-transaction entry, which records no split.
                          type: number
                        totalAmount:
                          type: number
                          description: Total day passes charged.
                      required:
                        - totalAmount
                      additionalProperties: false
                    money:
                      description: Set when `type` is `money`.
                      type: object
                      properties:
                        currencyCode:
                          type: string
                          description: ISO 4217 currency code.
                        grossAmount:
                          type: number
                          description: Total amount charged, tax included.
                        taxIsInclusive:
                          description: >-
                            Whether the resource price already contained the
                            tax, rather than the tax being added on top of it.
                            Together with `taxRate` it is what splits
                            `grossAmount` into its net and tax parts. Omitted
                            when the location charges no tax.
                          type: boolean
                        taxRate:
                          description: >-
                            Tax rate applied, in percent. Omitted when the
                            location charges no tax.
                          type: number
                      required:
                        - grossAmount
                      additionalProperties: false
                    type:
                      type: string
                      enum:
                        - credits
                        - dayPasses
                        - money
                      description: What the booking was charged in.
                  required:
                    - type
                  additionalProperties: false
                refundable:
                  description: >-
                    Whether the payment can still be refunded. Omitted for
                    `invoice` payments, where refundability depends on the
                    invoice.
                  type: boolean
                refunds:
                  description: >-
                    Refunds made against the payment. Omitted when nothing was
                    refunded.
                  type: object
                  properties:
                    credits:
                      description: Set when `type` is `credits`.
                      type: array
                      items:
                        type: object
                        properties:
                          amountExpiring:
                            type: number
                            deprecated: true
                            description: >-
                              Deprecated. Use `amounts` instead, which reports
                              the expiring balances the refund returned to
                              individually.
                          amountPermanent:
                            type: number
                            deprecated: true
                            description: Deprecated. Use `amounts` instead.
                          amountTotal:
                            type: number
                            description: Total amount returned by this refund.
                          amounts:
                            description: >-
                              Balance buckets the refund returned to, one entry
                              each. Absent on a refund made before the buckets
                              were recorded, where only the amounts above are
                              known.
                            type: array
                            items:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  description: Amount returned to this balance bucket.
                                expirationDate:
                                  description: >-
                                    Expiration date of the expiring balance the
                                    amount was returned to.
                                  type: string
                                  format: date-time
                                subscriptionRef:
                                  description: >-
                                    Subscription the expiring balance belongs
                                    to.
                                  type: string
                                  format: uuid
                                type:
                                  type: string
                                  enum:
                                    - expiring
                                    - permanent
                                  description: Balance bucket type.
                              required:
                                - amount
                                - type
                              additionalProperties: false
                          createDate:
                            description: ISO timestamp of when the refund was made.
                            type: string
                            format: date-time
                          id:
                            description: Refund transaction id.
                            type: string
                        required:
                          - amountExpiring
                          - amountPermanent
                          - amountTotal
                        additionalProperties: false
                    dayPasses:
                      description: Set when `type` is `dayPasses`.
                      type: array
                      items:
                        type: object
                        properties:
                          amountExpiring:
                            type: number
                            deprecated: true
                            description: >-
                              Deprecated. Use `amounts` instead, which reports
                              the expiring balances the refund returned to
                              individually.
                          amountPermanent:
                            type: number
                            deprecated: true
                            description: Deprecated. Use `amounts` instead.
                          amountTotal:
                            type: number
                            description: Total amount returned by this refund.
                          amounts:
                            description: >-
                              Balance buckets the refund returned to, one entry
                              each. Absent on a refund made before the buckets
                              were recorded, where only the amounts above are
                              known.
                            type: array
                            items:
                              type: object
                              properties:
                                amount:
                                  type: number
                                  description: Amount returned to this balance bucket.
                                expirationDate:
                                  description: >-
                                    Expiration date of the expiring balance the
                                    amount was returned to.
                                  type: string
                                  format: date-time
                                subscriptionRef:
                                  description: >-
                                    Subscription the expiring balance belongs
                                    to.
                                  type: string
                                  format: uuid
                                type:
                                  type: string
                                  enum:
                                    - expiring
                                    - permanent
                                  description: Balance bucket type.
                              required:
                                - amount
                                - type
                              additionalProperties: false
                          createDate:
                            description: ISO timestamp of when the refund was made.
                            type: string
                            format: date-time
                          id:
                            description: Refund transaction id.
                            type: string
                        required:
                          - amountExpiring
                          - amountPermanent
                          - amountTotal
                        additionalProperties: false
                    money:
                      description: Set when `type` is `money`.
                      type: array
                      items:
                        type: object
                        properties:
                          createDate:
                            description: ISO timestamp of when the refund was made.
                            type: string
                            format: date-time
                          currencyCode:
                            type: string
                            description: ISO 4217 currency code.
                          grossAmount:
                            type: number
                            description: Gross amount returned by this refund.
                          id:
                            description: Refund transaction id.
                            type: string
                        required:
                          - grossAmount
                        additionalProperties: false
                    type:
                      type: string
                      enum:
                        - credits
                        - dayPasses
                        - money
                      description: What was refunded.
                  required:
                    - type
                  additionalProperties: false
                request:
                  description: >-
                    Set for a pending gateway payment the current user still has
                    to complete.
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: Payment request id.
                    url:
                      type: string
                      description: Relative URL the payer opens to complete the payment.
                  required:
                    - id
                    - url
                  additionalProperties: false
                scheduleDate:
                  description: ISO timestamp of when a scheduled payment will be charged.
                  type: string
                  format: date-time
                status:
                  description: Payment status.
                  type: string
                  enum:
                    - succeeded
                    - failed
                    - pending
                    - processing
                    - canceled
                surcharge:
                  description: Surcharge added on top of the price, if any.
                  type: object
                  properties:
                    money:
                      type: object
                      properties:
                        amount:
                          description: Surcharge amount.
                          type: number
                        currencyCode:
                          type: string
                          description: ISO 4217 currency code.
                        percentage:
                          description: Surcharge percentage applied.
                          type: number
                        rate:
                          description: Surcharge rate.
                          type: number
                      additionalProperties: false
                    type:
                      type: string
                      enum:
                        - money
                      description: Surcharge type.
                  required:
                    - money
                    - type
                  additionalProperties: false
                transactionRef:
                  description: ID of the transaction the payment was recorded as.
                  type: string
                type:
                  description: >-
                    Shorthand for the payment method: the gateway slug for
                    `paymentGateway` payments, otherwise `method.type`.
                  type: string
              required:
                - method
              additionalProperties: false
            payments:
              description: >-
                How the booking was paid for, oldest first. One entry per
                settling transaction, so a credits or day passes payment that
                was charged and later partly refunded lists each transaction
                separately. Omitted when the caller has no access.
              type: array
              items:
                type: object
                properties:
                  createDate:
                    description: ISO timestamp of when the payment was made.
                    type: string
                    format: date-time
                  discounts:
                    description: Discounts applied to the price. Omitted when none applied.
                    type: array
                    items:
                      type: object
                      properties:
                        coupon:
                          type: object
                          properties:
                            amountOff:
                              description: Fixed discount amount, in the coupon's currency.
                              type: number
                            currencyCode:
                              description: Currency code for amountOff.
                              type: string
                            id:
                              description: Coupon id.
                              type: string
                            percentOff:
                              description: Percentage discount amount.
                              type: number
                            productTypes:
                              description: Product types this coupon applies to.
                              type: array
                              items:
                                type: string
                            type:
                              description: Coupon type.
                              type: string
                          additionalProperties: false
                          description: Applied coupon.
                        promocode:
                          description: Applied promocode.
                          type: object
                          properties:
                            code:
                              type: string
                              description: >-
                                Promocode string, the way a purchase references
                                the promocode back.
                            expiration:
                              description: Promocode expiration.
                              type: object
                              properties:
                                date:
                                  description: ISO timestamp of when the promocode expires.
                                  type: string
                                enabled:
                                  type: boolean
                                  description: Whether the promocode expires.
                              required:
                                - enabled
                              additionalProperties: false
                            id:
                              type: string
                              description: Promocode id.
                            limitByFirstPurchase:
                              description: >-
                                Whether the promocode is limited to a first
                                purchase.
                              type: boolean
                          required:
                            - code
                            - id
                          additionalProperties: false
                        subscriptionId:
                          description: Subscription the discount was granted by.
                          type: string
                      required:
                        - coupon
                      additionalProperties: false
                      description: Discount recorded on a settled payment.
                  dispute:
                    description: Chargeback dispute raised against the payment, if any.
                    type: object
                    properties:
                      createDate:
                        type: string
                        format: date-time
                        description: ISO timestamp of when the dispute was opened.
                    additionalProperties: false
                  method:
                    type: object
                    properties:
                      credits:
                        description: Set when `type` is `credits`.
                        type: object
                        properties:
                          customer:
                            type: object
                            properties:
                              id:
                                description: >-
                                  Customer id. Absent when the payer record is
                                  no longer available.
                                type: string
                                format: uuid
                              location:
                                description: Location the payer belongs to.
                                type: object
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                    description: Location id.
                                  title:
                                    description: Location display name.
                                    type: string
                                required:
                                  - id
                                additionalProperties: false
                              name:
                                description: First name. Present for `user` payers.
                                nullable: true
                                type: string
                              surname:
                                description: Last name. Present for `user` payers.
                                nullable: true
                                type: string
                              title:
                                description: Company name. Present for `company` payers.
                                type: string
                              type:
                                type: string
                                enum:
                                  - company
                                  - user
                                description: >-
                                  Whether the booking was paid by a company or
                                  by a user. Defaults to `user` for a personal
                                  card payment, which records no payer of its
                                  own.
                            required:
                              - type
                            additionalProperties: false
                            description: Customer whose credits were spent.
                        required:
                          - customer
                        additionalProperties: false
                      dayPasses:
                        description: Set when `type` is `dayPasses`.
                        type: object
                        properties:
                          customer:
                            type: object
                            properties:
                              id:
                                description: >-
                                  Customer id. Absent when the payer record is
                                  no longer available.
                                type: string
                                format: uuid
                              location:
                                description: Location the payer belongs to.
                                type: object
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                    description: Location id.
                                  title:
                                    description: Location display name.
                                    type: string
                                required:
                                  - id
                                additionalProperties: false
                              name:
                                description: First name. Present for `user` payers.
                                nullable: true
                                type: string
                              surname:
                                description: Last name. Present for `user` payers.
                                nullable: true
                                type: string
                              title:
                                description: Company name. Present for `company` payers.
                                type: string
                              type:
                                type: string
                                enum:
                                  - company
                                  - user
                                description: >-
                                  Whether the booking was paid by a company or
                                  by a user. Defaults to `user` for a personal
                                  card payment, which records no payer of its
                                  own.
                            required:
                              - type
                            additionalProperties: false
                            description: Customer whose day passes were spent.
                        required:
                          - customer
                        additionalProperties: false
                      external:
                        description: Set when `type` is `external`.
                        type: object
                        properties:
                          customer:
                            type: object
                            properties:
                              id:
                                description: >-
                                  Customer id. Absent when the payer record is
                                  no longer available.
                                type: string
                                format: uuid
                              location:
                                description: Location the payer belongs to.
                                type: object
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                    description: Location id.
                                  title:
                                    description: Location display name.
                                    type: string
                                required:
                                  - id
                                additionalProperties: false
                              name:
                                description: First name. Present for `user` payers.
                                nullable: true
                                type: string
                              surname:
                                description: Last name. Present for `user` payers.
                                nullable: true
                                type: string
                              title:
                                description: Company name. Present for `company` payers.
                                type: string
                              type:
                                type: string
                                enum:
                                  - company
                                  - user
                                description: >-
                                  Whether the booking was paid by a company or
                                  by a user. Defaults to `user` for a personal
                                  card payment, which records no payer of its
                                  own.
                            required:
                              - type
                            additionalProperties: false
                            description: Customer who paid outside of Spacebring.
                        required:
                          - customer
                        additionalProperties: false
                      invoice:
                        description: Set when `type` is `invoice`.
                        type: object
                        properties:
                          customer:
                            type: object
                            properties:
                              id:
                                description: >-
                                  Customer id. Absent when the payer record is
                                  no longer available.
                                type: string
                                format: uuid
                              location:
                                description: Location the payer belongs to.
                                type: object
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                    description: Location id.
                                  title:
                                    description: Location display name.
                                    type: string
                                required:
                                  - id
                                additionalProperties: false
                              name:
                                description: First name. Present for `user` payers.
                                nullable: true
                                type: string
                              surname:
                                description: Last name. Present for `user` payers.
                                nullable: true
                                type: string
                              title:
                                description: Company name. Present for `company` payers.
                                type: string
                              type:
                                type: string
                                enum:
                                  - company
                                  - user
                                description: >-
                                  Whether the booking was paid by a company or
                                  by a user. Defaults to `user` for a personal
                                  card payment, which records no payer of its
                                  own.
                            required:
                              - type
                            additionalProperties: false
                            description: Customer the booking was invoiced to.
                          invoiceItemRef:
                            description: ID of the invoice item the booking was billed on.
                            type: string
                          subscriptionRef:
                            description: Subscription the invoice item belongs to.
                            type: string
                            format: uuid
                        required:
                          - customer
                        additionalProperties: false
                      paymentGateway:
                        description: Set when `type` is `paymentGateway`.
                        type: object
                        properties:
                          customer:
                            type: object
                            properties:
                              id:
                                description: >-
                                  Customer id. Absent when the payer record is
                                  no longer available.
                                type: string
                                format: uuid
                              location:
                                description: Location the payer belongs to.
                                type: object
                                properties:
                                  id:
                                    type: string
                                    format: uuid
                                    description: Location id.
                                  title:
                                    description: Location display name.
                                    type: string
                                required:
                                  - id
                                additionalProperties: false
                              name:
                                description: First name. Present for `user` payers.
                                nullable: true
                                type: string
                              surname:
                                description: Last name. Present for `user` payers.
                                nullable: true
                                type: string
                              title:
                                description: Company name. Present for `company` payers.
                                type: string
                              type:
                                type: string
                                enum:
                                  - company
                                  - user
                                description: >-
                                  Whether the booking was paid by a company or
                                  by a user. Defaults to `user` for a personal
                                  card payment, which records no payer of its
                                  own.
                            required:
                              - type
                            additionalProperties: false
                            description: Customer who was charged.
                          gateway:
                            description: Payment gateway that processed the charge.
                            type: string
                            enum:
                              - authorizenet
                              - flow
                              - fondy
                              - freedompay
                              - hyperpay
                              - kakaopay
                              - maya
                              - mercadopago
                              - mollie
                              - paypal
                              - paystack
                              - payway
                              - plata
                              - stripe
                              - tap
                              - wayforpay
                              - xendit
                          label:
                            description: Saved payment method label, e.g. `Visa •••• 4242`.
                            type: string
                          mask:
                            description: Masked payment method identifier.
                            type: string
                          title:
                            description: >-
                              Display name of the payment gateway, e.g.
                              `Stripe`.
                            type: string
                        required:
                          - customer
                        additionalProperties: false
                      type:
                        type: string
                        enum:
                          - credits
                          - dayPasses
                          - external
                          - invoice
                          - paymentGateway
                        description: >-
                          How the booking was paid for. The matching property
                          below carries the details.
                    required:
                      - type
                    additionalProperties: false
                    description: How the booking was paid for, and by whom.
                  price:
                    description: What the booking was charged.
                    type: object
                    properties:
                      credits:
                        description: Set when `type` is `credits`.
                        type: object
                        properties:
                          expiringAmount:
                            description: >-
                              Expiring credits charged. Omitted on a
                              per-transaction entry, which records no split.
                            type: number
                          permanentAmount:
                            description: >-
                              Permanent credits charged. Omitted on a
                              per-transaction entry, which records no split.
                            type: number
                          totalAmount:
                            type: number
                            description: Total credits charged.
                        required:
                          - totalAmount
                        additionalProperties: false
                      dayPasses:
                        description: Set when `type` is `dayPasses`.
                        type: object
                        properties:
                          expiringAmount:
                            description: >-
                              Expiring day passes charged. Omitted on a
                              per-transaction entry, which records no split.
                            type: number
                          permanentAmount:
                            description: >-
                              Permanent day passes charged. Omitted on a
                              per-transaction entry, which records no split.
                            type: number
                          totalAmount:
                            type: number
                            description: Total day passes charged.
                        required:
                          - totalAmount
                        additionalProperties: false
                      money:
                        description: Set when `type` is `money`.
                        type: object
                        properties:
                          currencyCode:
                            type: string
                            description: ISO 4217 currency code.
                          grossAmount:
                            type: number
                            description: Total amount charged, tax included.
                          taxIsInclusive:
                            description: >-
                              Whether the resource price already contained the
                              tax, rather than the tax being added on top of it.
                              Together with `taxRate` it is what splits
                              `grossAmount` into its net and tax parts. Omitted
                              when the location charges no tax.
                            type: boolean
                          taxRate:
                            description: >-
                              Tax rate applied, in percent. Omitted when the
                              location charges no tax.
                            type: number
                        required:
                          - grossAmount
                        additionalProperties: false
                      type:
                        type: string
                        enum:
                          - credits
                          - dayPasses
                          - money
                        description: What the booking was charged in.
                    required:
                      - type
                    additionalProperties: false
                  refundable:
                    description: >-
                      Whether the payment can still be refunded. Omitted for
                      `invoice` payments, where refundability depends on the
                      invoice.
                    type: boolean
                  refunds:
                    description: >-
                      Refunds made against the payment. Omitted when nothing was
                      refunded.
                    type: object
                    properties:
                      credits:
                        description: Set when `type` is `credits`.
                        type: array
                        items:
                          type: object
                          properties:
                            amountExpiring:
                              type: number
                              deprecated: true
                              description: >-
                                Deprecated. Use `amounts` instead, which reports
                                the expiring balances the refund returned to
                                individually.
                            amountPermanent:
                              type: number
                              deprecated: true
                              description: Deprecated. Use `amounts` instead.
                            amountTotal:
                              type: number
                              description: Total amount returned by this refund.
                            amounts:
                              description: >-
                                Balance buckets the refund returned to, one
                                entry each. Absent on a refund made before the
                                buckets were recorded, where only the amounts
                                above are known.
                              type: array
                              items:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: Amount returned to this balance bucket.
                                  expirationDate:
                                    description: >-
                                      Expiration date of the expiring balance
                                      the amount was returned to.
                                    type: string
                                    format: date-time
                                  subscriptionRef:
                                    description: >-
                                      Subscription the expiring balance belongs
                                      to.
                                    type: string
                                    format: uuid
                                  type:
                                    type: string
                                    enum:
                                      - expiring
                                      - permanent
                                    description: Balance bucket type.
                                required:
                                  - amount
                                  - type
                                additionalProperties: false
                            createDate:
                              description: ISO timestamp of when the refund was made.
                              type: string
                              format: date-time
                            id:
                              description: Refund transaction id.
                              type: string
                          required:
                            - amountExpiring
                            - amountPermanent
                            - amountTotal
                          additionalProperties: false
                      dayPasses:
                        description: Set when `type` is `dayPasses`.
                        type: array
                        items:
                          type: object
                          properties:
                            amountExpiring:
                              type: number
                              deprecated: true
                              description: >-
                                Deprecated. Use `amounts` instead, which reports
                                the expiring balances the refund returned to
                                individually.
                            amountPermanent:
                              type: number
                              deprecated: true
                              description: Deprecated. Use `amounts` instead.
                            amountTotal:
                              type: number
                              description: Total amount returned by this refund.
                            amounts:
                              description: >-
                                Balance buckets the refund returned to, one
                                entry each. Absent on a refund made before the
                                buckets were recorded, where only the amounts
                                above are known.
                              type: array
                              items:
                                type: object
                                properties:
                                  amount:
                                    type: number
                                    description: Amount returned to this balance bucket.
                                  expirationDate:
                                    description: >-
                                      Expiration date of the expiring balance
                                      the amount was returned to.
                                    type: string
                                    format: date-time
                                  subscriptionRef:
                                    description: >-
                                      Subscription the expiring balance belongs
                                      to.
                                    type: string
                                    format: uuid
                                  type:
                                    type: string
                                    enum:
                                      - expiring
                                      - permanent
                                    description: Balance bucket type.
                                required:
                                  - amount
                                  - type
                                additionalProperties: false
                            createDate:
                              description: ISO timestamp of when the refund was made.
                              type: string
                              format: date-time
                            id:
                              description: Refund transaction id.
                              type: string
                          required:
                            - amountExpiring
                            - amountPermanent
                            - amountTotal
                          additionalProperties: false
                      money:
                        description: Set when `type` is `money`.
                        type: array
                        items:
                          type: object
                          properties:
                            createDate:
                              description: ISO timestamp of when the refund was made.
                              type: string
                              format: date-time
                            currencyCode:
                              type: string
                              description: ISO 4217 currency code.
                            grossAmount:
                              type: number
                              description: Gross amount returned by this refund.
                            id:
                              description: Refund transaction id.
                              type: string
                          required:
                            - grossAmount
                          additionalProperties: false
                      type:
                        type: string
                        enum:
                          - credits
                          - dayPasses
                          - money
                        description: What was refunded.
                    required:
                      - type
                    additionalProperties: false
                  request:
                    description: >-
                      Set for a pending gateway payment the current user still
                      has to complete.
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Payment request id.
                      url:
                        type: string
                        description: Relative URL the payer opens to complete the payment.
                    required:
                      - id
                      - url
                    additionalProperties: false
                  scheduleDate:
                    description: ISO timestamp of when a scheduled payment will be charged.
                    type: string
                    format: date-time
                  status:
                    description: Payment status.
                    type: string
                    enum:
                      - succeeded
                      - failed
                      - pending
                      - processing
                      - canceled
                  surcharge:
                    description: Surcharge added on top of the price, if any.
                    type: object
                    properties:
                      money:
                        type: object
                        properties:
                          amount:
                            description: Surcharge amount.
                            type: number
                          currencyCode:
                            type: string
                            description: ISO 4217 currency code.
                          percentage:
                            description: Surcharge percentage applied.
                            type: number
                          rate:
                            description: Surcharge rate.
                            type: number
                        additionalProperties: false
                      type:
                        type: string
                        enum:
                          - money
                        description: Surcharge type.
                    required:
                      - money
                      - type
                    additionalProperties: false
                  transactionRef:
                    description: ID of the transaction the payment was recorded as.
                    type: string
                  type:
                    description: >-
                      Shorthand for the payment method: the gateway slug for
                      `paymentGateway` payments, otherwise `method.type`.
                    type: string
                required:
                  - method
                additionalProperties: false
            resourceRef:
              type: string
              format: uuid
              description: ID of the booked resource.
            seats:
              description: Number of seats reserved.
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            startDate:
              type: string
              format: date-time
              description: ISO timestamp when the booking starts.
            title:
              description: >-
                Custom booking title. Omitted when the owner has restricted
                title visibility.
              type: string
            updateDate:
              description: ISO timestamp when the booking was last updated.
              type: string
              format: date-time
            userOwner:
              description: >-
                Profile of the booking owner. Omitted when the owner has
                restricted visibility.
              type: object
              properties:
                about:
                  description: Short bio of the user.
                  nullable: true
                  type: string
                company:
                  description: Company the user belongs to, if any.
                  nullable: true
                  type: object
                  properties:
                    title:
                      type: string
                      description: Company display name.
                  required:
                    - title
                  additionalProperties: false
                email:
                  description: Email address of the user.
                  nullable: true
                  type: string
                  format: email
                id:
                  type: string
                  format: uuid
                  description: Unique identifier of the user.
                name:
                  description: First name of the user.
                  nullable: true
                  type: string
                phoneNumber:
                  description: Phone number of the user.
                  nullable: true
                  type: string
                photoUrl:
                  nullable: true
                  description: Profile photo URL of the user.
                  type: string
                surname:
                  description: Last name of the user.
                  nullable: true
                  type: string
              required:
                - id
              additionalProperties: false
          required:
            - attendees
            - createDate
            - endDate
            - id
            - resourceRef
            - startDate
      required:
        - booking
      additionalProperties: false
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read contracts, credit notes, discounts and invoices
            invoices: Read and write contract, credit notes, discounts and invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````