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

# File one side's report on a booking

> Records one side of a booking reporting on it — today, whether they showed up. A booking carries at most two reports, one per side, identified by `(bookingId, reporterRole)`; there is no report id.

**`attended` is a self-report.** A `CLIENT` report says the client attended; a `SUPPLIER` report says the supplier attended. Neither says anything whatsoever about the other party, so a supplier cannot mark a client as a no-show through this endpoint. `reporterId` is read off the booking (`CLIENT` → the booking's client, `SUPPLIER` → the booking's supplier) and is not accepted in the body, so a caller cannot file a report as somebody else.

**Resubmitting is safe.** This endpoint gets double-clicked from an email, so filing the same answer twice is a no-op rather than an error:

- nothing on file yet → **201** with the newly written report
- identical to what is on file → **200** with the **stored** report
- contradicts what is on file → **409** `REPORT_ALREADY_EXISTS`, naming the stored values

**`note` is not part of the claim.** The assertion a report makes is `reportType` + `attended`. Resubmitting those unchanged but with different text therefore returns 200 with the record as stored, including the ORIGINAL note — the new text is discarded, not merged. There is no route that edits a filed report.

**A report does what the same answer does in the dashboard.** It is filed through the one attendance-report path every door uses: a `SUPPLIER` report settles the booking (attended → `COMPLETED`, or `DISPUTED` when the client has reported that they did not attend; did not attend → `SUPPLIER_NO_SHOW`), and a `CLIENT` "did not attend" on a completed booking inside the dispute window opens a dispute. A report can be filed once the session has ended. Before that, on a CANCELLED booking, or a `SUPPLIER` report on a booking already settled, is **422** `BOOKING_NOT_REPORTABLE`, with nothing written. A `SUPPLIER` report against a booking with no supplier assigned is also 422, since there is nobody to attribute it to; a `CLIENT` report on the same booking is fine.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/projects/{projectId}/bookings/{bookingId}/reports
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}/reports:
    post:
      tags:
        - Bookings
      summary: File one side's report on a booking
      description: >-
        Records one side of a booking reporting on it — today, whether they
        showed up. A booking carries at most two reports, one per side,
        identified by `(bookingId, reporterRole)`; there is no report id.


        **`attended` is a self-report.** A `CLIENT` report says the client
        attended; a `SUPPLIER` report says the supplier attended. Neither says
        anything whatsoever about the other party, so a supplier cannot mark a
        client as a no-show through this endpoint. `reporterId` is read off the
        booking (`CLIENT` → the booking's client, `SUPPLIER` → the booking's
        supplier) and is not accepted in the body, so a caller cannot file a
        report as somebody else.


        **Resubmitting is safe.** This endpoint gets double-clicked from an
        email, so filing the same answer twice is a no-op rather than an error:


        - nothing on file yet → **201** with the newly written report

        - identical to what is on file → **200** with the **stored** report

        - contradicts what is on file → **409** `REPORT_ALREADY_EXISTS`, naming
        the stored values


        **`note` is not part of the claim.** The assertion a report makes is
        `reportType` + `attended`. Resubmitting those unchanged but with
        different text therefore returns 200 with the record as stored,
        including the ORIGINAL note — the new text is discarded, not merged.
        There is no route that edits a filed report.


        **A report does what the same answer does in the dashboard.** It is
        filed through the one attendance-report path every door uses: a
        `SUPPLIER` report settles the booking (attended → `COMPLETED`, or
        `DISPUTED` when the client has reported that they did not attend; did
        not attend → `SUPPLIER_NO_SHOW`), and a `CLIENT` "did not attend" on a
        completed booking inside the dispute window opens a dispute. A report
        can be filed once the session has ended. Before that, on a CANCELLED
        booking, or a `SUPPLIER` report on a booking already settled, is **422**
        `BOOKING_NOT_REPORTABLE`, with nothing written. A `SUPPLIER` report
        against a booking with no supplier assigned is also 422, since there is
        nobody to attribute it to; a `CLIENT` report on the same booking is
        fine.
      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
      requestBody:
        description: Report data
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reporterRole:
                  type: string
                  enum:
                    - CLIENT
                    - SUPPLIER
                  description: Which side of the booking is filing this report.
                  example: SUPPLIER
                reportType:
                  type: string
                  enum:
                    - ATTENDANCE
                  default: ATTENDANCE
                  description: >-
                    What the report is about. Defaults to ATTENDANCE, the only
                    type today.
                  example: ATTENDANCE
                attended:
                  type: boolean
                  description: >-
                    Whether the reporting side attended the booking. This is a
                    self-report — the client confirms the client attended, the
                    supplier confirms the supplier attended. Stored explicitly
                    so "I did not attend" is a first-class answer.
                  example: true
                note:
                  type: string
                  maxLength: 1000
                  description: Optional free-text detail, up to 1000 characters.
                  example: Arrived 10 minutes late but stayed for the full session.
              required:
                - reporterRole
                - attended
      responses:
        '200':
          description: Identical report already on file (no-op)
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BookingReport'
                required:
                  - data
        '201':
          description: Report filed
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BookingReport'
                required:
                  - data
        '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: Booking not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '409':
          description: A different report from this side is already on file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: >-
            The booking cannot be reported on now — not ended yet, cancelled, or
            (a SUPPLIER report) already settled (BOOKING_NOT_REPORTABLE) — or
            has no supplier to report as
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    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
  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.