cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/orders/express" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"account": {
"id": "ACC0001",
"order": {
"price_tax_inclusive": false,
"properties": {
"fulfillment_mode": "MANUAL",
"fulfillment_term": "IMMEDIATELY"
},
"lines": [
{
"item_id": "ITEM-0001",
"item_order_quantity": 2,
"item_price_snapshot": {
"pricing_rule": {
"price": 1.5
}
},
"tax_exempt_when_sold": true
}
]
}
}
}'from exsited import build_client
client = build_client()
response = client.orders.create_order_express(
{
"account": {
"id": "ACC0001",
"order": {
"price_tax_inclusive": False,
"properties": {
"fulfillment_mode": "MANUAL",
"fulfillment_term": "IMMEDIATELY",
},
"lines": [
{
"item_id": "ITEM-0001",
"item_order_quantity": 2,
"item_price_snapshot": {"pricing_rule": {"price": 1.5}},
"tax_exempt_when_sold": True,
}
],
},
}
}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.orders.createOrderExpress({
account: {
id: 'ACC0001',
order: {
price_tax_inclusive: false,
properties: {fulfillment_mode: 'MANUAL', fulfillment_term: 'IMMEDIATELY'},
lines: [
{
item_id: 'ITEM-0001',
item_order_quantity: 2,
item_price_snapshot: {pricing_rule: {price: 1.5}},
tax_exempt_when_sold: true,
},
],
},
},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->orders->createOrderExpress([
'account' => [
'id' => 'ACC0001',
'order' => [
'price_tax_inclusive' => false,
'properties' => ['fulfillment_mode' => 'MANUAL', 'fulfillment_term' => 'IMMEDIATELY'],
'lines' => [
[
'item_id' => 'ITEM-0001',
'item_order_quantity' => 2,
'item_price_snapshot' => ['pricing_rule' => ['price' => 1.5]],
'tax_exempt_when_sold' => true,
],
],
],
],
]);
print_r($response->data);
import com.exsited.Dto;
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import java.util.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Dto> response = client.orders().createOrderExpress(
Map.of(
"account", Map.of(
"id", "ACC0001",
"order", Map.of(
"price_tax_inclusive", false,
"properties", Map.of(
"fulfillment_mode", "MANUAL",
"fulfillment_term", "IMMEDIATELY"),
"lines", List.of(
Map.of(
"item_id", "ITEM-0001",
"item_order_quantity", 2,
"item_price_snapshot", Map.of(
"pricing_rule", Map.of("price", 1.5)),
"tax_exempt_when_sold", true))))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Orders.CreateOrderExpressAsync(new Dictionary<string, object?>
{
["account"] = new Dictionary<string, object?>
{
["id"] = "ACC0001",
["order"] = new Dictionary<string, object?>
{
["price_tax_inclusive"] = false,
["properties"] = new Dictionary<string, object?>
{
["fulfillment_mode"] = "MANUAL",
["fulfillment_term"] = "IMMEDIATELY",
},
["lines"] = new List<object?>
{
new Dictionary<string, object?>
{
["item_id"] = "ITEM-0001",
["item_order_quantity"] = 2,
["item_price_snapshot"] = new Dictionary<string, object?>
{
["pricing_rule"] = new Dictionary<string, object?>
{
["price"] = 1.5,
},
},
["tax_exempt_when_sold"] = true,
},
},
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.orders.createOrderExpress({
'account': {
'id': 'ACC0001',
'order': {
'price_tax_inclusive': false,
'properties': {
'fulfillment_mode': 'MANUAL',
'fulfillment_term': 'IMMEDIATELY',
},
'lines': [
{
'item_id': 'ITEM-0001',
'item_order_quantity': 2,
'item_price_snapshot': {
'pricing_rule': {'price': 1.5},
},
'tax_exempt_when_sold': true,
},
],
},
},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Orders().CreateOrderExpress(context.Background(), map[string]any{
"account": map[string]any{
"id": "ACC0001",
"order": map[string]any{
"price_tax_inclusive": false,
"properties": map[string]any{
"fulfillment_mode": "MANUAL",
"fulfillment_term": "IMMEDIATELY",
},
"lines": []any{
map[string]any{
"item_id": "ITEM-0001",
"item_order_quantity": 2,
"item_price_snapshot": map[string]any{
"pricing_rule": map[string]any{"price": 1.5},
},
"tax_exempt_when_sold": true,
},
},
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
Orders
Create an order through the express path
Creates an order, and its invoice and payment if the body nests them, in one call.
POST
/
orders
/
express
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/orders/express" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"account": {
"id": "ACC0001",
"order": {
"price_tax_inclusive": false,
"properties": {
"fulfillment_mode": "MANUAL",
"fulfillment_term": "IMMEDIATELY"
},
"lines": [
{
"item_id": "ITEM-0001",
"item_order_quantity": 2,
"item_price_snapshot": {
"pricing_rule": {
"price": 1.5
}
},
"tax_exempt_when_sold": true
}
]
}
}
}'from exsited import build_client
client = build_client()
response = client.orders.create_order_express(
{
"account": {
"id": "ACC0001",
"order": {
"price_tax_inclusive": False,
"properties": {
"fulfillment_mode": "MANUAL",
"fulfillment_term": "IMMEDIATELY",
},
"lines": [
{
"item_id": "ITEM-0001",
"item_order_quantity": 2,
"item_price_snapshot": {"pricing_rule": {"price": 1.5}},
"tax_exempt_when_sold": True,
}
],
},
}
}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.orders.createOrderExpress({
account: {
id: 'ACC0001',
order: {
price_tax_inclusive: false,
properties: {fulfillment_mode: 'MANUAL', fulfillment_term: 'IMMEDIATELY'},
lines: [
{
item_id: 'ITEM-0001',
item_order_quantity: 2,
item_price_snapshot: {pricing_rule: {price: 1.5}},
tax_exempt_when_sold: true,
},
],
},
},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->orders->createOrderExpress([
'account' => [
'id' => 'ACC0001',
'order' => [
'price_tax_inclusive' => false,
'properties' => ['fulfillment_mode' => 'MANUAL', 'fulfillment_term' => 'IMMEDIATELY'],
'lines' => [
[
'item_id' => 'ITEM-0001',
'item_order_quantity' => 2,
'item_price_snapshot' => ['pricing_rule' => ['price' => 1.5]],
'tax_exempt_when_sold' => true,
],
],
],
],
]);
print_r($response->data);
import com.exsited.Dto;
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import java.util.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<Dto> response = client.orders().createOrderExpress(
Map.of(
"account", Map.of(
"id", "ACC0001",
"order", Map.of(
"price_tax_inclusive", false,
"properties", Map.of(
"fulfillment_mode", "MANUAL",
"fulfillment_term", "IMMEDIATELY"),
"lines", List.of(
Map.of(
"item_id", "ITEM-0001",
"item_order_quantity", 2,
"item_price_snapshot", Map.of(
"pricing_rule", Map.of("price", 1.5)),
"tax_exempt_when_sold", true))))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Orders.CreateOrderExpressAsync(new Dictionary<string, object?>
{
["account"] = new Dictionary<string, object?>
{
["id"] = "ACC0001",
["order"] = new Dictionary<string, object?>
{
["price_tax_inclusive"] = false,
["properties"] = new Dictionary<string, object?>
{
["fulfillment_mode"] = "MANUAL",
["fulfillment_term"] = "IMMEDIATELY",
},
["lines"] = new List<object?>
{
new Dictionary<string, object?>
{
["item_id"] = "ITEM-0001",
["item_order_quantity"] = 2,
["item_price_snapshot"] = new Dictionary<string, object?>
{
["pricing_rule"] = new Dictionary<string, object?>
{
["price"] = 1.5,
},
},
["tax_exempt_when_sold"] = true,
},
},
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.orders.createOrderExpress({
'account': {
'id': 'ACC0001',
'order': {
'price_tax_inclusive': false,
'properties': {
'fulfillment_mode': 'MANUAL',
'fulfillment_term': 'IMMEDIATELY',
},
'lines': [
{
'item_id': 'ITEM-0001',
'item_order_quantity': 2,
'item_price_snapshot': {
'pricing_rule': {'price': 1.5},
},
'tax_exempt_when_sold': true,
},
],
},
},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Orders().CreateOrderExpress(context.Background(), map[string]any{
"account": map[string]any{
"id": "ACC0001",
"order": map[string]any{
"price_tax_inclusive": false,
"properties": map[string]any{
"fulfillment_mode": "MANUAL",
"fulfillment_term": "IMMEDIATELY",
},
"lines": []any{
map[string]any{
"item_id": "ITEM-0001",
"item_order_quantity": 2,
"item_price_snapshot": map[string]any{
"pricing_rule": map[string]any{"price": 1.5},
},
"tax_exempt_when_sold": true,
},
},
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
Send the account’s
id and the order under account, as for POST /express. Nest an invoice and payment in the body to create them in the same call.
To create an order with its invoice in one call, use Create an order with its invoice.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.