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

# Create Invoice Request

> Sales executive raises a billing request for a booking.

The booking is fetched from inv-service first (fail-closed): a request can
only be raised once the campaign is live, and the invoice is for the booking's
full grand_total (derived here, never client-supplied).



## OpenAPI

````yaml /openapi/payment.yaml post /api/v1/invoice-requests
openapi: 3.1.0
info:
  title: Cape Media - Payment Service
  description: >-
    Invoice requests, invoice uploads, payment tracking, and commission
    management.
  version: 1.0.0
servers:
  - url: https://api.capedigital.co.ke/payment
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/invoice-requests:
    post:
      tags:
        - Invoices
      summary: Create Invoice Request
      description: >-
        Sales executive raises a billing request for a booking.


        The booking is fetched from inv-service first (fail-closed): a request
        can

        only be raised once the campaign is live, and the invoice is for the
        booking's

        full grand_total (derived here, never client-supplied).
      operationId: create_invoice_request_api_v1_invoice_requests_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceRequestCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    InvoiceRequestCreate:
      properties:
        campaign_id:
          type: string
          format: uuid
          title: Campaign Id
          description: >-
            ID of the campaign in commercial-service that this booking belongs
            to.
        booking_order_id:
          type: string
          format: uuid
          title: Booking Order Id
          description: ID of the booking order in inventory-service to be invoiced.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Optional memo from the sales executive to finance (e.g. 'urgent —
            client deadline end of month').
      type: object
      required:
        - campaign_id
        - booking_order_id
      title: InvoiceRequestCreate
      description: >-
        Raised by a sales executive to ask finance to upload a tax invoice for a
        booking.


        The billed amount is derived server-side from the booking's grand_total
        —

        the frontend must never supply a figure.


        **Endpoint:** `POST /api/v1/invoice-requests`

        **Required role:** `finance:write` or `sales:write`
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````