Skip to main content
PATCH
/
api
/
v1
/
purchase-orders
/
direct-cost
/
{document_id}
Update Purchase Order
curl --request PATCH \
  --url https://staging.cutmake.ai/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>",
  "currency": "<string>",
  "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>"
}

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
currency
string | null
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