cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/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.express.create_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.express.createExpress({
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->express->createExpress([
'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.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.express.express_dto.ExpressDto;
import java.util.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<ExpressDto.Express> response = client.express().createExpress(
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.Express.CreateExpressAsync(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.express.createExpress({
'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.Express().CreateExpress(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)
{
"express": {
"account": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"activity_logs": [
{
"activity": "<string>"
}
],
"allow_contract": true,
"billing_address": "<unknown>",
"billing_preferences": {
"billing_period": "<string>",
"communication_profile": "<string>",
"consolidate_invoice": true,
"fulfillment_mode": "<string>",
"fulfillment_term": "<string>",
"invoice_mode": "<string>",
"invoice_term": "<string>",
"payment_mode": "<string>",
"payment_processor": "<string>",
"payment_term": "<string>",
"payment_term_alignment": "<string>",
"proforma_properties": {
"acceptance_date": "<unknown>",
"acceptance_required": true,
"acceptance_term": "<unknown>",
"payment_required": true,
"terms_and_conditions": "<unknown>"
}
},
"billing_start_date": "<string>",
"communication_preferences": "<array>",
"created_by": "<unknown>",
"created_on": "<string>",
"currency": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"custom_attributes": "<array>",
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"customer_purchase_order_id": "<unknown>",
"description": "<unknown>",
"discount_profile": "<unknown>",
"display_name": "<string>",
"id": "<string>",
"invoice_note": "<unknown>",
"kpis": {
"deleted_at": "<unknown>",
"estimated_total": "<string>",
"last_cancelled_at": "<unknown>",
"last_changed_at": "<unknown>",
"last_invoice_issue_date": "<unknown>",
"last_invoice_total": "<string>",
"last_reactivated_at": "<unknown>",
"monthly_recurring_revenue": "<string>",
"next_invoice_issue_date": "<unknown>",
"object": "<string>",
"start_date": "<unknown>",
"total_collected": "<string>",
"total_due": "<string>",
"total_invoice": 123,
"total_outstanding": "<string>",
"total_revenue": "<string>"
},
"last_updated_by": "<unknown>",
"last_updated_on": "<unknown>",
"lines": [
{
"charge_item_uuid": "<string>",
"expected_delivery_date": "<string>",
"id": "<string>",
"item": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"uuid": "<string>"
},
"item_accounting_code": {
"sales_revenue": "<string>"
},
"item_charge_type": "<string>",
"item_custom_attributes": "<array>",
"item_description": "<string>",
"item_invoice_note": "<string>",
"item_order_quantity": 123,
"item_price_snapshot": {
"pricing_rule": {
"price": 123,
"price_period": "<string>",
"price_type": "<string>",
"pricing_level": "<string>",
"pricing_method": "<string>",
"pricing_schedule": "<string>",
"uom": "<string>",
"uuid": "<string>",
"version": "<string>",
"warehouse": "<string>"
}
},
"item_price_tax": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"rate": 123
},
"item_sale_tax_configuration": {
"sale_price_is_based_on": "<string>",
"tax_code": {
"code": "<string>",
"link": "<string>",
"rate": "<string>",
"uuid": "<string>"
}
},
"item_type": "<string>",
"object": "<string>",
"pre_order_stock_details": {
"pending_reserve": "<string>",
"reserved": "<string>",
"sold": "<string>"
},
"shipping_cost": 123,
"subtotal": "<string>",
"tax": "<string>",
"tax_exempt_when_sold": true,
"total": "<string>",
"version": 123
}
],
"manager": "<unknown>",
"name": "<string>",
"next_billing_from_date": "<string>",
"object": "<string>",
"order_start_date": "<string>",
"order_type": "<string>",
"origin": "<unknown>",
"original_total": "<string>",
"pre_order": true,
"price_tax_inclusive": true,
"quote_converted": true,
"quote_order": true,
"referral_account": "<unknown>",
"sales_rep": "<unknown>",
"shipping_address": "<unknown>",
"shipping_cost": 123,
"shipping_line_items": "<array>",
"shipping_profile": "<unknown>",
"status": "<string>",
"subtotal": "<string>",
"tax": "<string>",
"time_zone": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"total": "<string>",
"version": 123
}
}Express
Create an order with its invoice
Creates an active order for an existing account in one call and returns it under express.
POST
/
express
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/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.express.create_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.express.createExpress({
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->express->createExpress([
'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.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.express.express_dto.ExpressDto;
import java.util.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<ExpressDto.Express> response = client.express().createExpress(
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.Express.CreateExpressAsync(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.express.createExpress({
'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.Express().CreateExpress(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)
{
"express": {
"account": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"activity_logs": [
{
"activity": "<string>"
}
],
"allow_contract": true,
"billing_address": "<unknown>",
"billing_preferences": {
"billing_period": "<string>",
"communication_profile": "<string>",
"consolidate_invoice": true,
"fulfillment_mode": "<string>",
"fulfillment_term": "<string>",
"invoice_mode": "<string>",
"invoice_term": "<string>",
"payment_mode": "<string>",
"payment_processor": "<string>",
"payment_term": "<string>",
"payment_term_alignment": "<string>",
"proforma_properties": {
"acceptance_date": "<unknown>",
"acceptance_required": true,
"acceptance_term": "<unknown>",
"payment_required": true,
"terms_and_conditions": "<unknown>"
}
},
"billing_start_date": "<string>",
"communication_preferences": "<array>",
"created_by": "<unknown>",
"created_on": "<string>",
"currency": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"custom_attributes": "<array>",
"custom_form": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"customer_purchase_order_id": "<unknown>",
"description": "<unknown>",
"discount_profile": "<unknown>",
"display_name": "<string>",
"id": "<string>",
"invoice_note": "<unknown>",
"kpis": {
"deleted_at": "<unknown>",
"estimated_total": "<string>",
"last_cancelled_at": "<unknown>",
"last_changed_at": "<unknown>",
"last_invoice_issue_date": "<unknown>",
"last_invoice_total": "<string>",
"last_reactivated_at": "<unknown>",
"monthly_recurring_revenue": "<string>",
"next_invoice_issue_date": "<unknown>",
"object": "<string>",
"start_date": "<unknown>",
"total_collected": "<string>",
"total_due": "<string>",
"total_invoice": 123,
"total_outstanding": "<string>",
"total_revenue": "<string>"
},
"last_updated_by": "<unknown>",
"last_updated_on": "<unknown>",
"lines": [
{
"charge_item_uuid": "<string>",
"expected_delivery_date": "<string>",
"id": "<string>",
"item": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"uuid": "<string>"
},
"item_accounting_code": {
"sales_revenue": "<string>"
},
"item_charge_type": "<string>",
"item_custom_attributes": "<array>",
"item_description": "<string>",
"item_invoice_note": "<string>",
"item_order_quantity": 123,
"item_price_snapshot": {
"pricing_rule": {
"price": 123,
"price_period": "<string>",
"price_type": "<string>",
"pricing_level": "<string>",
"pricing_method": "<string>",
"pricing_schedule": "<string>",
"uom": "<string>",
"uuid": "<string>",
"version": "<string>",
"warehouse": "<string>"
}
},
"item_price_tax": {
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>",
"rate": 123
},
"item_sale_tax_configuration": {
"sale_price_is_based_on": "<string>",
"tax_code": {
"code": "<string>",
"link": "<string>",
"rate": "<string>",
"uuid": "<string>"
}
},
"item_type": "<string>",
"object": "<string>",
"pre_order_stock_details": {
"pending_reserve": "<string>",
"reserved": "<string>",
"sold": "<string>"
},
"shipping_cost": 123,
"subtotal": "<string>",
"tax": "<string>",
"tax_exempt_when_sold": true,
"total": "<string>",
"version": 123
}
],
"manager": "<unknown>",
"name": "<string>",
"next_billing_from_date": "<string>",
"object": "<string>",
"order_start_date": "<string>",
"order_type": "<string>",
"origin": "<unknown>",
"original_total": "<string>",
"pre_order": true,
"price_tax_inclusive": true,
"quote_converted": true,
"quote_order": true,
"referral_account": "<unknown>",
"sales_rep": "<unknown>",
"shipping_address": "<unknown>",
"shipping_cost": 123,
"shipping_line_items": "<array>",
"shipping_profile": "<unknown>",
"status": "<string>",
"subtotal": "<string>",
"tax": "<string>",
"time_zone": {
"object": "<string>",
"id": "<string>",
"name": "<string>",
"href": "<string>"
},
"total": "<string>",
"version": 123
}
}Send the account’s
id and the order to create under account.order. The order is created as active and its invoice is raised in the same call. A line with tax_exempt_when_sold set to true adds no tax, so the order’s total equals its subtotal.
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.