Create or update products
curl --request POST \
--url https://api.sandbox.usenash.com/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"name": "Organic Bananas",
"categories": [
"Produce",
"Fruits",
"Organic"
],
"weight": 0.5,
"dimensions": {
"depth": 8,
"height": 4,
"width": 12
},
"identifiers": [
{
"type": "UPC",
"value": "123456789012"
}
],
"externalIdentifier": "ext_001",
"sku": "ORG-BAN-001",
"description": "Fresh organic bananas, perfect for smoothies and baking",
"imageUrls": [
"https://example.com/bananas1.jpg",
"https://example.com/bananas2.jpg"
],
"attributes": [
"WEIGHTED"
],
"details": {
"packSizeSpecification": {
"description": "10 units per pack",
"value": 10
},
"sizeSpecification": {
"description": "ea",
"value": 1
},
"weightedItemInfo": {
"weightPerItem": 0.12,
"weightUnit": "kg"
}
},
"providerConfigs": [
{
"categories": [
"Produce",
"Fruits",
"Organic"
],
"provider": "X",
"serviceType": "pick_and_deliver"
}
]
}
]
}
'import requests
url = "https://api.sandbox.usenash.com/v1/products"
payload = { "products": [
{
"name": "Organic Bananas",
"categories": ["Produce", "Fruits", "Organic"],
"weight": 0.5,
"dimensions": {
"depth": 8,
"height": 4,
"width": 12
},
"identifiers": [
{
"type": "UPC",
"value": "123456789012"
}
],
"externalIdentifier": "ext_001",
"sku": "ORG-BAN-001",
"description": "Fresh organic bananas, perfect for smoothies and baking",
"imageUrls": ["https://example.com/bananas1.jpg", "https://example.com/bananas2.jpg"],
"attributes": ["WEIGHTED"],
"details": {
"packSizeSpecification": {
"description": "10 units per pack",
"value": 10
},
"sizeSpecification": {
"description": "ea",
"value": 1
},
"weightedItemInfo": {
"weightPerItem": 0.12,
"weightUnit": "kg"
}
},
"providerConfigs": [
{
"categories": ["Produce", "Fruits", "Organic"],
"provider": "X",
"serviceType": "pick_and_deliver"
}
]
}
] }
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({
products: [
{
name: 'Organic Bananas',
categories: ['Produce', 'Fruits', 'Organic'],
weight: 0.5,
dimensions: {depth: 8, height: 4, width: 12},
identifiers: [{type: 'UPC', value: '123456789012'}],
externalIdentifier: 'ext_001',
sku: 'ORG-BAN-001',
description: 'Fresh organic bananas, perfect for smoothies and baking',
imageUrls: ['https://example.com/bananas1.jpg', 'https://example.com/bananas2.jpg'],
attributes: ['WEIGHTED'],
details: {
packSizeSpecification: {description: '10 units per pack', value: 10},
sizeSpecification: {description: 'ea', value: 1},
weightedItemInfo: {weightPerItem: 0.12, weightUnit: 'kg'}
},
providerConfigs: [
{
categories: ['Produce', 'Fruits', 'Organic'],
provider: 'X',
serviceType: 'pick_and_deliver'
}
]
}
]
})
};
fetch('https://api.sandbox.usenash.com/v1/products', 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.sandbox.usenash.com/v1/products",
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([
'products' => [
[
'name' => 'Organic Bananas',
'categories' => [
'Produce',
'Fruits',
'Organic'
],
'weight' => 0.5,
'dimensions' => [
'depth' => 8,
'height' => 4,
'width' => 12
],
'identifiers' => [
[
'type' => 'UPC',
'value' => '123456789012'
]
],
'externalIdentifier' => 'ext_001',
'sku' => 'ORG-BAN-001',
'description' => 'Fresh organic bananas, perfect for smoothies and baking',
'imageUrls' => [
'https://example.com/bananas1.jpg',
'https://example.com/bananas2.jpg'
],
'attributes' => [
'WEIGHTED'
],
'details' => [
'packSizeSpecification' => [
'description' => '10 units per pack',
'value' => 10
],
'sizeSpecification' => [
'description' => 'ea',
'value' => 1
],
'weightedItemInfo' => [
'weightPerItem' => 0.12,
'weightUnit' => 'kg'
]
],
'providerConfigs' => [
[
'categories' => [
'Produce',
'Fruits',
'Organic'
],
'provider' => 'X',
'serviceType' => 'pick_and_deliver'
]
]
]
]
]),
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.sandbox.usenash.com/v1/products"
payload := strings.NewReader("{\n \"products\": [\n {\n \"name\": \"Organic Bananas\",\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"weight\": 0.5,\n \"dimensions\": {\n \"depth\": 8,\n \"height\": 4,\n \"width\": 12\n },\n \"identifiers\": [\n {\n \"type\": \"UPC\",\n \"value\": \"123456789012\"\n }\n ],\n \"externalIdentifier\": \"ext_001\",\n \"sku\": \"ORG-BAN-001\",\n \"description\": \"Fresh organic bananas, perfect for smoothies and baking\",\n \"imageUrls\": [\n \"https://example.com/bananas1.jpg\",\n \"https://example.com/bananas2.jpg\"\n ],\n \"attributes\": [\n \"WEIGHTED\"\n ],\n \"details\": {\n \"packSizeSpecification\": {\n \"description\": \"10 units per pack\",\n \"value\": 10\n },\n \"sizeSpecification\": {\n \"description\": \"ea\",\n \"value\": 1\n },\n \"weightedItemInfo\": {\n \"weightPerItem\": 0.12,\n \"weightUnit\": \"kg\"\n }\n },\n \"providerConfigs\": [\n {\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\"\n }\n ]\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.sandbox.usenash.com/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"products\": [\n {\n \"name\": \"Organic Bananas\",\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"weight\": 0.5,\n \"dimensions\": {\n \"depth\": 8,\n \"height\": 4,\n \"width\": 12\n },\n \"identifiers\": [\n {\n \"type\": \"UPC\",\n \"value\": \"123456789012\"\n }\n ],\n \"externalIdentifier\": \"ext_001\",\n \"sku\": \"ORG-BAN-001\",\n \"description\": \"Fresh organic bananas, perfect for smoothies and baking\",\n \"imageUrls\": [\n \"https://example.com/bananas1.jpg\",\n \"https://example.com/bananas2.jpg\"\n ],\n \"attributes\": [\n \"WEIGHTED\"\n ],\n \"details\": {\n \"packSizeSpecification\": {\n \"description\": \"10 units per pack\",\n \"value\": 10\n },\n \"sizeSpecification\": {\n \"description\": \"ea\",\n \"value\": 1\n },\n \"weightedItemInfo\": {\n \"weightPerItem\": 0.12,\n \"weightUnit\": \"kg\"\n }\n },\n \"providerConfigs\": [\n {\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/products")
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 \"products\": [\n {\n \"name\": \"Organic Bananas\",\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"weight\": 0.5,\n \"dimensions\": {\n \"depth\": 8,\n \"height\": 4,\n \"width\": 12\n },\n \"identifiers\": [\n {\n \"type\": \"UPC\",\n \"value\": \"123456789012\"\n }\n ],\n \"externalIdentifier\": \"ext_001\",\n \"sku\": \"ORG-BAN-001\",\n \"description\": \"Fresh organic bananas, perfect for smoothies and baking\",\n \"imageUrls\": [\n \"https://example.com/bananas1.jpg\",\n \"https://example.com/bananas2.jpg\"\n ],\n \"attributes\": [\n \"WEIGHTED\"\n ],\n \"details\": {\n \"packSizeSpecification\": {\n \"description\": \"10 units per pack\",\n \"value\": 10\n },\n \"sizeSpecification\": {\n \"description\": \"ea\",\n \"value\": 1\n },\n \"weightedItemInfo\": {\n \"weightPerItem\": 0.12,\n \"weightUnit\": \"kg\"\n }\n },\n \"providerConfigs\": [\n {\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "Organic Bananas",
"externalIdentifier": "ext_001",
"sku": "11111",
"description": "Fresh organic bananas, perfect for smoothies and baking",
"imageUrls": [
"https://example.com/bananas1.jpg",
"https://example.com/bananas2.jpg"
],
"categories": [
"Produce",
"Fruits",
"Organic"
],
"weight": 0.5,
"dimensions": {
"depth": 8,
"height": 4,
"width": 12
},
"identifiers": [
{
"type": "UPC",
"value": "123456789012"
}
],
"attributes": [
"WEIGHTED"
],
"details": {
"packSizeSpecification": {
"description": "10 units per pack",
"value": 10
},
"sizeSpecification": {
"description": "ea",
"value": 1
},
"weightedItemInfo": {
"weightPerItem": 0.12,
"weightUnit": "kg"
}
},
"providerConfigs": [
{
"categories": [
"Produce",
"Fruits",
"Organic"
],
"provider": "X",
"serviceType": "pick_and_deliver"
}
]
}
][
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Create or update products
Create new products or update existing ones in the store catalog. Products are matched by external identifier for upsert logic.
POST
/
v1
/
products
Create or update products
curl --request POST \
--url https://api.sandbox.usenash.com/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"name": "Organic Bananas",
"categories": [
"Produce",
"Fruits",
"Organic"
],
"weight": 0.5,
"dimensions": {
"depth": 8,
"height": 4,
"width": 12
},
"identifiers": [
{
"type": "UPC",
"value": "123456789012"
}
],
"externalIdentifier": "ext_001",
"sku": "ORG-BAN-001",
"description": "Fresh organic bananas, perfect for smoothies and baking",
"imageUrls": [
"https://example.com/bananas1.jpg",
"https://example.com/bananas2.jpg"
],
"attributes": [
"WEIGHTED"
],
"details": {
"packSizeSpecification": {
"description": "10 units per pack",
"value": 10
},
"sizeSpecification": {
"description": "ea",
"value": 1
},
"weightedItemInfo": {
"weightPerItem": 0.12,
"weightUnit": "kg"
}
},
"providerConfigs": [
{
"categories": [
"Produce",
"Fruits",
"Organic"
],
"provider": "X",
"serviceType": "pick_and_deliver"
}
]
}
]
}
'import requests
url = "https://api.sandbox.usenash.com/v1/products"
payload = { "products": [
{
"name": "Organic Bananas",
"categories": ["Produce", "Fruits", "Organic"],
"weight": 0.5,
"dimensions": {
"depth": 8,
"height": 4,
"width": 12
},
"identifiers": [
{
"type": "UPC",
"value": "123456789012"
}
],
"externalIdentifier": "ext_001",
"sku": "ORG-BAN-001",
"description": "Fresh organic bananas, perfect for smoothies and baking",
"imageUrls": ["https://example.com/bananas1.jpg", "https://example.com/bananas2.jpg"],
"attributes": ["WEIGHTED"],
"details": {
"packSizeSpecification": {
"description": "10 units per pack",
"value": 10
},
"sizeSpecification": {
"description": "ea",
"value": 1
},
"weightedItemInfo": {
"weightPerItem": 0.12,
"weightUnit": "kg"
}
},
"providerConfigs": [
{
"categories": ["Produce", "Fruits", "Organic"],
"provider": "X",
"serviceType": "pick_and_deliver"
}
]
}
] }
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({
products: [
{
name: 'Organic Bananas',
categories: ['Produce', 'Fruits', 'Organic'],
weight: 0.5,
dimensions: {depth: 8, height: 4, width: 12},
identifiers: [{type: 'UPC', value: '123456789012'}],
externalIdentifier: 'ext_001',
sku: 'ORG-BAN-001',
description: 'Fresh organic bananas, perfect for smoothies and baking',
imageUrls: ['https://example.com/bananas1.jpg', 'https://example.com/bananas2.jpg'],
attributes: ['WEIGHTED'],
details: {
packSizeSpecification: {description: '10 units per pack', value: 10},
sizeSpecification: {description: 'ea', value: 1},
weightedItemInfo: {weightPerItem: 0.12, weightUnit: 'kg'}
},
providerConfigs: [
{
categories: ['Produce', 'Fruits', 'Organic'],
provider: 'X',
serviceType: 'pick_and_deliver'
}
]
}
]
})
};
fetch('https://api.sandbox.usenash.com/v1/products', 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.sandbox.usenash.com/v1/products",
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([
'products' => [
[
'name' => 'Organic Bananas',
'categories' => [
'Produce',
'Fruits',
'Organic'
],
'weight' => 0.5,
'dimensions' => [
'depth' => 8,
'height' => 4,
'width' => 12
],
'identifiers' => [
[
'type' => 'UPC',
'value' => '123456789012'
]
],
'externalIdentifier' => 'ext_001',
'sku' => 'ORG-BAN-001',
'description' => 'Fresh organic bananas, perfect for smoothies and baking',
'imageUrls' => [
'https://example.com/bananas1.jpg',
'https://example.com/bananas2.jpg'
],
'attributes' => [
'WEIGHTED'
],
'details' => [
'packSizeSpecification' => [
'description' => '10 units per pack',
'value' => 10
],
'sizeSpecification' => [
'description' => 'ea',
'value' => 1
],
'weightedItemInfo' => [
'weightPerItem' => 0.12,
'weightUnit' => 'kg'
]
],
'providerConfigs' => [
[
'categories' => [
'Produce',
'Fruits',
'Organic'
],
'provider' => 'X',
'serviceType' => 'pick_and_deliver'
]
]
]
]
]),
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.sandbox.usenash.com/v1/products"
payload := strings.NewReader("{\n \"products\": [\n {\n \"name\": \"Organic Bananas\",\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"weight\": 0.5,\n \"dimensions\": {\n \"depth\": 8,\n \"height\": 4,\n \"width\": 12\n },\n \"identifiers\": [\n {\n \"type\": \"UPC\",\n \"value\": \"123456789012\"\n }\n ],\n \"externalIdentifier\": \"ext_001\",\n \"sku\": \"ORG-BAN-001\",\n \"description\": \"Fresh organic bananas, perfect for smoothies and baking\",\n \"imageUrls\": [\n \"https://example.com/bananas1.jpg\",\n \"https://example.com/bananas2.jpg\"\n ],\n \"attributes\": [\n \"WEIGHTED\"\n ],\n \"details\": {\n \"packSizeSpecification\": {\n \"description\": \"10 units per pack\",\n \"value\": 10\n },\n \"sizeSpecification\": {\n \"description\": \"ea\",\n \"value\": 1\n },\n \"weightedItemInfo\": {\n \"weightPerItem\": 0.12,\n \"weightUnit\": \"kg\"\n }\n },\n \"providerConfigs\": [\n {\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\"\n }\n ]\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.sandbox.usenash.com/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"products\": [\n {\n \"name\": \"Organic Bananas\",\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"weight\": 0.5,\n \"dimensions\": {\n \"depth\": 8,\n \"height\": 4,\n \"width\": 12\n },\n \"identifiers\": [\n {\n \"type\": \"UPC\",\n \"value\": \"123456789012\"\n }\n ],\n \"externalIdentifier\": \"ext_001\",\n \"sku\": \"ORG-BAN-001\",\n \"description\": \"Fresh organic bananas, perfect for smoothies and baking\",\n \"imageUrls\": [\n \"https://example.com/bananas1.jpg\",\n \"https://example.com/bananas2.jpg\"\n ],\n \"attributes\": [\n \"WEIGHTED\"\n ],\n \"details\": {\n \"packSizeSpecification\": {\n \"description\": \"10 units per pack\",\n \"value\": 10\n },\n \"sizeSpecification\": {\n \"description\": \"ea\",\n \"value\": 1\n },\n \"weightedItemInfo\": {\n \"weightPerItem\": 0.12,\n \"weightUnit\": \"kg\"\n }\n },\n \"providerConfigs\": [\n {\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/products")
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 \"products\": [\n {\n \"name\": \"Organic Bananas\",\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"weight\": 0.5,\n \"dimensions\": {\n \"depth\": 8,\n \"height\": 4,\n \"width\": 12\n },\n \"identifiers\": [\n {\n \"type\": \"UPC\",\n \"value\": \"123456789012\"\n }\n ],\n \"externalIdentifier\": \"ext_001\",\n \"sku\": \"ORG-BAN-001\",\n \"description\": \"Fresh organic bananas, perfect for smoothies and baking\",\n \"imageUrls\": [\n \"https://example.com/bananas1.jpg\",\n \"https://example.com/bananas2.jpg\"\n ],\n \"attributes\": [\n \"WEIGHTED\"\n ],\n \"details\": {\n \"packSizeSpecification\": {\n \"description\": \"10 units per pack\",\n \"value\": 10\n },\n \"sizeSpecification\": {\n \"description\": \"ea\",\n \"value\": 1\n },\n \"weightedItemInfo\": {\n \"weightPerItem\": 0.12,\n \"weightUnit\": \"kg\"\n }\n },\n \"providerConfigs\": [\n {\n \"categories\": [\n \"Produce\",\n \"Fruits\",\n \"Organic\"\n ],\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"name": "Organic Bananas",
"externalIdentifier": "ext_001",
"sku": "11111",
"description": "Fresh organic bananas, perfect for smoothies and baking",
"imageUrls": [
"https://example.com/bananas1.jpg",
"https://example.com/bananas2.jpg"
],
"categories": [
"Produce",
"Fruits",
"Organic"
],
"weight": 0.5,
"dimensions": {
"depth": 8,
"height": 4,
"width": 12
},
"identifiers": [
{
"type": "UPC",
"value": "123456789012"
}
],
"attributes": [
"WEIGHTED"
],
"details": {
"packSizeSpecification": {
"description": "10 units per pack",
"value": 10
},
"sizeSpecification": {
"description": "ea",
"value": 1
},
"weightedItemInfo": {
"weightPerItem": 0.12,
"weightUnit": "kg"
}
},
"providerConfigs": [
{
"categories": [
"Produce",
"Fruits",
"Organic"
],
"provider": "X",
"serviceType": "pick_and_deliver"
}
]
}
][
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Authorizations
Body
application/json
Response
OK
Additional product details including weight and size specifications
Show child attributes
Show child attributes
Example:
{
"packSizeSpecification": {
"description": "10 units per pack",
"value": 10
},
"sizeSpecification": { "description": "ea", "value": 1 },
"weightedItemInfo": { "weightPerItem": 0.12, "weightUnit": "kg" }
}
Was this page helpful?