Skip to main content
PATCH
/
orders
/
{id}
Update order
curl --request PATCH \
  --url http:localhost:3000/v2/orders/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-API-Key: <api-key>' \
  --data '{
  "_id": "<string>",
  "number": 123,
  "companyId": "<string>",
  "status": {
    "status": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "<string>",
    "lastModifiedAt": "2023-11-07T05:31:56Z",
    "lastModifiedBy": "<string>"
  },
  "chatId": "<string>",
  "items": [
    {}
  ],
  "customOrder": true,
  "comment": "<string>",
  "userId": "<string>",
  "objectId": "<string>",
  "completed": true,
  "approvedBy": "<string>",
  "objectManagerId": "<string>",
  "invoiceId": "<string>"
}'
{
  "_id": "<string>",
  "number": 123,
  "companyId": "<string>",
  "status": {
    "status": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "<string>",
    "lastModifiedAt": "2023-11-07T05:31:56Z",
    "lastModifiedBy": "<string>"
  },
  "chatId": "<string>",
  "items": [
    {}
  ],
  "customOrder": true,
  "comment": "<string>",
  "userId": "<string>",
  "objectId": "<string>",
  "completed": true,
  "approvedBy": "<string>",
  "objectManagerId": "<string>",
  "invoiceId": "<string>"
}

Authorizations

x-API-Key
string
header
required

Path Parameters

id
string<objectid>
required

Order ID

Body

application/json

A material order for articles and supplies, linked to a user and object. Base class for all entities that can have a chat associated with them. Base class for all entities in the system, providing common properties and methods.

items
object[]

List of order items

customOrder
boolean

Whether this is a custom order

comment
string | null

Order comment

userId
string<objectid>

User who created the order

objectId
string<objectid>

Object (location) for which the order is made

completed
boolean

Whether the order is completed

approvedBy
string<objectid> | null

User who approved the order

objectManagerId
string<objectid> | null

Object manager responsible for the order

invoiceId
string<objectid> | null

Invoice linked to this order

_id
string<objectid>

Unique identifier of the entity

number
integer

Unique number of the entity, used for identification

companyId
string<objectid>

The ID of the company this entity belongs to

status
object

Entity Status information

chatId
string<objectid> | null

ID of the chat associated with this entity

Response

Order updated successfully

A material order for articles and supplies, linked to a user and object. Base class for all entities that can have a chat associated with them. Base class for all entities in the system, providing common properties and methods.

items
object[]

List of order items

customOrder
boolean

Whether this is a custom order

comment
string | null

Order comment

userId
string<objectid>

User who created the order

objectId
string<objectid>

Object (location) for which the order is made

completed
boolean

Whether the order is completed

approvedBy
string<objectid> | null

User who approved the order

objectManagerId
string<objectid> | null

Object manager responsible for the order

invoiceId
string<objectid> | null

Invoice linked to this order

_id
string<objectid>

Unique identifier of the entity

number
integer

Unique number of the entity, used for identification

companyId
string<objectid>

The ID of the company this entity belongs to

status
object

Entity Status information

chatId
string<objectid> | null

ID of the chat associated with this entity