Skip to main content
PATCH
/
api
/
v1
/
orders
/
{document_id}
Update Order
curl --request PATCH \
  --url https://api.example.com/api/v1/orders/{document_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "draft",
  "clientId": "<string>",
  "clientPoNumber": "<string>",
  "styleId": "<string>",
  "etd": "2023-11-07T05:31:56Z",
  "shippingTerm": "<string>",
  "paymentTerm": "<string>",
  "estimatedCost": 123,
  "budgetAllowableTolerance": 123,
  "requestedDeliveryDate": "2023-11-07T05:31:56Z",
  "requestedBulkReadyDate": "2023-11-07T05:31:56Z",
  "notes": "<string>",
  "lineItems": [
    {
      "styleSkuId": "<string>",
      "orderQuantity": 123,
      "id": "<string>",
      "clientTolerance": 0,
      "requestedDeliveryDate": "2023-11-07T05:31:56Z",
      "requestedBulkReadyDate": "2023-11-07T05:31:56Z",
      "status": "<string>"
    }
  ],
  "changeDescription": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "salesOrderId": "<string>",
  "documentId": "<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

Body

application/json

Input schema for updating a sales order (PATCH /orders/{id}). All fields are optional - only provided fields will be updated.

Use 'action' to trigger state transitions.

action
enum<string> | null

Actions for sales order state transitions

Permissions:

  • draft, submit_for_review: Any authenticated user
  • confirm, reject: Manager or Admin only
  • mark_in_procurement, mark_in_production, mark_delivered: Manager or Admin only
Available options:
draft,
submit_for_review,
confirm,
reject,
mark_in_procurement,
mark_in_production,
mark_partially_delivered,
mark_delivered
clientId
string | null
clientPoNumber
string | null
Maximum string length: 50
styleId
string | null
etd
string<date-time> | null
shippingTerm
string | null
paymentTerm
string | null
estimatedCost
number | null
budgetAllowableTolerance
number | null
requestedDeliveryDate
string<date-time> | null
requestedBulkReadyDate
string<date-time> | null
notes
string | null
lineItems
SalesOrderLineItemInput · object[] | null
changeDescription
string | null

Response

Successful Response

Response after updating a sales order

success
boolean
required
message
string
required
salesOrderId
string
required
documentId
string
required
versionNumber
integer
required
status
string
required