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

# Get a booking with its services, participants, notes, reports and party names

> The booking plus everything hanging off it — service lines, participants, notes and attendance reports — in one call. This is the shape for a booking detail screen; assembling it from five separate endpoints is slower and can tear if something changes mid-sequence. `reports` holds at most two rows, one per side; see POST /bookings/{bookingId}/reports for what a report asserts.

`parties` carries both sides with their display names resolved, so a page can render "How was your booking with Javier?" without a second call — and there is no public endpoint that turns a `clientId` into a name, so this is the only way to get one. It is available immediately, before any review exists. `parties.supplier` is `null` when no supplier is assigned, and each `fullName` is best-effort: a party whose profile cannot be resolved keeps its bare id rather than failing the call. Names only — no email address is returned for either party.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/projects/{projectId}/bookings/{bookingId}/aggregate
openapi: 3.0.0
info:
  title: MarketBox 2.0 Open API
  version: 1.0.0
  description: >-
    The MarketBox public API for building booking experiences. Core model:
    create an order, then draw its order items down into bookings. Single
    bookings reference an order item per service line; package bookings draw one
    PACKAGE item down across N sessions. To schedule a package, build a slate
    (POST /availability/package-slate) and book it by slateId (POST
    /orders/{orderId}/package-bookings). See the guides for end-to-end
    walkthroughs.
  contact:
    name: MarketBox support
servers:
  - url: https://apiv2.gomarketbox.com
    description: MarketBox Open API
security:
  - ApiKeyAuth: []
