Orders
Create order
Creates a new order.
POST
/
orders
Create order
curl --request POST \
--url https://api.staging.streamlinedpayments.com/api/v1/orders \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"order": {
"customer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"total_amount": 123,
"po_number": "<string>",
"tax_amount": 123,
"discount_amount": 123,
"shipping_amount": 123,
"description": "<string>",
"due_date": "2023-12-25",
"line_items_attributes": [
{
"description": "<string>",
"quantity": 123,
"net_amount": 123,
"discount_bps": 123,
"unit": "each",
"product_id": 123
}
]
}
}
'const options = {
method: 'POST',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order: {
customer_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
total_amount: 123,
po_number: '<string>',
tax_amount: 123,
discount_amount: 123,
shipping_amount: 123,
description: '<string>',
due_date: '2023-12-25',
line_items_attributes: [
{
description: '<string>',
quantity: 123,
net_amount: 123,
discount_bps: 123,
unit: 'each',
product_id: 123
}
]
}
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/orders', 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/orders"
payload = { "order": {
"customer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"total_amount": 123,
"po_number": "<string>",
"tax_amount": 123,
"discount_amount": 123,
"shipping_amount": 123,
"description": "<string>",
"due_date": "2023-12-25",
"line_items_attributes": [
{
"description": "<string>",
"quantity": 123,
"net_amount": 123,
"discount_bps": 123,
"unit": "each",
"product_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/orders")
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 \"order\": {\n \"customer_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"total_amount\": 123,\n \"po_number\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123,\n \"shipping_amount\": 123,\n \"description\": \"<string>\",\n \"due_date\": \"2023-12-25\",\n \"line_items_attributes\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"net_amount\": 123,\n \"discount_bps\": 123,\n \"unit\": \"each\",\n \"product_id\": 123\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"order": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"total_amount": 123,
"tax_amount": 123,
"discount_amount": 123,
"shipping_amount": 123,
"currency": "USD",
"description": "<string>",
"po_number": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"scheduled": true,
"issued_at": "2023-11-07T05:31:56Z",
"invoiced": true,
"recipient": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_name": "<string>",
"display_name": "<string>"
},
"line_items": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"quantity": "2.0",
"net_amount": 123,
"discount_bps": 123,
"unit": "each"
}
],
"invoice": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}⌘I
Create order
curl --request POST \
--url https://api.staging.streamlinedpayments.com/api/v1/orders \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-App-Id: <api-key>' \
--data '
{
"order": {
"customer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"total_amount": 123,
"po_number": "<string>",
"tax_amount": 123,
"discount_amount": 123,
"shipping_amount": 123,
"description": "<string>",
"due_date": "2023-12-25",
"line_items_attributes": [
{
"description": "<string>",
"quantity": 123,
"net_amount": 123,
"discount_bps": 123,
"unit": "each",
"product_id": 123
}
]
}
}
'const options = {
method: 'POST',
headers: {
'X-App-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order: {
customer_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
total_amount: 123,
po_number: '<string>',
tax_amount: 123,
discount_amount: 123,
shipping_amount: 123,
description: '<string>',
due_date: '2023-12-25',
line_items_attributes: [
{
description: '<string>',
quantity: 123,
net_amount: 123,
discount_bps: 123,
unit: 'each',
product_id: 123
}
]
}
})
};
fetch('https://api.staging.streamlinedpayments.com/api/v1/orders', 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/orders"
payload = { "order": {
"customer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"total_amount": 123,
"po_number": "<string>",
"tax_amount": 123,
"discount_amount": 123,
"shipping_amount": 123,
"description": "<string>",
"due_date": "2023-12-25",
"line_items_attributes": [
{
"description": "<string>",
"quantity": 123,
"net_amount": 123,
"discount_bps": 123,
"unit": "each",
"product_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/orders")
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 \"order\": {\n \"customer_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"total_amount\": 123,\n \"po_number\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123,\n \"shipping_amount\": 123,\n \"description\": \"<string>\",\n \"due_date\": \"2023-12-25\",\n \"line_items_attributes\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"net_amount\": 123,\n \"discount_bps\": 123,\n \"unit\": \"each\",\n \"product_id\": 123\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"order": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"total_amount": 123,
"tax_amount": 123,
"discount_amount": 123,
"shipping_amount": 123,
"currency": "USD",
"description": "<string>",
"po_number": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"scheduled": true,
"issued_at": "2023-11-07T05:31:56Z",
"invoiced": true,
"recipient": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_name": "<string>",
"display_name": "<string>"
},
"line_items": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"quantity": "2.0",
"net_amount": 123,
"discount_bps": 123,
"unit": "each"
}
],
"invoice": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}