Products
Create product
Creates a new product.
POST
/
products
Create product
curl --request POST \
--url https://api.staging.streamlinedpayments.com/api/v1/products \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"product": {
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"default_unit_price": 123,
"quickbooks_item_id": 123
}
}
'const options = {
method: 'POST',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
product: {
name: '<string>',
description: '<string>',
sku: '<string>',
default_unit_price: 123,
quickbooks_item_id: 123
}
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/products', 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"
payload = { "product": {
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"default_unit_price": 123,
"quickbooks_item_id": 123
} }
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")
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 \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"sku\": \"<string>\",\n \"default_unit_price\": 123,\n \"quickbooks_item_id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"product": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"default_unit_price": 123,
"unit": "each",
"currency": "USD",
"usage_count": 123,
"last_used_at": "2023-11-07T05:31:56Z",
"archived": true,
"quickbooks_item_id": 123,
"quickbooks_synced_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}⌘I
Create product
curl --request POST \
--url https://api.staging.streamlinedpayments.com/api/v1/products \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"product": {
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"default_unit_price": 123,
"quickbooks_item_id": 123
}
}
'const options = {
method: 'POST',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
product: {
name: '<string>',
description: '<string>',
sku: '<string>',
default_unit_price: 123,
quickbooks_item_id: 123
}
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/products', 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"
payload = { "product": {
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"default_unit_price": 123,
"quickbooks_item_id": 123
} }
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")
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 \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"sku\": \"<string>\",\n \"default_unit_price\": 123,\n \"quickbooks_item_id\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"product": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"default_unit_price": 123,
"unit": "each",
"currency": "USD",
"usage_count": 123,
"last_used_at": "2023-11-07T05:31:56Z",
"archived": true,
"quickbooks_item_id": 123,
"quickbooks_synced_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}