paths:
  /v1/projects/{projectId}/bookings/{bookingId}/aggregate:
    get:
      tags:
        - Bookings
      summary: >-
        Get a booking with its services, participants, notes, reports and party
        names
      description: >-
        The booking plus everything hanging off it — service lines,
        participants, notes and attendance reports — in one call. This is the
        shape for a booking detail screen; assembling it from five separate
        endpoints is slower and can tear if something changes mid-sequence.
        `reports` holds at most two rows, one per side; see POST
        /bookings/{bookingId}/reports for what a report asserts.


        `parties` carries both sides with their display names resolved, so a
        page can render "How was your booking with Javier?" without a second
        call — and there is no public endpoint that turns a `clientId` into a
        name, so this is the only way to get one. It is available immediately,
        before any review exists. `parties.supplier` is `null` when no supplier
        is assigned, and each `fullName` is best-effort: a party whose profile
        cannot be resolved keeps its bare id rather than failing the call. Names
        only — no email address is returned for either party.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              The project (tenant) that owns the resource. Every resource in
              this API is scoped to a project, and your API key is restricted to
              the projects it was issued for — a project outside that scope
              returns 403.
            example: prj_01kv60qgnef2kt3pvqgwmkbzfr
          required: true
          description: >-
            The project (tenant) that owns the resource. Every resource in this
            API is scoped to a project, and your API key is restricted to the
            projects it was issued for — a project outside that scope returns
            403.
          name: projectId
          in: path
        - schema:
            type: string
            minLength: 1
            description: >-
              The booking — one scheduled unit of service occupying supplier
              time.
            example: bk_01kv7q41n2hbqxwm03ymn7bxl9
          required: true
          description: The booking — one scheduled unit of service occupying supplier time.
          name: bookingId
          in: path
      responses:
        '200':
          description: Booking aggregate
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      booking:
                        $ref: '#/components/schemas/Booking'
                      services:
                        type: array
                        items:
                          type: object
                          properties:
                            projectId:
                              type: string
                            bookingId:
                              type: string
                            bookingServiceId:
                              type: string
                            businessModelType:
                              type: string
                              enum:
                                - SINGLE_BOOKING
                                - PACKAGE
                                - SCHEDULED_PACKAGE
                                - SCHEDULED_SUBSCRIPTION
                                - FLEXIBLE_SUBSCRIPTION
                              description: >-
                                How the service is sold. SINGLE_BOOKING is one
                                booking at a time; PACKAGE sells prepaid credits
                                drawn down by later bookings; the SCHEDULED_*
                                and FLEXIBLE_* variants add recurrence and
                                subscription billing. This drives which order
                                item skuType applies.
                            offeringSnapshot:
                              type: object
                              properties:
                                serviceId:
                                  type: string
                                  minLength: 1
                                offeringId:
                                  type: string
                                  minLength: 1
                                name:
                                  type: object
                                  additionalProperties:
                                    type: string
                                price:
                                  $ref: '#/components/schemas/Money'
                                duration:
                                  oneOf:
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - FIXED
                                        minutes:
                                          type: integer
                                          minimum: 0
                                          exclusiveMinimum: true
                                      required:
                                        - type
                                        - minutes
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - FLEXIBLE
                                        defaultMinutes:
                                          type: integer
                                          minimum: 0
                                          exclusiveMinimum: true
                                        minMinutes:
                                          type: integer
                                          minimum: 0
                                          exclusiveMinimum: true
                                        stepMinutes:
                                          type: integer
                                          minimum: 0
                                          exclusiveMinimum: true
                                        pricePerStep:
                                          $ref: '#/components/schemas/Money'
                                      required:
                                        - type
                                        - defaultMinutes
                                        - minMinutes
                                        - stepMinutes
                                attributeValues:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      attributeId:
                                        type: string
                                        minLength: 1
                                      attributeNameSnapshot:
                                        type: object
                                        additionalProperties:
                                          type: string
                                      attributeType:
                                        type: string
                                        enum:
                                          - STRING
                                          - NUMBER
                                          - ENUM
                                        description: >-
                                          Value type of a service attribute. ENUM
                                          attributes carry an allowed-values list.
                                      value:
                                        anyOf:
                                          - type: object
                                            additionalProperties:
                                              type: string
                                          - type: number
                                          - type: string
                                      valueId:
                                        type: string
                                    required:
                                      - attributeId
                                      - attributeNameSnapshot
                                      - attributeType
                              required:
                                - serviceId
                                - offeringId
                                - price
                                - duration
                                - attributeValues
                            quantity:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                            durationMinutes:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                            unitPrice:
                              $ref: '#/components/schemas/Money'
                            lineAmount:
                              $ref: '#/components/schemas/Money'
                            status:
                              type: string
                              enum:
                                - SCHEDULED
                                - IN_PROGRESS
                                - COMPLETED
                                - CANCELLED
                                - NO_SHOW
                            deleted:
                              type: boolean
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            createdBy:
                              type: string
                            updatedBy:
                              type: string
                          required:
                            - projectId
                            - bookingId
                            - bookingServiceId
                            - businessModelType
                            - offeringSnapshot
                            - quantity
                            - durationMinutes
                            - unitPrice
                            - lineAmount
                            - status
                            - deleted
                            - createdAt
                            - updatedAt
                            - createdBy
                            - updatedBy
                      participants:
                        type: array
                        items:
                          type: object
                          properties:
                            projectId:
                              type: string
                            bookingId:
                              type: string
                            clientId:
                              type: string
                            participantStatus:
                              type: string
                              enum:
                                - REGISTERED
                                - WAITLISTED
                                - CANCELLED
                                - NO_SHOW
                                - ATTENDED
                            checkInStatus:
                              type: string
                              enum:
                                - PENDING
                                - CHECKED_IN
                                - NO_SHOW
                            checkInAt:
                              type: string
                              nullable: true
                              format: date-time
                            registeredAt:
                              type: string
                              format: date-time
                            waitlistPosition:
                              type: integer
                              nullable: true
                              minimum: 0
                            deleted:
                              type: boolean
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            createdBy:
                              type: string
                            updatedBy:
                              type: string
                          required:
                            - projectId
                            - bookingId
                            - clientId
                            - participantStatus
                            - checkInStatus
                            - registeredAt
                            - deleted
                            - createdAt
                            - updatedAt
                            - createdBy
                            - updatedBy
                      notes:
                        type: array
                        items:
                          type: object
                          properties:
                            projectId:
                              type: string
                            bookingId:
                              type: string
                            noteId:
                              type: string
                            scope:
                              type: string
                              enum:
                                - BOOKING
                                - BOOKING_SERVICE
                            bookingServiceId:
                              type: string
                              nullable: true
                            noteText:
                              type: string
                              minLength: 1
                            deleted:
                              type: boolean
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            createdBy:
                              type: string
                            updatedBy:
                              type: string
                          required:
                            - projectId
                            - bookingId
                            - noteId
                            - scope
                            - noteText
                            - deleted
                            - createdAt
                            - updatedAt
                            - createdBy
                            - updatedBy
                      reports:
                        type: array
                        items:
                          $ref: '#/components/schemas/BookingReport'
                      parties:
                        type: object
                        properties:
                          client:
                            type: object
                            properties:
                              clientId:
                                type: string
                                description: The client on this booking.
                                example: cli_01kv60qge5eh59ap0gw0pqrrys
                              fullName:
                                type: string
                                description: >-
                                  Display name, resolved from the client
                                  profile. Best-effort: absent when the profile
                                  cannot be resolved, which is not an error —
                                  render the id instead.
                                example: Cara Client
                            required:
                              - clientId
                            description: >-
                              The client. Always present — every booking has
                              one.
                          supplier:
                            type: object
                            nullable: true
                            properties:
                              supplierId:
                                type: string
                                description: The supplier assigned to this booking.
                                example: sup_01kv60qge5eh59ap0gw0pqrrys
                              fullName:
                                type: string
                                description: >-
                                  Display name, resolved from the supplier
                                  profile. Best-effort: absent when the profile
                                  cannot be resolved, which is not an error —
                                  render the id instead.
                                example: Javier Supplier
                            required:
                              - supplierId
                            description: >-
                              `null` when no supplier is assigned yet — a legal
                              state for a booking, not an error.
                        required:
                          - client
                          - supplier
                    required:
                      - booking
                      - services
                      - participants
                      - notes
                      - reports
                      - parties
                required:
                  - data
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: API key cannot access this project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    Booking:
      type: object
      properties:
        projectId:
          type: string
        tenantId:
          type: string
        bookingId:
          type: string
        seriesId:
          type: string
          nullable: true
        occurrenceLocalDate:
          type: string
          nullable: true
        isException:
          type: boolean
        supplierId:
          type: string
          nullable: true
        clientId:
          type: string
        packageOrderItemId:
          type: string
          nullable: true
        bookingStartUtc:
          type: string
          format: date-time
        bookingEndUtc:
          type: string
          format: date-time
        bookingTz:
          type: string
        bookingLocalDate:
          type: string
        bookingLocalStartTime:
          type: string
        bookingLocalEndTime:
          type: string
        bookingLocalEndDate:
          type: string
        locale:
          type: string
        attribution:
          type: object
          properties:
            searchId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                The `searchId` of the MarketBox search response the buyer booked
                from — the `X-MB-Search-Id` header / body field of every search
                route. Stored as given; a value MarketBox never issued is kept
                but not trusted.
              example: srch_01k7q3x9h4e8rb2d6m0z5a7c1n
            sessionKey:
              type: string
              minLength: 1
              maxLength: 64
              description: >-
                The same opaque per-session key you send with site events, at
                most 64 characters. Never an email, IP or user id.
              example: sess-example-01
            surface:
              type: string
              enum:
                - home
                - results
                - listing
                - site_search
                - profile
                - widget
                - assistant
                - other
              description: Where on your site the buyer started the purchase.
              example: results
          additionalProperties: false
          description: >-
            Which search and site session this purchase came from. Optional; set
            once on the order and copied onto every booking it funds. See the
            search-log guide, "Booking attribution".
        locationType:
          type: string
          enum:
            - PHYSICAL
            - VIRTUAL
            - TRAVEL_ZONE
        locationId:
          type: string
          nullable: true
        latitude:
          type: number
          nullable: true
        longitude:
          type: number
          nullable: true
        address:
          $ref: '#/components/schemas/Address'
        capacity:
          type: integer
          minimum: 0
          exclusiveMinimum: true
        participantCount:
          type: integer
          minimum: 0
        waitlistCount:
          type: integer
          minimum: 0
        isGroupBooking:
          type: boolean
        status:
          type: string
          enum:
            - SCHEDULED
            - STARTED
            - AWAITING_CONFIRMATION
            - DISPUTED
            - COMPLETED
            - CANCELLED
            - CLIENT_NO_SHOW
            - SUPPLIER_NO_SHOW
            - NO_SHOW
        statusUpdatedAt:
          type: string
          format: date-time
        statusUpdatedBy:
          type: string
        statusUpdatedByCapacity:
          type: string
          enum:
            - ADMIN
            - SUPPLIER
            - CLIENT
            - SYSTEM
            - API
        cancellationReason:
          type: string
          nullable: true
        cancelledBy:
          type: string
          nullable: true
        cancellationInitiatedBy:
          type: string
          enum:
            - CLIENT
            - SUPPLIER
            - BUSINESS
        cancellationReasonCode:
          type: string
          enum:
            - CLIENT_REQUESTED
            - CLIENT_UNWELL
            - SUPPLIER_UNAVAILABLE
            - WEATHER
            - FACILITY_UNAVAILABLE
            - BOOKED_IN_ERROR
            - OTHER
        creditTreatment:
          type: string
          enum:
            - RETURN
            - FORFEIT
            - REFUND_ORIGINAL_PAYMENT
            - NOT_APPLICABLE
        durationOverrideMinutes:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 1440
        durationOverrideReason:
          type: string
          minLength: 1
          maxLength: 500
        counts:
          type: object
          properties:
            services:
              type: integer
              minimum: 0
            notes:
              type: integer
              minimum: 0
            participants:
              type: integer
              minimum: 0
          required:
            - services
            - notes
            - participants
        deleted:
          type: boolean
        version:
          type: integer
          minimum: 0
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        createdBy:
          type: string
        updatedBy:
          type: string
      required:
        - projectId
        - tenantId
        - bookingId
        - supplierId
        - clientId
        - bookingStartUtc
        - bookingEndUtc
        - bookingTz
        - bookingLocalDate
        - bookingLocalStartTime
        - bookingLocalEndTime
        - bookingLocalEndDate
        - locationType
        - locationId
        - latitude
        - longitude
        - address
        - capacity
        - participantCount
        - waitlistCount
        - isGroupBooking
        - status
        - statusUpdatedAt
        - counts
        - deleted
        - version
        - createdAt
        - updatedAt
        - createdBy
        - updatedBy
    Money:
      type: object
      properties:
        amount:
          type: integer
          minimum: 0
        currency:
          type: string
          minLength: 1
          maxLength: 3
      required:
        - amount
        - currency
    BookingReport:
      type: object
      properties:
        projectId:
          type: string
        bookingId:
          type: string
        reporterRole:
          type: string
          enum:
            - CLIENT
            - SUPPLIER
        reporterId:
          type: string
        reportType:
          type: string
          enum:
            - ATTENDANCE
        attended:
          type: boolean
        note:
          type: string
          maxLength: 1000
        deleted:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        createdBy:
          type: string
        updatedBy:
          type: string
      required:
        - projectId
        - bookingId
        - reporterRole
        - reporterId
        - reportType
        - attended
        - deleted
        - createdAt
        - updatedAt
        - createdBy
        - updatedBy
    ErrorMessage:
      type: object
      properties:
        code:
          type: string
          description: Stable machine-readable error code, e.g. NOT_FOUND.
        message:
          type: string
          description: Human-readable description of what went wrong.
        statusCode:
          type: integer
          description: The HTTP status code of this response.
        requestId:
          type: string
          description: >-
            The id of this request, also returned as the X-Request-Id header.
            Quote it in a support ticket.
      required:
        - code
        - message
        - statusCode
        - requestId
      example:
        code: NOT_FOUND
        message: Booking not found
        statusCode: 404
        requestId: a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10
    Address:
      type: object
      nullable: true
      properties:
        addressOneLine:
          type: string
          minLength: 1
          description: The whole address on one line, as a person would write it.
          example: 10 Main St, Toronto, ON M5V 1A1, Canada
        streetNumber:
          type: string
          minLength: 1
          description: The street number.
          example: '10'
        streetName:
          type: string
          minLength: 1
          description: The street name.
          example: Main St
        city:
          type: string
          minLength: 1
          description: The city or town.
          example: Toronto
        state:
          type: string
          minLength: 1
          description: The state, province or region; an ISO 3166-2 code when one matches.
          example: 'ON'
        country:
          type: string
          minLength: 1
          description: The country; ISO 3166-1 alpha-2, alpha-3 or the English name.
          example: CA
        zipCode:
          type: string
          minLength: 1
          description: The postal or ZIP code, in any national format.
          example: M5V 1A1
        unitNumber:
          type: string
          nullable: true
          description: The unit, suite or apartment, if any.
          example: 4B
      required:
        - addressOneLine
        - streetNumber
        - streetName
        - city
        - state
        - country
        - zipCode
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key minted in the MarketBox dashboard. Scope is restricted to the
        projects you select at creation time. Every route needs the key's
        standard API access (`*`) except `POST /v1/projects/{projectId}/events`,
        which needs `events:write`; a key without `*` is refused with 403
        `CAPABILITY_NOT_GRANTED`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.