Skip to main content
PATCH
/
api
/
v1
/
purchase-orders
/
direct-cost
/
{document_id}
Update Purchase Order
curl --request PATCH \
  --url https://api.example.com/api/v1/purchase-orders/direct-cost/{document_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "draft",
  "supplierId": "<string>",
  "supplierRefPO": "<string>",
  "orderDate": "<string>",
  "expectedDeliveryDate": "<string>",
  "linkedMrId": "<string>",
  "productionOrderId": "<string>",
  "salesOrderId": "<string>",
  "paymentTerms": "<string>",
  "deliveryTerms": "<string>",
  "supplierConfirmed": true,
  "confirmedDeliveryDate": "<string>",
  "currency": "<string>",
  "taxRate": 123,
  "items": [
    {
      "category": "<string>",
      "uom": "<string>",
      "orderQty": 123,
      "unitPrice": 123,
      "materialId": "<string>",
      "materialDescription": "<string>",
      "colorSize": "<string>"
    }
  ],
  "notes": "<string>",
  "adjustment": 123,
  "changeDescription": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "id": "<string>",
  "internalId": "<string>",
  "versionNumber": 123,
  "status": "<string>"
}

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.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-User-Id
string | null

Path Parameters

document_id
string
required

The PO document ID

Body

application/json

Input schema for PATCH /purchase-orders/direct-cost/{id}

All fields are optional - only provided fields will be merged with current version data to create a new version.

action
enum<string>
required

Actions for Purchase Order state transitions.

Permissions:

  • draft, submit: Any authenticated user
  • approve, reject, cancel: Manager or Admin only
Available options:
draft,
submit,
approve,
reject,
cancel
supplierId
string | null
supplierRefPO
string | null
orderDate
string | null
expectedDeliveryDate
string | null
linkedMrId
string | null
productionOrderId
string | null
salesOrderId
string | null
paymentTerms
string | null
deliveryTerms
string | null
supplierConfirmed
boolean | null
confirmedDeliveryDate
string | null
currency
string | null
taxRate
items
DirectCostLineItemInput · object[] | null
notes
string | null
adjustment
changeDescription
string | null

Response

Successful Response

Response after creating/updating a Direct Cost PO

success
boolean
required
message
string
required
id
string
required
internalId
string
required
versionNumber
integer
required
status
string
required