cURL
curl --request PATCH \
--url http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"currency": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"buy_enabled": true,
"sell_enabled": true,
"quality_correction": true,
"allow_multiple_login": true,
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>",
"entity_card": "<string>"
}
'import requests
url = "http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/"
payload = {
"name": "<string>",
"id": "<string>",
"currency": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"buy_enabled": True,
"sell_enabled": True,
"quality_correction": True,
"allow_multiple_login": True,
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>",
"entity_card": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
id: '<string>',
currency: '<string>',
created_on: '2023-11-07T05:31:56Z',
description: '<string>',
house_name: '<string>',
street: '<string>',
city: '<string>',
sub_province: '<string>',
province: '<string>',
latitude: 123,
longitude: 123,
zipcode: '<string>',
country: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
buy_enabled: true,
sell_enabled: true,
quality_correction: true,
allow_multiple_login: true,
creator: '<string>',
updater: '<string>',
buyer: '<string>',
entity_card: '<string>'
})
};
fetch('http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/', 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/connect/v1/supply-chains/companies/{hashid}/",
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([
'name' => '<string>',
'id' => '<string>',
'currency' => '<string>',
'created_on' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'house_name' => '<string>',
'street' => '<string>',
'city' => '<string>',
'sub_province' => '<string>',
'province' => '<string>',
'latitude' => 123,
'longitude' => 123,
'zipcode' => '<string>',
'country' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'buy_enabled' => true,
'sell_enabled' => true,
'quality_correction' => true,
'allow_multiple_login' => true,
'creator' => '<string>',
'updater' => '<string>',
'buyer' => '<string>',
'entity_card' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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/connect/v1/supply-chains/companies/{hashid}/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"house_name\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"sub_province\": \"<string>\",\n \"province\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"buy_enabled\": true,\n \"sell_enabled\": true,\n \"quality_correction\": true,\n \"allow_multiple_login\": true,\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"buyer\": \"<string>\",\n \"entity_card\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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/connect/v1/supply-chains/companies/{hashid}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"house_name\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"sub_province\": \"<string>\",\n \"province\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"buy_enabled\": true,\n \"sell_enabled\": true,\n \"quality_correction\": true,\n \"allow_multiple_login\": true,\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"buyer\": \"<string>\",\n \"entity_card\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"house_name\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"sub_province\": \"<string>\",\n \"province\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"buy_enabled\": true,\n \"sell_enabled\": true,\n \"quality_correction\": true,\n \"allow_multiple_login\": true,\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"buyer\": \"<string>\",\n \"entity_card\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"currency": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"image": "<string>",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"buy_enabled": true,
"sell_enabled": true,
"quality_correction": true,
"allow_multiple_login": true,
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>",
"entity_card": "<string>",
"members": [
"<string>"
],
"products": [
"<string>"
]
}Supply Chain
Update Company Details Endpoint
Update Company Details endpoint allows you to update information about a specific company within the supply chain by making a PATCH request. Provide the hash ID of the company in the endpoint URL and include the fields to be updated in the request body.
PATCH
/
supply-chains
/
companies
/
{hashid}
/
cURL
curl --request PATCH \
--url http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"currency": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"buy_enabled": true,
"sell_enabled": true,
"quality_correction": true,
"allow_multiple_login": true,
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>",
"entity_card": "<string>"
}
'import requests
url = "http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/"
payload = {
"name": "<string>",
"id": "<string>",
"currency": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"buy_enabled": True,
"sell_enabled": True,
"quality_correction": True,
"allow_multiple_login": True,
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>",
"entity_card": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
id: '<string>',
currency: '<string>',
created_on: '2023-11-07T05:31:56Z',
description: '<string>',
house_name: '<string>',
street: '<string>',
city: '<string>',
sub_province: '<string>',
province: '<string>',
latitude: 123,
longitude: 123,
zipcode: '<string>',
country: '<string>',
email: 'jsmith@example.com',
phone: '<string>',
buy_enabled: true,
sell_enabled: true,
quality_correction: true,
allow_multiple_login: true,
creator: '<string>',
updater: '<string>',
buyer: '<string>',
entity_card: '<string>'
})
};
fetch('http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/', 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/connect/v1/supply-chains/companies/{hashid}/",
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([
'name' => '<string>',
'id' => '<string>',
'currency' => '<string>',
'created_on' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'house_name' => '<string>',
'street' => '<string>',
'city' => '<string>',
'sub_province' => '<string>',
'province' => '<string>',
'latitude' => 123,
'longitude' => 123,
'zipcode' => '<string>',
'country' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>',
'buy_enabled' => true,
'sell_enabled' => true,
'quality_correction' => true,
'allow_multiple_login' => true,
'creator' => '<string>',
'updater' => '<string>',
'buyer' => '<string>',
'entity_card' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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/connect/v1/supply-chains/companies/{hashid}/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"house_name\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"sub_province\": \"<string>\",\n \"province\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"buy_enabled\": true,\n \"sell_enabled\": true,\n \"quality_correction\": true,\n \"allow_multiple_login\": true,\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"buyer\": \"<string>\",\n \"entity_card\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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/connect/v1/supply-chains/companies/{hashid}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"house_name\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"sub_province\": \"<string>\",\n \"province\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"buy_enabled\": true,\n \"sell_enabled\": true,\n \"quality_correction\": true,\n \"allow_multiple_login\": true,\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"buyer\": \"<string>\",\n \"entity_card\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/connect/v1/supply-chains/companies/{hashid}/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"currency\": \"<string>\",\n \"created_on\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"house_name\": \"<string>\",\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"sub_province\": \"<string>\",\n \"province\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"buy_enabled\": true,\n \"sell_enabled\": true,\n \"quality_correction\": true,\n \"allow_multiple_login\": true,\n \"creator\": \"<string>\",\n \"updater\": \"<string>\",\n \"buyer\": \"<string>\",\n \"entity_card\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"id": "<string>",
"currency": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"image": "<string>",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"buy_enabled": true,
"sell_enabled": true,
"quality_correction": true,
"allow_multiple_login": true,
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>",
"entity_card": "<string>",
"members": [
"<string>"
],
"products": [
"<string>"
]
}Authorizations
Path Parameters
Body
application/json
Required string length:
1 - 500Minimum string length:
1Maximum string length:
500Maximum string length:
100Maximum string length:
500Maximum string length:
500Maximum string length:
500Maximum string length:
500Maximum string length:
50Maximum string length:
500Maximum string length:
100Maximum string length:
50Response
200 - application/json
Required string length:
1 - 500Minimum string length:
1Maximum string length:
500Maximum string length:
100Maximum string length:
500Maximum string length:
500Maximum string length:
500Maximum string length:
500Maximum string length:
50Maximum string length:
500Maximum string length:
100Maximum string length:
50⌘I
