Products
Bulk import products
Import multiple products at once. Creates new products or updates existing ones.
Matching Logic:
- If
uuidis provided, updates the existing product with that UUID - If
skumatches an existing product (and no uuid), updates that product - Otherwise, creates a new product
Validation: All rows are validated before any changes are made. If any validation errors occur, no products are created or updated.
Limits:
- Maximum 1000 products per request
- Products not included in the import are NOT affected (no auto-archiving)
POST
/
products
/
import
Bulk import products
curl --request POST \
--url https://api.staging.streamlinedpayments.com/api/v1/products/import \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"on_duplicate": "update",
"products": [
{
"uuid": null,
"name": "New Product",
"description": "A new product",
"sku": "SKU001",
"unit": "each",
"default_unit_price": 1999,
"currency": "USD"
},
{
"uuid": "abc-123-def",
"name": "Updated Product",
"sku": "SKU002"
}
]
}
'const options = {
method: 'POST',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
on_duplicate: 'update',
products: [
{
uuid: null,
name: 'New Product',
description: 'A new product',
sku: 'SKU001',
unit: 'each',
default_unit_price: 1999,
currency: 'USD'
},
{uuid: 'abc-123-def', name: 'Updated Product', sku: 'SKU002'}
]
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/products/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.staging.streamlinedpayments.com/api/v1/products/import"
payload = {
"on_duplicate": "update",
"products": [
{
"uuid": None,
"name": "New Product",
"description": "A new product",
"sku": "SKU001",
"unit": "each",
"default_unit_price": 1999,
"currency": "USD"
},
{
"uuid": "abc-123-def",
"name": "Updated Product",
"sku": "SKU002"
}
]
}
headers = {
"X-App-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.staging.streamlinedpayments.com/api/v1/products/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-App-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"on_duplicate\": \"update\",\n \"products\": [\n {\n \"uuid\": null,\n \"name\": \"New Product\",\n \"description\": \"A new product\",\n \"sku\": \"SKU001\",\n \"unit\": \"each\",\n \"default_unit_price\": 1999,\n \"currency\": \"USD\"\n },\n {\n \"uuid\": \"abc-123-def\",\n \"name\": \"Updated Product\",\n \"sku\": \"SKU002\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"summary": {
"created": 5,
"updated": 10,
"skipped": 2
},
"products": [
{
"uuid": "new-uuid-1",
"name": "Product 1",
"status": "created"
},
{
"uuid": "abc-123",
"name": "Product 2",
"status": "updated"
}
]
}Authorizations
App ID for authentication
API Key for authentication
Body
application/json
⌘I
Bulk import products
curl --request POST \
--url https://api.staging.streamlinedpayments.com/api/v1/products/import \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"on_duplicate": "update",
"products": [
{
"uuid": null,
"name": "New Product",
"description": "A new product",
"sku": "SKU001",
"unit": "each",
"default_unit_price": 1999,
"currency": "USD"
},
{
"uuid": "abc-123-def",
"name": "Updated Product",
"sku": "SKU002"
}
]
}
'const options = {
method: 'POST',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
on_duplicate: 'update',
products: [
{
uuid: null,
name: 'New Product',
description: 'A new product',
sku: 'SKU001',
unit: 'each',
default_unit_price: 1999,
currency: 'USD'
},
{uuid: 'abc-123-def', name: 'Updated Product', sku: 'SKU002'}
]
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/products/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.staging.streamlinedpayments.com/api/v1/products/import"
payload = {
"on_duplicate": "update",
"products": [
{
"uuid": None,
"name": "New Product",
"description": "A new product",
"sku": "SKU001",
"unit": "each",
"default_unit_price": 1999,
"currency": "USD"
},
{
"uuid": "abc-123-def",
"name": "Updated Product",
"sku": "SKU002"
}
]
}
headers = {
"X-App-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.staging.streamlinedpayments.com/api/v1/products/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-App-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"on_duplicate\": \"update\",\n \"products\": [\n {\n \"uuid\": null,\n \"name\": \"New Product\",\n \"description\": \"A new product\",\n \"sku\": \"SKU001\",\n \"unit\": \"each\",\n \"default_unit_price\": 1999,\n \"currency\": \"USD\"\n },\n {\n \"uuid\": \"abc-123-def\",\n \"name\": \"Updated Product\",\n \"sku\": \"SKU002\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"summary": {
"created": 5,
"updated": 10,
"skipped": 2
},
"products": [
{
"uuid": "new-uuid-1",
"name": "Product 1",
"status": "created"
},
{
"uuid": "abc-123",
"name": "Product 2",
"status": "updated"
}
]
}