> ## 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.

# Hold supplier time during checkout — a single session, or a whole package slate

> Claims supplier time so nobody else can book it while your client pays. Provide exactly one of: intervals (explicit supplier time — this is the form that works for a SINGLE session, with no package and no slate), slateId (hold every slot of a persisted package slate), or slotIds (cherry-pick slots of a slate). Every interval is claimed in ONE transaction, so a hold is all-or-nothing — you never end up holding 3 sessions of a 5-session package. Expiry is LAZY: nothing runs at heldUntil, the hold simply stops blocking, so convert before then. To HEARTBEAT a checkout page, re-post the same intervals AND the reservationId you were given (with the same heldBy): that EXTENDS the existing hold — heldUntil moves out, the same reservationId comes back, and no second hold is minted. Omitting reservationId always mints a NEW hold. Returns 409 with code SLOT_HELD/SLOT_BOOKED — naming the blocking reservationId or bookingId — when the time is already claimed, or RESERVATION_NOT_FOUND / RESERVATION_NOT_HELD / RESERVATION_FORBIDDEN when the reservationId you asked to extend is unknown, no longer held, or not yours. A slateId/slotIds hold (new or extended) whose slots are past their resolvableUntil is 409 SUGGESTION_EXPIRED, as package-bookings answers it: the times were planned from availability that may have changed, so plan a fresh slate. An unknown slate or slot is 409 SLATE_NOT_FOUND / SLOT_NOT_FOUND.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/projects/{projectId}/holds
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}/holds:
    post:
      tags:
        - Holds
      summary: >-
        Hold supplier time during checkout — a single session, or a whole
        package slate
      description: >-
        Claims supplier time so nobody else can book it while your client pays.
        Provide exactly one of: intervals (explicit supplier time — this is the
        form that works for a SINGLE session, with no package and no slate),
        slateId (hold every slot of a persisted package slate), or slotIds
        (cherry-pick slots of a slate). Every interval is claimed in ONE
        transaction, so a hold is all-or-nothing — you never end up holding 3
        sessions of a 5-session package. Expiry is LAZY: nothing runs at
        heldUntil, the hold simply stops blocking, so convert before then. To
        HEARTBEAT a checkout page, re-post the same intervals AND the
        reservationId you were given (with the same heldBy): that EXTENDS the
        existing hold — heldUntil moves out, the same reservationId comes back,
        and no second hold is minted. Omitting reservationId always mints a NEW
        hold. Returns 409 with code SLOT_HELD/SLOT_BOOKED — naming the blocking
        reservationId or bookingId — when the time is already claimed, or
        RESERVATION_NOT_FOUND / RESERVATION_NOT_HELD / RESERVATION_FORBIDDEN
        when the reservationId you asked to extend is unknown, no longer held,
        or not yours. A slateId/slotIds hold (new or extended) whose slots are
        past their resolvableUntil is 409 SUGGESTION_EXPIRED, as
        package-bookings answers it: the times were planned from availability
        that may have changed, so plan a fresh slate. An unknown slate or slot
        is 409 SLATE_NOT_FOUND / SLOT_NOT_FOUND.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: The project the hold belongs to.
            example: prj_01kv60qgnef2kt3pvqgwmkbzfr
          required: true
          description: The project the hold belongs to.
          name: projectId
          in: path
      requestBody:
        description: >-
          intervals | slateId | slotIds (+ optional reservationId to extend,
          heldBy, holdDurationMins)
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                intervals:
                  type: array
                  items:
                    type: object
                    properties:
                      supplierId:
                        type: string
                        minLength: 1
                        description: The supplier whose time is being held.
                        example: sup_01kv60qgnef2kt3pvqgwmkbzfr
                      startUtc:
                        type: string
                        format: date-time
                        description: Session start, UTC ISO-8601 with a Z suffix.
                        example: '2026-07-15T14:00:00.000Z'
                      endUtc:
                        type: string
                        format: date-time
                        description: >-
                          Session end, UTC ISO-8601. Exclusive — a booking
                          ending at 15:00 does not collide with one starting at
                          15:00.
                        example: '2026-07-15T15:00:00.000Z'
                      bookingTz:
                        type: string
                        minLength: 1
                        description: >-
                          IANA timezone the session occurs in. Required: it is
                          carried onto the hold and the booking's local-time
                          fields are derived from it at convert.
                        example: America/Toronto
                      locationType:
                        type: string
                        enum:
                          - PHYSICAL
                          - VIRTUAL
                          - TRAVEL_ZONE
                        description: >-
                          VIRTUAL, PHYSICAL, or TRAVEL_ZONE — same meaning as on
                          a booking. It decides which of the fields below are
                          required, and it is what tells convert whether
                          locationId names a Location or a supplier travel zone.
                        example: TRAVEL_ZONE
                      locationId:
                        type: string
                        nullable: true
                        minLength: 1
                        description: >-
                          For PHYSICAL: the Location id. For TRAVEL_ZONE: the
                          supplierTravelZoneId. Null for VIRTUAL. A hold WITH a
                          location participates in travel-buffer logic exactly
                          as a booking does.
                        example: stz_01kv60qgs4e4nbjhzradnqtj0h
                      latitude:
                        type: number
                        nullable: true
                        description: >-
                          Client latitude. Required for TRAVEL_ZONE; must be
                          omitted for PHYSICAL/VIRTUAL (PHYSICAL coordinates
                          come from the Location).
                        example: 43.6532
                      longitude:
                        type: number
                        nullable: true
                        description: >-
                          Client longitude. Required for TRAVEL_ZONE; must be
                          omitted for PHYSICAL/VIRTUAL (PHYSICAL coordinates
                          come from the Location).
                        example: -79.3832
                      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
                        description: >-
                          Structured client address. Required for TRAVEL_ZONE —
                          the supplier travels to it, and the booking cannot be
                          written without it.
                    required:
                      - supplierId
                      - startUtc
                      - endUtc
                      - bookingTz
                      - locationType
                  minItems: 1
                  description: >-
                    Explicit supplier time to hold. Use this for a single
                    session — no package or slate required.
                slateId:
                  type: string
                  minLength: 1
                  description: >-
                    Hold every slot of a persisted package slate (from POST
                    /availability/package-slate).
                  example: slate_01kv7n10k0fnptwk81wkm59vj7
                slotIds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
                  description: Cherry-pick individual slots of a slate to hold.
                reservationId:
                  type: string
                  minLength: 1
                  description: >-
                    EXTEND an existing hold instead of minting a new one — this
                    is the checkout HEARTBEAT. Supply the reservationId a
                    previous POST /holds handed you: heldUntil is pushed out,
                    the hold keeps its original createdAt, the SAME claim stays
                    on the supplier calendar (no second hold is minted), and the
                    SAME reservationId comes back — so the id you convert later
                    is still the right one. The intervals you send must be the
                    ones that hold already claims, and heldBy must match the
                    hold's owner. A mismatch is 409 RESERVATION_FORBIDDEN; an
                    unknown id is 409 RESERVATION_NOT_FOUND; an already
                    converted/released hold is 409 RESERVATION_NOT_HELD. Omit
                    this field to mint a NEW hold.
                  example: resv_01kv8p20m1gnqvxl92xln6awk8
                heldBy:
                  type: string
                  minLength: 1
                  description: >-
                    Who owns the hold — typically your checkout session id.
                    Re-holding time you already hold under the same heldBy does
                    not conflict with your own hold; to actually EXTEND that
                    hold (the checkout heartbeat) pass its reservationId as
                    well, otherwise a new hold is minted. Defaults to the API
                    principal.
                  example: checkout_9f2c1b
                holdDurationMins:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: >-
                    How long to hold, in minutes. Defaults to the offering
                    override, then the project default, then 5.
                  example: 10
      responses:
        '201':
          description: Hold placed — supplier time is now claimed until heldUntil
          content:
            application/json:
              schema:
                type: object
                properties:
                  reservationId:
                    type: string
                    example: resv_01kv8p20m1gnqvxl92xln6awk8
                  status:
                    type: string
                    enum:
                      - HELD
                      - CONVERTED
                      - RELEASED
                  heldUntil:
                    type: string
                    format: date-time
                    description: >-
                      When the hold lapses. Expiry is LAZY — nothing runs at
                      this instant; the hold simply stops blocking. Convert
                      before this time.
                    example: '2026-07-10T12:05:00.000Z'
                  intervals:
                    type: array
                    items:
                      type: object
                      properties:
                        supplierId:
                          type: string
                        startUtc:
                          type: string
                          format: date-time
                        endUtc:
                          type: string
                          format: date-time
                        bookingTz:
                          type: string
                          nullable: true
                          description: >-
                            IANA timezone carried onto the hold; the booking's
                            local times are derived from it at convert.
                          example: America/Toronto
                        locationType:
                          type: string
                          nullable: true
                          enum:
                            - PHYSICAL
                            - VIRTUAL
                            - TRAVEL_ZONE
                            - null
                          description: >-
                            VIRTUAL, PHYSICAL or TRAVEL_ZONE. Null only on a
                            hold placed before location carry-through existed.
                          example: TRAVEL_ZONE
                        locationId:
                          type: string
                          nullable: true
                          description: >-
                            The Location id (PHYSICAL) or supplierTravelZoneId
                            (TRAVEL_ZONE). Null for VIRTUAL.
                          example: stz_01kv60qgs4e4nbjhzradnqtj0h
                        latitude:
                          type: number
                          nullable: true
                          example: 43.6532
                        longitude:
                          type: number
                          nullable: true
                          example: -79.3832
                        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
                          description: >-
                            The structured client address held for a TRAVEL_ZONE
                            session.
                      required:
                        - supplierId
                        - startUtc
                        - endUtc
                required:
                  - reservationId
                  - status
                  - heldUntil
                  - intervals
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '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: Supplier not found in this project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '409':
          description: >-
            Supplier time already held/booked (SLOT_HELD, SLOT_BOOKED,
            OCCUPANCY_CONTENTION), the slate/slot is stale (SUGGESTION_EXPIRED,
            SLATE_NOT_FOUND, SLOT_NOT_FOUND, EMPTY_SLATE), or the hold to extend
            cannot be (RESERVATION_NOT_FOUND, RESERVATION_NOT_HELD,
            RESERVATION_FORBIDDEN)
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - SLOT_HELD
                          - SLOT_BOOKED
                        description: Which kind of claim is blocking the requested time.
                        example: SLOT_HELD
                      message:
                        type: string
                        description: Human-readable summary of the conflict.
                        example: >-
                          Supplier time is not available: HOLD
                          resv_01kv8p20m1gnqvxl92xln6awk8
                          (2026-08-01T10:00:00Z–2026-08-01T11:00:00Z)
                      statusCode:
                        type: number
                        enum:
                          - 409
                        description: >-
                          The HTTP status, repeated in the body — every
                          MarketBox error carries it, so you can branch on the
                          body alone.
                        example: 409
                      requestId:
                        type: string
                        description: >-
                          The id of this request (also returned as the
                          X-Request-Id header). Quote it in a support ticket.
                        example: a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10
                      conflicts:
                        type: array
                        items:
                          type: object
                          properties:
                            claimType:
                              type: string
                              enum:
                                - BOOKING
                                - HOLD
                              description: >-
                                Whether the blocking claim is a HOLD or a
                                confirmed BOOKING.
                            supplierId:
                              type: string
                              nullable: true
                              description: >-
                                The supplier whose calendar is blocked, when
                                known.
                            startUtc:
                              type: string
                              format: date-time
                              description: Start of the blocking claim, UTC ISO 8601.
                              example: '2026-08-01T10:00:00Z'
                            endUtc:
                              type: string
                              format: date-time
                              description: End of the blocking claim, UTC ISO 8601.
                              example: '2026-08-01T11:00:00Z'
                            reservationId:
                              type: string
                              nullable: true
                              description: >-
                                Present when claimType is HOLD — the
                                reservationId to convert or release. Null for a
                                BOOKING conflict.
                              example: resv_01kv8p20m1gnqvxl92xln6awk8
                            bookingId:
                              type: string
                              nullable: true
                              description: >-
                                Present when claimType is BOOKING — the id of
                                the confirmed booking occupying this time. Null
                                for a HOLD conflict.
                              example: null
                            heldUntil:
                              type: string
                              nullable: true
                              format: date-time
                              description: >-
                                HOLD only: when the blocking hold lazily
                                expires. Null for a BOOKING conflict.
                              example: '2026-08-01T10:05:00Z'
                          required:
                            - claimType
                            - startUtc
                            - endUtc
                        description: >-
                          Every live claim that overlaps the requested time —
                          usually one, but can be more.
                      hint:
                        type: string
                        description: >-
                          What to do next: for SLOT_HELD, convert or release the
                          named reservationId (POST
                          .../holds/{reservationId}/convert or /release); for
                          SLOT_BOOKED, search availability again.
                        example: >-
                          This time is held (reservation
                          resv_01kv8p20m1gnqvxl92xln6awk8). Convert the hold via
                          POST
                          /v1/projects/{projectId}/holds/{reservationId}/convert,
                          or release it with POST
                          /v1/projects/{projectId}/holds/{reservationId}/release.
                          Direct booking routes will not consume a hold — if you
                          hold, you convert.
                    required:
                      - code
                      - message
                      - statusCode
                      - requestId
                      - conflicts
                      - hint
                  - type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Why the hold could not be used: HOLD_EXPIRED,
                          RESERVATION_NOT_FOUND, RESERVATION_NOT_HELD,
                          RESERVATION_FORBIDDEN, RESERVATION_MULTI_INTERVAL (a
                          SINGLE_SESSION order item converts exactly one held
                          interval), SLOT_NOT_FOUND, SLATE_NOT_FOUND,
                          EMPTY_SLATE, SUGGESTION_EXPIRED (placing or extending
                          a hold from a slate or slot past its resolvableUntil:
                          plan a fresh slate).
                        example: HOLD_EXPIRED
                      message:
                        type: string
                        description: Human-readable explanation.
                        example: >-
                          Reservation resv_01kv8 expired at
                          2026-07-10T12:05:00.000Z
                      statusCode:
                        type: number
                        enum:
                          - 409
                        description: >-
                          The HTTP status, repeated in the body — every
                          MarketBox error carries it, so you can branch on the
                          body alone.
                        example: 409
                      requestId:
                        type: string
                        description: >-
                          The id of this request (also returned as the
                          X-Request-Id header). Quote it in a support ticket.
                        example: a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10
                    required:
                      - code
                      - message
                      - statusCode
                      - requestId
components:
  schemas:
    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
  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.