Skip to main content
POST
/
api
/
v1
/
purchase-orders
/
direct-cost
Create Purchase Order
curl --request POST \
  --url https://api.example.com/api/v1/purchase-orders/direct-cost \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "draft",
  "supplierId": "<string>",
  "orderDate": "<string>",
  "id": "<string>",
  "supplierRefPO": "<string>",
  "expectedDeliveryDate": "<string>",
  "linkedMrId": "<string>",
  "productionOrderId": "<string>",
  "salesOrderId": "<string>",
  "paymentTerms": "<string>",
  "deliveryTerms": "<string>",
  "currency": "USD",
  "taxRate": "0.05",
  "items": [],
  "notes": "<string>",
  "adjustment": "0.00",
  "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

Body

application/json

Input schema for creating/updating a Direct Cost Purchase Order.

POST /purchase-orders/direct-cost

  • action: "draft" saves without validation, "submit" validates fully
  • id: None = create new, provided = update existing (creates 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
required
orderDate
string
required
id
string | null
supplierRefPO
string | null
expectedDeliveryDate
string | null
linkedMrId
string | null
productionOrderId
string | null
salesOrderId
string | null
paymentTerms
string | null
deliveryTerms
string | null
currency
string
default:USD
taxRate
default:0.05
items
DirectCostLineItemInput · object[]
notes
string | null
adjustment
default:0.00
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