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

# Create Bill From Purchase Order

> Generate a bill linked to this purchase order.



## OpenAPI

````yaml /api/openapi-cutmake.json post /api/v1/purchase-orders/{po_id}/create-bill
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/purchase-orders/{po_id}/create-bill:
    post:
      tags:
        - Purchase Orders
      summary: Create Bill From Purchase Order
      description: Generate a bill linked to this purchase order.
      operationId: >-
        create_bill_from_purchase_order_api_v1_purchase_orders__po_id__create_bill_post
      parameters:
        - name: po_id
          in: path
          required: true
          schema:
            type: string
            title: Po Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseOrderBillCreatePayload'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseOrderFlowBill'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PurchaseOrderBillCreatePayload:
      properties:
        billNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Billnumber
        billType:
          anyOf:
            - type: string
            - type: 'null'
          title: Billtype
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        dueDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Duedate
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        subtotal:
          anyOf:
            - type: number
            - type: 'null'
          title: Subtotal
        taxRate:
          anyOf:
            - type: number
            - type: 'null'
          title: Taxrate
        taxAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Taxamount
        totalAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Totalamount
        paidAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Paidamount
        remainingBalance:
          anyOf:
            - type: number
            - type: 'null'
          title: Remainingbalance
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        managementAccountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Managementaccountid
        sourceOfFunds:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceoffunds
      type: object
      title: PurchaseOrderBillCreatePayload
    PurchaseOrderFlowBill:
      properties:
        id:
          type: string
          title: Id
        billNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Billnumber
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        totalAmount:
          anyOf:
            - type: number
            - type: 'null'
          title: Totalamount
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
      type: object
      required:
        - id
      title: PurchaseOrderFlowBill
    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

````