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

# Update Shipment



## OpenAPI

````yaml /api/openapi-cutmake.json patch /api/v1/logistics/shipments/{shipment_id}
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/logistics/shipments/{shipment_id}:
    patch:
      tags:
        - Logistics
      summary: Update Shipment
      operationId: update_shipment_api_v1_logistics_shipments__shipment_id__patch
      parameters:
        - name: shipment_id
          in: path
          required: true
          schema:
            type: string
            title: Shipment Id
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShipmentWrite'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    ShipmentWrite:
      properties:
        documentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentid
        direction:
          anyOf:
            - type: string
            - type: 'null'
          title: Direction
        shipmentKind:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipmentkind
        scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        primaryPurchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Primarypurchaseorderid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        workOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workorderid
        workOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workorderdocumentid
        primarySalesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Primarysalesorderid
        originLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Originlocationid
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        incoterm:
          anyOf:
            - type: string
            - type: 'null'
          title: Incoterm
        lineItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/ShipmentLineItemWrite'
              type: array
            - type: 'null'
          title: Lineitems
      type: object
      title: ShipmentWrite
    ShipmentResponse:
      properties:
        id:
          type: string
          title: Id
        documentId:
          type: string
          title: Documentid
        direction:
          type: string
          title: Direction
        shipmentKind:
          type: string
          title: Shipmentkind
        scope:
          type: string
          title: Scope
        status:
          type: string
          title: Status
        primaryPurchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Primarypurchaseorderid
        primaryPurchaseOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Primarypurchaseorderdocumentid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        productionOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderdocumentid
        workOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workorderid
        workOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Workorderdocumentid
        primarySalesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Primarysalesorderid
        primarySalesOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Primarysalesorderdocumentid
        originLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Originlocationid
        originLocationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Originlocationname
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        incoterm:
          anyOf:
            - type: string
            - type: 'null'
          title: Incoterm
        paymentTerms:
          anyOf:
            - type: string
            - type: 'null'
          title: Paymentterms
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Updatedat
        lineItemsCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lineitemscount
        packingListsCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Packinglistscount
        lineItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/ShipmentLineItemResponse'
              type: array
            - type: 'null'
          title: Lineitems
      type: object
      required:
        - id
        - documentId
        - direction
        - shipmentKind
        - scope
        - status
      title: ShipmentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ShipmentLineItemWrite:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        lineNumber:
          anyOf:
            - type: integer
            - type: 'null'
          title: Linenumber
        sourceDocumentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedocumenttype
        sourceDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedocumentid
        sourceLineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcelineid
        purchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderid
        purchaseOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderlineitemid
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        salesOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderlineitemid
        materialId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialid
        materialSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialskuid
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        styleSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleskuid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
        destinationLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Destinationlocationid
        plannedQty:
          anyOf:
            - type: number
            - type: 'null'
          title: Plannedqty
        uom:
          anyOf:
            - type: string
            - type: 'null'
          title: Uom
        plannedShipDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Plannedshipdate
        plannedArrivalDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Plannedarrivaldate
        etaDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Etadate
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
      type: object
      title: ShipmentLineItemWrite
    ShipmentLineItemResponse:
      properties:
        id:
          type: string
          title: Id
        shipmentId:
          type: string
          title: Shipmentid
        lineNumber:
          type: integer
          title: Linenumber
        sourceDocumentType:
          type: string
          title: Sourcedocumenttype
        sourceDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedocumentid
        sourceLineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcelineid
        purchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderid
        purchaseOrderDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderdocumentid
        purchaseOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderlineitemid
        salesOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderid
        salesOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Salesorderlineitemid
        materialId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialid
        materialSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialskuid
        materialType:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialtype
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        styleSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleskuid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
        size:
          anyOf:
            - type: string
            - type: 'null'
          title: Size
        destinationLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Destinationlocationid
        destinationLocationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Destinationlocationname
        plannedQty:
          type: number
          title: Plannedqty
        uom:
          type: string
          title: Uom
        plannedShipDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Plannedshipdate
        plannedArrivalDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Plannedarrivaldate
        etaDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Etadate
        status:
          type: string
          title: Status
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Updatedat
      type: object
      required:
        - id
        - shipmentId
        - lineNumber
        - sourceDocumentType
        - plannedQty
        - uom
        - status
      title: ShipmentLineItemResponse
    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

````