> ## 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 Production Order

> Create a new production order.



## OpenAPI

````yaml /api/openapi-cutmake.json post /api/v1/production-orders
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/production-orders:
    post:
      tags:
        - Production Orders
      summary: Create Production Order
      description: Create a new production order.
      operationId: create_production_order_api_v1_production_orders_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductionOrderCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductionOrderResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    ProductionOrderCreate:
      properties:
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        salesOrderIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Salesorderids
        productionType:
          anyOf:
            - type: string
            - type: 'null'
          title: Productiontype
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        orderQuantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Orderquantity
        dueDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Duedate
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: ProductionOrderCreate
    ProductionOrderResponse:
      properties:
        id:
          type: string
          title: Id
        documentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentid
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        currentVersion:
          anyOf:
            - type: integer
            - type: 'null'
          title: Currentversion
        finalVersion:
          anyOf:
            - type: integer
            - type: 'null'
          title: Finalversion
        productionType:
          anyOf:
            - type: string
            - type: 'null'
          title: Productiontype
        production_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Production Type
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        orderQuantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Orderquantity
        order_quantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order Quantity
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        salesOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderdocumentid
        salesOrderIds:
          items:
            type: string
          type: array
          title: Salesorderids
        salesOrderDocumentIds:
          items:
            type: string
          type: array
          title: Salesorderdocumentids
        salesOrders:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Salesorders
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientid
        clientName:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientname
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        styleName:
          anyOf:
            - type: string
            - type: 'null'
          title: Stylename
        styles:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Styles
        picture:
          anyOf:
            - type: string
            - type: 'null'
          title: Picture
        bomId:
          anyOf:
            - type: string
            - type: 'null'
          title: Bomid
        bomDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Bomdocumentid
        bomName:
          anyOf:
            - type: string
            - type: 'null'
          title: Bomname
        dueDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Duedate
        plannedStartDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Plannedstartdate
        plannedCompletionDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Plannedcompletiondate
        exFactoryDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Exfactorydate
        actualStartDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Actualstartdate
        actualCompletionDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Actualcompletiondate
        materialsReadyDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialsreadydate
        cuttingStartDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Cuttingstartdate
        cuttingEndDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Cuttingenddate
        sewingStartDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Sewingstartdate
        sewingEndDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Sewingenddate
        finishingStartDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Finishingstartdate
        finishingEndDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Finishingenddate
        qcStartDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Qcstartdate
        qcEndDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Qcenddate
        packingStartDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Packingstartdate
        packingEndDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Packingenddate
        completionDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Completiondate
        productionLocation:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionlocation
        productionLineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionlineid
        productionLineName:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionlinename
        specialInstructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Specialinstructions
        autoGenerateMaterialRequest:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Autogeneratematerialrequest
        qcStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Qcstatus
        defectCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Defectcount
        defectNotes:
          anyOf:
            - type: string
            - type: 'null'
          title: Defectnotes
        qcInspector:
          anyOf:
            - type: string
            - type: 'null'
          title: Qcinspector
        qcDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Qcdate
        assignedWorkers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Assignedworkers
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - id
      title: ProductionOrderResponse
    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:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````