Batch update equipment
curl --request PATCH \
--url http://localhost:3000/v2/equipment/many \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"ids": [
"<string>"
],
"data": {
"equipmentTypeId": "<string>",
"objectId": "<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>",
"serialNumber": "<string>",
"inventoryNumber": 123,
"lastMaintenanceDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"chatName": "<string>"
}
}
'import requests
url = "http://localhost:3000/v2/equipment/many"
payload = {
"ids": ["<string>"],
"data": {
"equipmentTypeId": "<string>",
"objectId": "<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>",
"serialNumber": "<string>",
"inventoryNumber": 123,
"lastMaintenanceDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"tags": ["<string>"],
"chatName": "<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({
ids: ['<string>'],
data: {
equipmentTypeId: '<string>',
objectId: '<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>',
serialNumber: '<string>',
inventoryNumber: 123,
lastMaintenanceDate: '2023-11-07T05:31:56Z',
purchaseDate: '2023-11-07T05:31:56Z',
tags: ['<string>'],
chatName: '<string>'
}
})
};
fetch('http://localhost:3000/v2/equipment/many', 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/equipment/many",
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([
'ids' => [
'<string>'
],
'data' => [
'equipmentTypeId' => '<string>',
'objectId' => '<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>',
'serialNumber' => '<string>',
'inventoryNumber' => 123,
'lastMaintenanceDate' => '2023-11-07T05:31:56Z',
'purchaseDate' => '2023-11-07T05:31:56Z',
'tags' => [
'<string>'
],
'chatName' => '<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/equipment/many"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"data\": {\n \"equipmentTypeId\": \"<string>\",\n \"objectId\": \"<string>\",\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 \"serialNumber\": \"<string>\",\n \"inventoryNumber\": 123,\n \"lastMaintenanceDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"chatName\": \"<string>\"\n }\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/equipment/many")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ],\n \"data\": {\n \"equipmentTypeId\": \"<string>\",\n \"objectId\": \"<string>\",\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 \"serialNumber\": \"<string>\",\n \"inventoryNumber\": 123,\n \"lastMaintenanceDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"chatName\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/equipment/many")
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 \"ids\": [\n \"<string>\"\n ],\n \"data\": {\n \"equipmentTypeId\": \"<string>\",\n \"objectId\": \"<string>\",\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 \"serialNumber\": \"<string>\",\n \"inventoryNumber\": 123,\n \"lastMaintenanceDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"chatName\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"modifiedCount": 123
}Equipment
Batch Update Equipment
Update multiple equipment items at once
PATCH
/
equipment
/
many
Batch update equipment
curl --request PATCH \
--url http://localhost:3000/v2/equipment/many \
--header 'Content-Type: application/json' \
--header 'x-API-Key: <api-key>' \
--data '
{
"ids": [
"<string>"
],
"data": {
"equipmentTypeId": "<string>",
"objectId": "<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>",
"serialNumber": "<string>",
"inventoryNumber": 123,
"lastMaintenanceDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"chatName": "<string>"
}
}
'import requests
url = "http://localhost:3000/v2/equipment/many"
payload = {
"ids": ["<string>"],
"data": {
"equipmentTypeId": "<string>",
"objectId": "<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>",
"serialNumber": "<string>",
"inventoryNumber": 123,
"lastMaintenanceDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"tags": ["<string>"],
"chatName": "<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({
ids: ['<string>'],
data: {
equipmentTypeId: '<string>',
objectId: '<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>',
serialNumber: '<string>',
inventoryNumber: 123,
lastMaintenanceDate: '2023-11-07T05:31:56Z',
purchaseDate: '2023-11-07T05:31:56Z',
tags: ['<string>'],
chatName: '<string>'
}
})
};
fetch('http://localhost:3000/v2/equipment/many', 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/equipment/many",
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([
'ids' => [
'<string>'
],
'data' => [
'equipmentTypeId' => '<string>',
'objectId' => '<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>',
'serialNumber' => '<string>',
'inventoryNumber' => 123,
'lastMaintenanceDate' => '2023-11-07T05:31:56Z',
'purchaseDate' => '2023-11-07T05:31:56Z',
'tags' => [
'<string>'
],
'chatName' => '<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/equipment/many"
payload := strings.NewReader("{\n \"ids\": [\n \"<string>\"\n ],\n \"data\": {\n \"equipmentTypeId\": \"<string>\",\n \"objectId\": \"<string>\",\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 \"serialNumber\": \"<string>\",\n \"inventoryNumber\": 123,\n \"lastMaintenanceDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"chatName\": \"<string>\"\n }\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/equipment/many")
.header("x-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"<string>\"\n ],\n \"data\": {\n \"equipmentTypeId\": \"<string>\",\n \"objectId\": \"<string>\",\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 \"serialNumber\": \"<string>\",\n \"inventoryNumber\": 123,\n \"lastMaintenanceDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"chatName\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/equipment/many")
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 \"ids\": [\n \"<string>\"\n ],\n \"data\": {\n \"equipmentTypeId\": \"<string>\",\n \"objectId\": \"<string>\",\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 \"serialNumber\": \"<string>\",\n \"inventoryNumber\": 123,\n \"lastMaintenanceDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"tags\": [\n \"<string>\"\n ],\n \"chatName\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"modifiedCount": 123
}Authorizations
API-KeyBearer-Auth
Body
application/json
Batch update data
Response
Equipment items updated successfully
Number of equipment items modified
Was this page helpful?
⌘I

