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

# Create Credit Note

> Create a manual credit note for an invoice.

This creates an InvoiceMemoCreation record and triggers the InvoiceLedgerWorkflow
to create the actual credit memo and journal entries.



## OpenAPI

````yaml https://app.usequanta.com/openapi/quanta-services-api/openapi.json post /admin_api/invoices/create_credit_note
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://app.usequanta.com
    description: Production
security:
  - HTTPBearer: []
paths:
  /admin_api/invoices/create_credit_note:
    post:
      tags:
        - invoice_admin
        - quanta-services-api
      summary: Create Credit Note
      description: >-
        Create a manual credit note for an invoice.


        This creates an InvoiceMemoCreation record and triggers the
        InvoiceLedgerWorkflow

        to create the actual credit memo and journal entries.
      operationId: create_credit_note
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCreditNoteRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCreditNoteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateCreditNoteRequest:
      properties:
        invoice_qid:
          type: string
          title: Invoice Qid
        amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
        effective_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Effective Date
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - invoice_qid
        - amount
      title: CreateCreditNoteRequest
    CreateCreditNoteResponse:
      properties:
        credit_note_qid:
          type: string
          title: Credit Note Qid
        event_qid:
          type: string
          title: Event Qid
      type: object
      required:
        - credit_note_qid
        - event_qid
      title: CreateCreditNoteResponse
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Quanta Services API scoped bearer token. Supported only on Services API
        routes.

````

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