cURL
curl --request POST \
--url https://api.atlast.co/v1/orders/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orders": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"orderNumber": "<string>",
"orderTotal": {
"value": 1,
"currency": "<string>"
},
"itemSubTotal": {
"value": 1,
"currency": "<string>"
},
"shippingTotal": {
"value": 1,
"currency": "<string>"
},
"items": [
{
"id": "<string>",
"quantity": 2,
"price": {
"value": 1,
"currency": "<string>"
},
"imageUrl": "<string>",
"sku": "<string>",
"name": "<string>",
"variantName": "<string>",
"description": "<string>",
"hsCode": "<string>",
"countryCodeOfOrigin": "<string>"
}
],
"customer": {
"lastName": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postCode": "<string>",
"country": "<string>",
"line2": "<string>",
"line3": "<string>",
"company": "<string>",
"province": "<string>"
},
"firstName": "<string>",
"phone": "<string>"
},
"merchantId": "<string>",
"reference": "<string>",
"userEmail": "jsmith@example.com"
}
]
}
'import requests
url = "https://api.atlast.co/v1/orders/bulk"
payload = { "orders": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"orderNumber": "<string>",
"orderTotal": {
"value": 1,
"currency": "<string>"
},
"itemSubTotal": {
"value": 1,
"currency": "<string>"
},
"shippingTotal": {
"value": 1,
"currency": "<string>"
},
"items": [
{
"id": "<string>",
"quantity": 2,
"price": {
"value": 1,
"currency": "<string>"
},
"imageUrl": "<string>",
"sku": "<string>",
"name": "<string>",
"variantName": "<string>",
"description": "<string>",
"hsCode": "<string>",
"countryCodeOfOrigin": "<string>"
}
],
"customer": {
"lastName": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postCode": "<string>",
"country": "<string>",
"line2": "<string>",
"line3": "<string>",
"company": "<string>",
"province": "<string>"
},
"firstName": "<string>",
"phone": "<string>"
},
"merchantId": "<string>",
"reference": "<string>",
"userEmail": "jsmith@example.com"
}
] }
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({
orders: [
{
id: '<string>',
createdAt: '2023-11-07T05:31:56Z',
orderNumber: '<string>',
orderTotal: {value: 1, currency: '<string>'},
itemSubTotal: {value: 1, currency: '<string>'},
shippingTotal: {value: 1, currency: '<string>'},
items: [
{
id: '<string>',
quantity: 2,
price: {value: 1, currency: '<string>'},
imageUrl: '<string>',
sku: '<string>',
name: '<string>',
variantName: '<string>',
description: '<string>',
hsCode: '<string>',
countryCodeOfOrigin: '<string>'
}
],
customer: {
lastName: '<string>',
address: {
line1: '<string>',
city: '<string>',
postCode: '<string>',
country: '<string>',
line2: '<string>',
line3: '<string>',
company: '<string>',
province: '<string>'
},
firstName: '<string>',
phone: '<string>'
},
merchantId: '<string>',
reference: '<string>',
userEmail: 'jsmith@example.com'
}
]
})
};
fetch('https://api.atlast.co/v1/orders/bulk', 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.atlast.co/v1/orders/bulk",
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([
'orders' => [
[
'id' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'orderNumber' => '<string>',
'orderTotal' => [
'value' => 1,
'currency' => '<string>'
],
'itemSubTotal' => [
'value' => 1,
'currency' => '<string>'
],
'shippingTotal' => [
'value' => 1,
'currency' => '<string>'
],
'items' => [
[
'id' => '<string>',
'quantity' => 2,
'price' => [
'value' => 1,
'currency' => '<string>'
],
'imageUrl' => '<string>',
'sku' => '<string>',
'name' => '<string>',
'variantName' => '<string>',
'description' => '<string>',
'hsCode' => '<string>',
'countryCodeOfOrigin' => '<string>'
]
],
'customer' => [
'lastName' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postCode' => '<string>',
'country' => '<string>',
'line2' => '<string>',
'line3' => '<string>',
'company' => '<string>',
'province' => '<string>'
],
'firstName' => '<string>',
'phone' => '<string>'
],
'merchantId' => '<string>',
'reference' => '<string>',
'userEmail' => 'jsmith@example.com'
]
]
]),
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.atlast.co/v1/orders/bulk"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"id\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"orderNumber\": \"<string>\",\n \"orderTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"itemSubTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"shippingTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"items\": [\n {\n \"id\": \"<string>\",\n \"quantity\": 2,\n \"price\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"imageUrl\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"variantName\": \"<string>\",\n \"description\": \"<string>\",\n \"hsCode\": \"<string>\",\n \"countryCodeOfOrigin\": \"<string>\"\n }\n ],\n \"customer\": {\n \"lastName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postCode\": \"<string>\",\n \"country\": \"<string>\",\n \"line2\": \"<string>\",\n \"line3\": \"<string>\",\n \"company\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"firstName\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"merchantId\": \"<string>\",\n \"reference\": \"<string>\",\n \"userEmail\": \"jsmith@example.com\"\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.atlast.co/v1/orders/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"id\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"orderNumber\": \"<string>\",\n \"orderTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"itemSubTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"shippingTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"items\": [\n {\n \"id\": \"<string>\",\n \"quantity\": 2,\n \"price\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"imageUrl\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"variantName\": \"<string>\",\n \"description\": \"<string>\",\n \"hsCode\": \"<string>\",\n \"countryCodeOfOrigin\": \"<string>\"\n }\n ],\n \"customer\": {\n \"lastName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postCode\": \"<string>\",\n \"country\": \"<string>\",\n \"line2\": \"<string>\",\n \"line3\": \"<string>\",\n \"company\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"firstName\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"merchantId\": \"<string>\",\n \"reference\": \"<string>\",\n \"userEmail\": \"jsmith@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlast.co/v1/orders/bulk")
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 \"orders\": [\n {\n \"id\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"orderNumber\": \"<string>\",\n \"orderTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"itemSubTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"shippingTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"items\": [\n {\n \"id\": \"<string>\",\n \"quantity\": 2,\n \"price\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"imageUrl\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"variantName\": \"<string>\",\n \"description\": \"<string>\",\n \"hsCode\": \"<string>\",\n \"countryCodeOfOrigin\": \"<string>\"\n }\n ],\n \"customer\": {\n \"lastName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postCode\": \"<string>\",\n \"country\": \"<string>\",\n \"line2\": \"<string>\",\n \"line3\": \"<string>\",\n \"company\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"firstName\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"merchantId\": \"<string>\",\n \"reference\": \"<string>\",\n \"userEmail\": \"jsmith@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyOrders
Bulk create orders
POST
/
orders
/
bulk
cURL
curl --request POST \
--url https://api.atlast.co/v1/orders/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orders": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"orderNumber": "<string>",
"orderTotal": {
"value": 1,
"currency": "<string>"
},
"itemSubTotal": {
"value": 1,
"currency": "<string>"
},
"shippingTotal": {
"value": 1,
"currency": "<string>"
},
"items": [
{
"id": "<string>",
"quantity": 2,
"price": {
"value": 1,
"currency": "<string>"
},
"imageUrl": "<string>",
"sku": "<string>",
"name": "<string>",
"variantName": "<string>",
"description": "<string>",
"hsCode": "<string>",
"countryCodeOfOrigin": "<string>"
}
],
"customer": {
"lastName": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postCode": "<string>",
"country": "<string>",
"line2": "<string>",
"line3": "<string>",
"company": "<string>",
"province": "<string>"
},
"firstName": "<string>",
"phone": "<string>"
},
"merchantId": "<string>",
"reference": "<string>",
"userEmail": "jsmith@example.com"
}
]
}
'import requests
url = "https://api.atlast.co/v1/orders/bulk"
payload = { "orders": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"orderNumber": "<string>",
"orderTotal": {
"value": 1,
"currency": "<string>"
},
"itemSubTotal": {
"value": 1,
"currency": "<string>"
},
"shippingTotal": {
"value": 1,
"currency": "<string>"
},
"items": [
{
"id": "<string>",
"quantity": 2,
"price": {
"value": 1,
"currency": "<string>"
},
"imageUrl": "<string>",
"sku": "<string>",
"name": "<string>",
"variantName": "<string>",
"description": "<string>",
"hsCode": "<string>",
"countryCodeOfOrigin": "<string>"
}
],
"customer": {
"lastName": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postCode": "<string>",
"country": "<string>",
"line2": "<string>",
"line3": "<string>",
"company": "<string>",
"province": "<string>"
},
"firstName": "<string>",
"phone": "<string>"
},
"merchantId": "<string>",
"reference": "<string>",
"userEmail": "jsmith@example.com"
}
] }
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({
orders: [
{
id: '<string>',
createdAt: '2023-11-07T05:31:56Z',
orderNumber: '<string>',
orderTotal: {value: 1, currency: '<string>'},
itemSubTotal: {value: 1, currency: '<string>'},
shippingTotal: {value: 1, currency: '<string>'},
items: [
{
id: '<string>',
quantity: 2,
price: {value: 1, currency: '<string>'},
imageUrl: '<string>',
sku: '<string>',
name: '<string>',
variantName: '<string>',
description: '<string>',
hsCode: '<string>',
countryCodeOfOrigin: '<string>'
}
],
customer: {
lastName: '<string>',
address: {
line1: '<string>',
city: '<string>',
postCode: '<string>',
country: '<string>',
line2: '<string>',
line3: '<string>',
company: '<string>',
province: '<string>'
},
firstName: '<string>',
phone: '<string>'
},
merchantId: '<string>',
reference: '<string>',
userEmail: 'jsmith@example.com'
}
]
})
};
fetch('https://api.atlast.co/v1/orders/bulk', 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.atlast.co/v1/orders/bulk",
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([
'orders' => [
[
'id' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'orderNumber' => '<string>',
'orderTotal' => [
'value' => 1,
'currency' => '<string>'
],
'itemSubTotal' => [
'value' => 1,
'currency' => '<string>'
],
'shippingTotal' => [
'value' => 1,
'currency' => '<string>'
],
'items' => [
[
'id' => '<string>',
'quantity' => 2,
'price' => [
'value' => 1,
'currency' => '<string>'
],
'imageUrl' => '<string>',
'sku' => '<string>',
'name' => '<string>',
'variantName' => '<string>',
'description' => '<string>',
'hsCode' => '<string>',
'countryCodeOfOrigin' => '<string>'
]
],
'customer' => [
'lastName' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postCode' => '<string>',
'country' => '<string>',
'line2' => '<string>',
'line3' => '<string>',
'company' => '<string>',
'province' => '<string>'
],
'firstName' => '<string>',
'phone' => '<string>'
],
'merchantId' => '<string>',
'reference' => '<string>',
'userEmail' => 'jsmith@example.com'
]
]
]),
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.atlast.co/v1/orders/bulk"
payload := strings.NewReader("{\n \"orders\": [\n {\n \"id\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"orderNumber\": \"<string>\",\n \"orderTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"itemSubTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"shippingTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"items\": [\n {\n \"id\": \"<string>\",\n \"quantity\": 2,\n \"price\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"imageUrl\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"variantName\": \"<string>\",\n \"description\": \"<string>\",\n \"hsCode\": \"<string>\",\n \"countryCodeOfOrigin\": \"<string>\"\n }\n ],\n \"customer\": {\n \"lastName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postCode\": \"<string>\",\n \"country\": \"<string>\",\n \"line2\": \"<string>\",\n \"line3\": \"<string>\",\n \"company\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"firstName\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"merchantId\": \"<string>\",\n \"reference\": \"<string>\",\n \"userEmail\": \"jsmith@example.com\"\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.atlast.co/v1/orders/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orders\": [\n {\n \"id\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"orderNumber\": \"<string>\",\n \"orderTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"itemSubTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"shippingTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"items\": [\n {\n \"id\": \"<string>\",\n \"quantity\": 2,\n \"price\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"imageUrl\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"variantName\": \"<string>\",\n \"description\": \"<string>\",\n \"hsCode\": \"<string>\",\n \"countryCodeOfOrigin\": \"<string>\"\n }\n ],\n \"customer\": {\n \"lastName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postCode\": \"<string>\",\n \"country\": \"<string>\",\n \"line2\": \"<string>\",\n \"line3\": \"<string>\",\n \"company\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"firstName\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"merchantId\": \"<string>\",\n \"reference\": \"<string>\",\n \"userEmail\": \"jsmith@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.atlast.co/v1/orders/bulk")
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 \"orders\": [\n {\n \"id\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"orderNumber\": \"<string>\",\n \"orderTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"itemSubTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"shippingTotal\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"items\": [\n {\n \"id\": \"<string>\",\n \"quantity\": 2,\n \"price\": {\n \"value\": 1,\n \"currency\": \"<string>\"\n },\n \"imageUrl\": \"<string>\",\n \"sku\": \"<string>\",\n \"name\": \"<string>\",\n \"variantName\": \"<string>\",\n \"description\": \"<string>\",\n \"hsCode\": \"<string>\",\n \"countryCodeOfOrigin\": \"<string>\"\n }\n ],\n \"customer\": {\n \"lastName\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postCode\": \"<string>\",\n \"country\": \"<string>\",\n \"line2\": \"<string>\",\n \"line3\": \"<string>\",\n \"company\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"firstName\": \"<string>\",\n \"phone\": \"<string>\"\n },\n \"merchantId\": \"<string>\",\n \"reference\": \"<string>\",\n \"userEmail\": \"jsmith@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyOrders can be ingested with an integration or programatically using this endpoint
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Response
201
The request has succeeded and a new resource has been created as a result.
⌘I