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

# Finalize Draft Invoice

> Finalize a draft invoice by UUID



## OpenAPI

````yaml https://api.getmeasure.com/api/v1/docs/api_spec.json post /companies/{company_id}/invoices/{uuid}/finalize
openapi: 3.1.0
info:
  title: Measure API
  description: APIs to communicate with Measure
  version: 1.0.0
servers:
  - url: https://api.getmeasure.com/api/v1
security: []
paths:
  /companies/{company_id}/invoices/{uuid}/finalize:
    post:
      tags:
        - Invoices
      summary: Finalize Draft Invoice
      description: Finalize a draft invoice by UUID
      operationId: Finalize_Draft_Invoice
      parameters:
        - name: company_id
          in: path
          description: 'The company ID with the prefix ''cmp_''. '
          required: true
          schema:
            description: 'The company ID with the prefix ''cmp_''. '
            type: string
        - name: uuid
          in: path
          description: The resource UUID
          required: true
          schema:
            description: The resource UUID
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            The idempotency key that will be used to ensure the request is only
            performed once
          schema:
            description: >-
              The idempotency key that will be used to ensure the request is
              only performed once
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseAPIInvoiceFindRepresentation'
      deprecated: false
      security:
        - apiKey:
            - ''
components:
  schemas:
    ResponseAPIInvoiceFindRepresentation:
      properties:
        auto_charges:
          description: >-
            Whether the invoice is automatically charged to the payment method
            on file for the customer
          type: boolean
        billed_customer:
          $ref: '#/components/schemas/ResponseCustomerLiteRepresentation'
          description: The expanded billed customer details for the invoice
        billed_customer_id:
          description: >-
            The billed customer ID for the invoice. This matches the customer_id
            by default, but can be set to another parent customer ID
          type: string
        created_at:
          description: The date the invoice was created
          format: date-time
          type: string
        currency:
          description: The currency of the invoice
          type: string
        customer:
          $ref: '#/components/schemas/ResponseCustomerLiteRepresentation'
          description: The expanded customer details for the invoice
        customer_id:
          description: The customer ID for the invoice
          type: string
        due:
          $ref: '#/components/schemas/ModelAmount'
          description: The total amount due on the invoice after any payments
        due_date:
          description: The date the invoice total is due
          format: date-time
          type: string
        hosted_link:
          description: >-
            The hosted link for the invoice. Includes a 1-day authentication
            token in the URL query parameter.
          type:
            - 'null'
            - string
        invoice_date:
          description: The date for the invoice
          format: date-time
          type: string
        name:
          description: The name of the invoice
          type: string
        number:
          description: The invoice number for the invoice
          type: string
        paid:
          $ref: '#/components/schemas/ModelAmount'
          description: The total amount paid against the invoice
        paid_date:
          description: The date the invoice was paid
          format: date-time
          type:
            - 'null'
            - string
        pdf_link:
          description: >-
            The PDF link for the invoice. Includes a 1-day authentication token
            in the URL query parameter.
          type:
            - 'null'
            - string
        prorated_amount:
          $ref: '#/components/schemas/ModelAmount'
          description: Any prorated amounts for the invoice
        refunded_amount:
          $ref: '#/components/schemas/ModelAmount'
          description: The total amount refunded against the invoice
        revenue:
          $ref: '#/components/schemas/ModelAmount'
          description: The revenue amount of the invoice (total minus credits)
        status:
          description: The status of the invoice such as PAID, DRAFT, VOID or PENDING
          type: string
        sub_total:
          $ref: '#/components/schemas/ModelAmount'
          description: The subtotal of the invoice which is prior to applying credits
        subscription_id:
          description: The subscription ID for the invoice, if is not a one-time invoice
          type:
            - 'null'
            - string
        total:
          $ref: '#/components/schemas/ModelAmount'
          description: >-
            The final total of the invoice after applying all credits, discounts
            and taxes
        updated_at:
          description: The last date the invoice was updated
          format: date-time
          type: string
        uuid:
          description: The unique identifier for the invoice
          type: string
      type: object
    ResponseCustomerLiteRepresentation:
      properties:
        address:
          $ref: '#/components/schemas/ModelAddress'
          description: The address of the customer
        arr:
          $ref: '#/components/schemas/ModelAmount'
          description: The ARR of the customer
        billing_emails:
          description: The additional emails to cc on customer's invoices
          items:
            type: string
          type:
            - array
            - 'null'
        company_id:
          description: The company ID of the customer
          type: string
        computed_entitlements:
          description: The computed entitlements for the customer
          items:
            $ref: '#/components/schemas/ResponseEntitlementDataRepresentation'
          type:
            - array
            - 'null'
        created_at:
          description: The date the customer was created
          format: date-time
          type: string
        customer_integration_metadata:
          additionalProperties:
            $ref: '#/components/schemas/ModelCustomerIntegrationMetadata'
          type: object
        display_name:
          description: The computed display name of the customer
          type: string
        email:
          description: The email of the customer
          type: string
        exclude_from_metrics:
          description: >-
            Whether to exclude this customer and related fields from any metrics
            in Measure
          type: boolean
        id:
          description: The ID of the customer in Measure
          type: string
        identifier:
          description: >-
            The unique identifier for the customer that ties back to your
            system. You can query for a customer using this identifier
          type: string
        integration_references:
          description: >-
            The integration references of this customer in third-party
            applications connected to Measure
          items:
            $ref: '#/components/schemas/ResponseCustomerIntegrationRefs'
          type: array
        locale:
          description: The locale of the customer
          type: string
        managed_externally:
          description: Whether this customer is managed outside of Measure
          type: boolean
        metadata:
          additionalProperties: true
          description: The metadata as key-value pairs attached to this customer
          type: object
        mrr:
          $ref: '#/components/schemas/ModelAmount'
          description: The MRR of the customer
        name:
          description: The name of the customer
          type: string
        org_name:
          description: >-
            The name of the company or the organization this customer is a part
            of
          type: string
        owner_id:
          description: >-
            The company user ID of person in Measure assigned to manage this
            customer
          type:
            - 'null'
            - string
        parent_customer_id:
          description: The customer ID of the parent customer assigned in Measure
          type:
            - 'null'
            - string
        phone:
          description: The phone number of the customer
          type: string
        status:
          description: The status of the customer such as ACTIVE or ARCHIVED
          type: string
        title:
          description: The title of the customer, such as CEO, VP
          type: string
        updated_at:
          description: The date the customer was last updated
          format: date-time
          type: string
      type: object
    ModelAmount:
      description: The amount which has value in cents and a currency
      properties:
        currency:
          type: string
        value_in_cents:
          format: int64
          type: integer
      type: object
    ModelAddress:
      properties:
        address_line_1:
          type: string
        address_line_2:
          type: string
        city:
          type: string
        country:
          description: 2-character country code (ISO 3166-1 alpha-2)
          examples:
            - US
          type: string
        place_id:
          type:
            - 'null'
            - string
        state:
          type: string
        zip:
          type: string
      type: object
    ResponseEntitlementDataRepresentation:
      properties:
        entitlement_id:
          type: string
        id:
          type: string
        inherited_from_id:
          type:
            - 'null'
            - string
        inherited_from_type:
          type:
            - 'null'
            - string
        key:
          type: string
        name:
          type: string
        original_value: {}
        overridden:
          type:
            - 'null'
            - boolean
        type:
          type: string
        value: {}
      type: object
    ModelCustomerIntegrationMetadata:
      properties:
        anrok:
          $ref: '#/components/schemas/ModelAnrokCustomerIntegrationMetadata'
        avalara:
          $ref: '#/components/schemas/ModelAvalaraCustomerIntegrationMetadata'
      type: object
    ResponseCustomerIntegrationRefs:
      properties:
        integration_icon:
          type: string
        integration_id:
          type: string
        integration_key:
          type: string
        integration_name:
          type: string
        reference_type:
          type: string
        remote_id:
          type: string
        remote_type:
          type: string
      type: object
    ModelAnrokCustomerIntegrationMetadata:
      properties:
        vat_id:
          type: string
      type: object
    ModelAvalaraCustomerIntegrationMetadata:
      properties:
        entity_code:
          type: string
      type: object
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````