Send 846 Inventory Advice
curl --request POST \
--url https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"sku": "PILLOW-01",
"available_quantity": 120
},
{
"sku": "PILLOW-02",
"available_quantity": 0
}
]
}
'import requests
url = "https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}"
payload = { "items": [
{
"sku": "PILLOW-01",
"available_quantity": 120
},
{
"sku": "PILLOW-02",
"available_quantity": 0
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{sku: 'PILLOW-01', available_quantity: 120},
{sku: 'PILLOW-02', available_quantity: 0}
]
})
};
fetch('https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_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://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'sku' => 'PILLOW-01',
'available_quantity' => 120
],
[
'sku' => 'PILLOW-02',
'available_quantity' => 0
]
]
]),
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://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}"
payload := strings.NewReader("{\n \"items\": [\n {\n \"sku\": \"PILLOW-01\",\n \"available_quantity\": 120\n },\n {\n \"sku\": \"PILLOW-02\",\n \"available_quantity\": 0\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"sku\": \"PILLOW-01\",\n \"available_quantity\": 120\n },\n {\n \"sku\": \"PILLOW-02\",\n \"available_quantity\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"sku\": \"PILLOW-01\",\n \"available_quantity\": 120\n },\n {\n \"sku\": \"PILLOW-02\",\n \"available_quantity\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "846 inventory advice sent successfully",
"data": {
"results": [
{
"edi_config_id": "1f2c1c4b-3d40-4e2c-8a8a-39d1e0a4cc11",
"retailer_id": "7eab3720-1944-4b01-aea6-972492f017e5",
"retailer_name": "Target",
"brand_name": "Acme Outdoor",
"organization_name": "Acme Holdings",
"success": true,
"edi_transaction_id": "f2a73e8b-3c8b-4f1e-a4d2-1c2cda30c6e9",
"error": null,
"failed_skus": null
}
],
"summary": {
"total": 1,
"succeeded": 1,
"failed": 0
}
}
}{
"message": "846 inventory advice partially completed: 1 succeeded, 1 failed",
"data": {
"results": [
{
"edi_config_id": "1f2c1c4b-3d40-4e2c-8a8a-39d1e0a4cc11",
"retailer_id": "7eab3720-1944-4b01-aea6-972492f017e5",
"retailer_name": "Target",
"brand_name": "Acme Outdoor",
"organization_name": "Acme Holdings",
"success": true,
"edi_transaction_id": "f2a73e8b-3c8b-4f1e-a4d2-1c2cda30c6e9",
"error": null,
"failed_skus": null
},
{
"edi_config_id": "8d6f9c12-2bd1-4d2a-9b3a-7c2cc4f51e44",
"retailer_id": "1c0bd477-5013-4db8-bc00-9c3a6c65a4da",
"retailer_name": "CVS",
"brand_name": "Acme Outdoor",
"organization_name": "Acme Holdings",
"success": false,
"edi_transaction_id": null,
"error": "502: Upstream EDI partner unavailable",
"failed_skus": null
}
],
"summary": {
"total": 2,
"succeeded": 1,
"failed": 1
}
}
}{
"message": "Invalid request body",
"error": {
"code": "INVALID_REQUEST",
"details": "items: At least 1 item required"
}
}{
"message": "Authentication failed",
"error": {
"code": "UNAUTHORIZED"
}
}{
"message": "Unauthorized",
"error": {
"code": "UNAUTHORIZED"
}
}{
"message": "No EDI configs with 846 inventory advice enabled for this brand and facility",
"error": {
"code": "NOT_FOUND"
}
}{
"message": "Internal server error",
"error": {
"code": "INTERNAL_SERVER_ERROR"
}
}Inventory
Send 846 Inventory Advice
Share your current on-hand inventory for a brand at a specific facility. We’ll generate and transmit an 846 Inventory Advice document to each retailer you have set up to receive inventory updates. You’ll get back a confirmation for each retailer the document was sent to.
POST
/
api
/
v1
/
inventory
/
brand
/
{brand_id}
/
facility
/
{facility_id}
Send 846 Inventory Advice
curl --request POST \
--url https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"sku": "PILLOW-01",
"available_quantity": 120
},
{
"sku": "PILLOW-02",
"available_quantity": 0
}
]
}
'import requests
url = "https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}"
payload = { "items": [
{
"sku": "PILLOW-01",
"available_quantity": 120
},
{
"sku": "PILLOW-02",
"available_quantity": 0
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{sku: 'PILLOW-01', available_quantity: 120},
{sku: 'PILLOW-02', available_quantity: 0}
]
})
};
fetch('https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_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://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'sku' => 'PILLOW-01',
'available_quantity' => 120
],
[
'sku' => 'PILLOW-02',
'available_quantity' => 0
]
]
]),
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://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}"
payload := strings.NewReader("{\n \"items\": [\n {\n \"sku\": \"PILLOW-01\",\n \"available_quantity\": 120\n },\n {\n \"sku\": \"PILLOW-02\",\n \"available_quantity\": 0\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"sku\": \"PILLOW-01\",\n \"available_quantity\": 120\n },\n {\n \"sku\": \"PILLOW-02\",\n \"available_quantity\": 0\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retailreadyai.com/api/v1/inventory/brand/{brand_id}/facility/{facility_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"sku\": \"PILLOW-01\",\n \"available_quantity\": 120\n },\n {\n \"sku\": \"PILLOW-02\",\n \"available_quantity\": 0\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "846 inventory advice sent successfully",
"data": {
"results": [
{
"edi_config_id": "1f2c1c4b-3d40-4e2c-8a8a-39d1e0a4cc11",
"retailer_id": "7eab3720-1944-4b01-aea6-972492f017e5",
"retailer_name": "Target",
"brand_name": "Acme Outdoor",
"organization_name": "Acme Holdings",
"success": true,
"edi_transaction_id": "f2a73e8b-3c8b-4f1e-a4d2-1c2cda30c6e9",
"error": null,
"failed_skus": null
}
],
"summary": {
"total": 1,
"succeeded": 1,
"failed": 0
}
}
}{
"message": "846 inventory advice partially completed: 1 succeeded, 1 failed",
"data": {
"results": [
{
"edi_config_id": "1f2c1c4b-3d40-4e2c-8a8a-39d1e0a4cc11",
"retailer_id": "7eab3720-1944-4b01-aea6-972492f017e5",
"retailer_name": "Target",
"brand_name": "Acme Outdoor",
"organization_name": "Acme Holdings",
"success": true,
"edi_transaction_id": "f2a73e8b-3c8b-4f1e-a4d2-1c2cda30c6e9",
"error": null,
"failed_skus": null
},
{
"edi_config_id": "8d6f9c12-2bd1-4d2a-9b3a-7c2cc4f51e44",
"retailer_id": "1c0bd477-5013-4db8-bc00-9c3a6c65a4da",
"retailer_name": "CVS",
"brand_name": "Acme Outdoor",
"organization_name": "Acme Holdings",
"success": false,
"edi_transaction_id": null,
"error": "502: Upstream EDI partner unavailable",
"failed_skus": null
}
],
"summary": {
"total": 2,
"succeeded": 1,
"failed": 1
}
}
}{
"message": "Invalid request body",
"error": {
"code": "INVALID_REQUEST",
"details": "items: At least 1 item required"
}
}{
"message": "Authentication failed",
"error": {
"code": "UNAUTHORIZED"
}
}{
"message": "Unauthorized",
"error": {
"code": "UNAUTHORIZED"
}
}{
"message": "No EDI configs with 846 inventory advice enabled for this brand and facility",
"error": {
"code": "NOT_FOUND"
}
}{
"message": "Internal server error",
"error": {
"code": "INTERNAL_SERVER_ERROR"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID of the brand
UUID of the facility
Body
application/json
A complete snapshot of on-hand inventory for this brand at this facility. Include every SKU you stock, any SKU you omit will not appear on the document sent to the retailer. Required field, between 1 and 1000 entries per request, and SKUs must be unique within the request.
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
⌘I

