curl --request PUT \
--url https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "QC Follow-up (revised)",
"display_group": "Hold",
"allow_relocation": false,
"is_active": true,
"sort_order": 10,
"merchants": [
{
"type": "Merchant",
"id": 4
}
]
}
'import requests
url = "https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}"
payload = {
"label": "QC Follow-up (revised)",
"display_group": "Hold",
"allow_relocation": False,
"is_active": True,
"sort_order": 10,
"merchants": [
{
"type": "Merchant",
"id": 4
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'QC Follow-up (revised)',
display_group: 'Hold',
allow_relocation: false,
is_active: true,
sort_order: 10,
merchants: [{type: 'Merchant', id: 4}]
})
};
fetch('https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{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_URL => "https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => 'QC Follow-up (revised)',
'display_group' => 'Hold',
'allow_relocation' => false,
'is_active' => true,
'sort_order' => 10,
'merchants' => [
[
'type' => 'Merchant',
'id' => 4
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}"
payload := strings.NewReader("{\n \"label\": \"QC Follow-up (revised)\",\n \"display_group\": \"Hold\",\n \"allow_relocation\": false,\n \"is_active\": true,\n \"sort_order\": 10,\n \"merchants\": [\n {\n \"type\": \"Merchant\",\n \"id\": 4\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"QC Follow-up (revised)\",\n \"display_group\": \"Hold\",\n \"allow_relocation\": false,\n \"is_active\": true,\n \"sort_order\": 10,\n \"merchants\": [\n {\n \"type\": \"Merchant\",\n \"id\": 4\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"QC Follow-up (revised)\",\n \"display_group\": \"Hold\",\n \"allow_relocation\": false,\n \"is_active\": true,\n \"sort_order\": 10,\n \"merchants\": [\n {\n \"type\": \"Merchant\",\n \"id\": 4\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}Update hold reason
Partially updates a HoldReason specified by an id path parameter. Per-field constraints
differ between system and user-defined reasons — see each property’s description below.
curl --request PUT \
--url https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "QC Follow-up (revised)",
"display_group": "Hold",
"allow_relocation": false,
"is_active": true,
"sort_order": 10,
"merchants": [
{
"type": "Merchant",
"id": 4
}
]
}
'import requests
url = "https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}"
payload = {
"label": "QC Follow-up (revised)",
"display_group": "Hold",
"allow_relocation": False,
"is_active": True,
"sort_order": 10,
"merchants": [
{
"type": "Merchant",
"id": 4
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: 'QC Follow-up (revised)',
display_group: 'Hold',
allow_relocation: false,
is_active: true,
sort_order: 10,
merchants: [{type: 'Merchant', id: 4}]
})
};
fetch('https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{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_URL => "https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'label' => 'QC Follow-up (revised)',
'display_group' => 'Hold',
'allow_relocation' => false,
'is_active' => true,
'sort_order' => 10,
'merchants' => [
[
'type' => 'Merchant',
'id' => 4
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}"
payload := strings.NewReader("{\n \"label\": \"QC Follow-up (revised)\",\n \"display_group\": \"Hold\",\n \"allow_relocation\": false,\n \"is_active\": true,\n \"sort_order\": 10,\n \"merchants\": [\n {\n \"type\": \"Merchant\",\n \"id\": 4\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"QC Follow-up (revised)\",\n \"display_group\": \"Hold\",\n \"allow_relocation\": false,\n \"is_active\": true,\n \"sort_order\": 10,\n \"merchants\": [\n {\n \"type\": \"Merchant\",\n \"id\": 4\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/inventory/hold-reasons/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"QC Follow-up (revised)\",\n \"display_group\": \"Hold\",\n \"allow_relocation\": false,\n \"is_active\": true,\n \"sort_order\": 10,\n \"merchants\": [\n {\n \"type\": \"Merchant\",\n \"id\": 4\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "The supplied parameters are invalid.",
"details": [
{
"key": "hold_until_date",
"message": "The date must be in the future."
}
]
}
]
}Authorizations
Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.
Path Parameters
reason_id
Body
Human-readable label, ≤ 255 characters. Mutable on both system and user reasons.
"QC Follow-up (revised)"
Display group name, ≤ 25 characters. Mutable on both system and user reasons.
"Hold"
Whether inventory under this hold may be relocated.
User reasons: true / false / null (null = inherit from parent).
System reasons: true or false only — null is rejected (422) because system reasons have no parent to inherit from.
false
Whether this reason is active. Mutable on both system and user reasons.
true
Display order within siblings. Mutable on both system and user reasons.
10
Merchant scope restrictions. Empty array or null = unrestricted.
User reasons: mutable. System reasons: rejected (422) — system reasons are not merchant-scoped.
Show child attributes
Show child attributes
Response
Hold reason updated.
Was this page helpful?