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



## OpenAPI

````yaml /api/openapi-cutmake.json post /api/v1/subcontract-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/subcontract-orders:
    post:
      tags:
        - Subcontract
      summary: Create Order
      operationId: create_order_api_v1_subcontract_orders_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '401':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    CreateOrderRequest:
      properties:
        cmtVendorId:
          type: string
          title: Cmtvendorid
        qtyOrdered:
          type: number
          title: Qtyordered
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        costSheetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Costsheetid
        cmtPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Cmtprice
        cmtCostPolicy:
          type: string
          title: Cmtcostpolicy
          default: capitalize
        currency:
          type: string
          title: Currency
          default: VND
        orderNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Ordernumber
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      required:
        - cmtVendorId
        - qtyOrdered
      title: CreateOrderRequest
    OrderResponse:
      properties:
        id:
          type: string
          title: Id
        orgId:
          type: string
          title: Orgid
        orderNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Ordernumber
        cmtVendorId:
          anyOf:
            - type: string
            - type: 'null'
          title: Cmtvendorid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        cmtPrice:
          anyOf:
            - type: number
            - type: 'null'
          title: Cmtprice
        currency:
          type: string
          title: Currency
        qtyOrdered:
          type: number
          title: Qtyordered
        qtyIssued:
          type: number
          title: Qtyissued
        qtyReceived:
          type: number
          title: Qtyreceived
        cmtCostPolicy:
          type: string
          title: Cmtcostpolicy
        status:
          type: string
          title: Status
      type: object
      required:
        - id
        - orgId
        - currency
        - qtyOrdered
        - qtyIssued
        - qtyReceived
        - cmtCostPolicy
        - status
      title: OrderResponse
    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

````