Skip to main content
PATCH
/
api
/
v1
/
purchase-orders
/
fixed-cost
/
{document_id}
Update Purchase Order
curl --request PATCH \
  --url https://api.example.com/api/v1/purchase-orders/fixed-cost/{document_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "draft",
  "vendorId": "<string>",
  "employeeId": "<string>",
  "purpose": "<string>",
  "expenseCategory": "<string>",
  "frequency": "<string>",
  "referenceNumber": "<string>",
  "currency": "<string>",
  "items": [
    {
      "itemName": "<string>",
      "amount": 123,
      "description": "<string>"
    }
  ],
  "internalNotes": "<string>",
  "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/fixed-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
vendorId
string | null
employeeId
string | null
purpose
string | null
expenseCategory
string | null
frequency
string | null
referenceNumber
string | null
currency
string | null
items
FixedCostLineItemInput · object[] | null
internalNotes
string | null
changeDescription
string | null

Response

Successful Response

Response after creating/updating a Fixed Cost PO

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