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>"
}
'import requests
url = "http://localhost:3000/v2/orders/{id}"
payload = {
"_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>"
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_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>'
})
};
fetch('http://localhost:3000/v2/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'_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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/orders/{id}"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"items\": [\n {}\n ],\n \"customOrder\": true,\n \"comment\": \"<string>\",\n \"userId\": \"<string>\",\n \"objectId\": \"<string>\",\n \"completed\": true,\n \"approvedBy\": \"<string>\",\n \"objectManagerId\": \"<string>\",\n \"invoiceId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/v2/orders/{id}")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"items\": [\n {}\n ],\n \"customOrder\": true,\n \"comment\": \"<string>\",\n \"userId\": \"<string>\",\n \"objectId\": \"<string>\",\n \"completed\": true,\n \"approvedBy\": \"<string>\",\n \"objectManagerId\": \"<string>\",\n \"invoiceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"items\": [\n {}\n ],\n \"customOrder\": true,\n \"comment\": \"<string>\",\n \"userId\": \"<string>\",\n \"objectId\": \"<string>\",\n \"completed\": true,\n \"approvedBy\": \"<string>\",\n \"objectManagerId\": \"<string>\",\n \"invoiceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_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>"
}Update Material Order
Update an existing order. Only provided fields will be updated.
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>"
}
'import requests
url = "http://localhost:3000/v2/orders/{id}"
payload = {
"_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>"
}
headers = {
"x-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_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>'
})
};
fetch('http://localhost:3000/v2/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'_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>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/orders/{id}"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"items\": [\n {}\n ],\n \"customOrder\": true,\n \"comment\": \"<string>\",\n \"userId\": \"<string>\",\n \"objectId\": \"<string>\",\n \"completed\": true,\n \"approvedBy\": \"<string>\",\n \"objectManagerId\": \"<string>\",\n \"invoiceId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/v2/orders/{id}")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"items\": [\n {}\n ],\n \"customOrder\": true,\n \"comment\": \"<string>\",\n \"userId\": \"<string>\",\n \"objectId\": \"<string>\",\n \"completed\": true,\n \"approvedBy\": \"<string>\",\n \"objectManagerId\": \"<string>\",\n \"invoiceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"number\": 123,\n \"companyId\": \"<string>\",\n \"status\": {\n \"status\": 123,\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"createdBy\": \"<string>\",\n \"lastModifiedAt\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedBy\": \"<string>\"\n },\n \"chatId\": \"<string>\",\n \"items\": [\n {}\n ],\n \"customOrder\": true,\n \"comment\": \"<string>\",\n \"userId\": \"<string>\",\n \"objectId\": \"<string>\",\n \"completed\": true,\n \"approvedBy\": \"<string>\",\n \"objectManagerId\": \"<string>\",\n \"invoiceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_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
Path Parameters
Order ID
Body
A material order for articles and supplies, linked to a user and object.
Unique identifier of the entity
Unique number of the entity, used for identification
The ID of the company this entity belongs to
Entity Status information
Show child attributes
Show child attributes
ID of the chat associated with this entity
List of order items
Whether this is a custom order
Order comment
User who created the order
Object (location) for which the order is made
Whether the order is completed
User who approved the order
Object manager responsible for the order
Invoice linked to this order
Response
Order updated successfully
A material order for articles and supplies, linked to a user and object.
Unique identifier of the entity
Unique number of the entity, used for identification
The ID of the company this entity belongs to
Entity Status information
Show child attributes
Show child attributes
ID of the chat associated with this entity
List of order items
Whether this is a custom order
Order comment
User who created the order
Object (location) for which the order is made
Whether the order is completed
User who approved the order
Object manager responsible for the order
Invoice linked to this order
Was this page helpful?

