curl -X POST https://api.stateset.com/v1/purchaseorders \
-H "Authorization: Bearer ${STATESET_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"purchase_order_number": "PO-2026-001234",
"description": "Q1 inventory restock — blue t-shirts",
"vendor": "Acme Textiles Inc.",
"total": "4500.00",
"subtotal": "4200.00",
"purchase_date": "2026-01-15T00:00:00.000Z",
"delivery_date": "2026-02-01T00:00:00.000Z"
}'
mutation InsertNewPurchaseOrder(
$po: purchaseorders_insert_input!
) {
insert_purchaseorders(objects: [$po]) {
returning {
id
purchase_order_number
description
vendor
total
subtotal
purchase_order_status
purchase_date
delivery_date
}
}
}
const purchaseOrder = await stateset.purchaseOrders.create({
purchase_order_number: 'PO-2026-001234',
description: 'Q1 inventory restock — blue t-shirts',
vendor: 'Acme Textiles Inc.',
total: '4500.00',
subtotal: '4200.00',
purchase_date: '2026-01-15T00:00:00.000Z',
delivery_date: '2026-02-01T00:00:00.000Z',
});
purchase_order = stateset.purchase_orders.create(
purchase_order_number="PO-2026-001234",
description="Q1 inventory restock — blue t-shirts",
vendor="Acme Textiles Inc.",
total="4500.00",
subtotal="4200.00",
purchase_date="2026-01-15T00:00:00.000Z",
delivery_date="2026-02-01T00:00:00.000Z",
)
purchase_order = Stateset::PurchaseOrder.create({
purchase_order_number: 'PO-2026-001234',
description: 'Q1 inventory restock — blue t-shirts',
vendor: 'Acme Textiles Inc.',
total: '4500.00',
subtotal: '4200.00',
purchase_date: '2026-01-15T00:00:00.000Z',
delivery_date: '2026-02-01T00:00:00.000Z',
})
purchaseOrder, err := stateset.PurchaseOrders.Create(&stateset.PurchaseOrderParams{
PurchaseOrderNumber: "PO-2026-001234",
Description: "Q1 inventory restock — blue t-shirts",
Vendor: "Acme Textiles Inc.",
Total: "4500.00",
Subtotal: "4200.00",
PurchaseDate: "2026-01-15T00:00:00.000Z",
DeliveryDate: "2026-02-01T00:00:00.000Z",
})
Map<String, Object> params = new HashMap<>();
params.put("purchase_order_number", "PO-2026-001234");
params.put("description", "Q1 inventory restock — blue t-shirts");
params.put("vendor", "Acme Textiles Inc.");
params.put("total", "4500.00");
params.put("subtotal", "4200.00");
params.put("purchase_date", "2026-01-15T00:00:00.000Z");
params.put("delivery_date", "2026-02-01T00:00:00.000Z");
PurchaseOrder purchaseOrder = stateset.purchaseOrders().create(params);
$purchaseOrder = $stateset->purchaseOrders->create([
'purchase_order_number' => 'PO-2026-001234',
'description' => 'Q1 inventory restock — blue t-shirts',
'vendor' => 'Acme Textiles Inc.',
'total' => '4500.00',
'subtotal' => '4200.00',
'purchase_date' => '2026-01-15T00:00:00.000Z',
'delivery_date' => '2026-02-01T00:00:00.000Z',
]);
var purchaseOrder = await stateset.PurchaseOrders.CreateAsync(
new PurchaseOrderCreateParams
{
PurchaseOrderNumber = "PO-2026-001234",
Description = "Q1 inventory restock — blue t-shirts",
Vendor = "Acme Textiles Inc.",
Total = "4500.00",
Subtotal = "4200.00",
PurchaseDate = "2026-01-15T00:00:00.000Z",
DeliveryDate = "2026-02-01T00:00:00.000Z"
}
);
{
"id": "po_1a2b3c4d5e6f",
"createdat": "2026-01-15T12:00:00.000Z",
"delivery_date": "2026-02-01T00:00:00.000Z",
"description": "Q1 inventory restock — blue t-shirts",
"external_id": "ext_po_98765",
"financer": "fin_abc123",
"fulfiller": "ful_def456",
"lastupdated": "2026-01-15T12:00:00.000Z",
"purchase_date": "2026-01-15T00:00:00.000Z",
"purchase_order_hash": "a1b2c3d4e5f6",
"purchase_order_name": "Q1 Blue T-Shirt Restock",
"purchase_order_number": "PO-2026-001234",
"purchase_order_status": "created",
"purchaser": "usr_abc123",
"subtotal": "4200.00",
"total": "4500.00",
"vendor": "Acme Textiles Inc.",
"transaction_id": "txn_789xyz"
}
Create Purchase Order
This endpoint creates a new purchase order
POST
/
v1
/
purchase_orders
curl -X POST https://api.stateset.com/v1/purchaseorders \
-H "Authorization: Bearer ${STATESET_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"purchase_order_number": "PO-2026-001234",
"description": "Q1 inventory restock — blue t-shirts",
"vendor": "Acme Textiles Inc.",
"total": "4500.00",
"subtotal": "4200.00",
"purchase_date": "2026-01-15T00:00:00.000Z",
"delivery_date": "2026-02-01T00:00:00.000Z"
}'
mutation InsertNewPurchaseOrder(
$po: purchaseorders_insert_input!
) {
insert_purchaseorders(objects: [$po]) {
returning {
id
purchase_order_number
description
vendor
total
subtotal
purchase_order_status
purchase_date
delivery_date
}
}
}
const purchaseOrder = await stateset.purchaseOrders.create({
purchase_order_number: 'PO-2026-001234',
description: 'Q1 inventory restock — blue t-shirts',
vendor: 'Acme Textiles Inc.',
total: '4500.00',
subtotal: '4200.00',
purchase_date: '2026-01-15T00:00:00.000Z',
delivery_date: '2026-02-01T00:00:00.000Z',
});
purchase_order = stateset.purchase_orders.create(
purchase_order_number="PO-2026-001234",
description="Q1 inventory restock — blue t-shirts",
vendor="Acme Textiles Inc.",
total="4500.00",
subtotal="4200.00",
purchase_date="2026-01-15T00:00:00.000Z",
delivery_date="2026-02-01T00:00:00.000Z",
)
purchase_order = Stateset::PurchaseOrder.create({
purchase_order_number: 'PO-2026-001234',
description: 'Q1 inventory restock — blue t-shirts',
vendor: 'Acme Textiles Inc.',
total: '4500.00',
subtotal: '4200.00',
purchase_date: '2026-01-15T00:00:00.000Z',
delivery_date: '2026-02-01T00:00:00.000Z',
})
purchaseOrder, err := stateset.PurchaseOrders.Create(&stateset.PurchaseOrderParams{
PurchaseOrderNumber: "PO-2026-001234",
Description: "Q1 inventory restock — blue t-shirts",
Vendor: "Acme Textiles Inc.",
Total: "4500.00",
Subtotal: "4200.00",
PurchaseDate: "2026-01-15T00:00:00.000Z",
DeliveryDate: "2026-02-01T00:00:00.000Z",
})
Map<String, Object> params = new HashMap<>();
params.put("purchase_order_number", "PO-2026-001234");
params.put("description", "Q1 inventory restock — blue t-shirts");
params.put("vendor", "Acme Textiles Inc.");
params.put("total", "4500.00");
params.put("subtotal", "4200.00");
params.put("purchase_date", "2026-01-15T00:00:00.000Z");
params.put("delivery_date", "2026-02-01T00:00:00.000Z");
PurchaseOrder purchaseOrder = stateset.purchaseOrders().create(params);
$purchaseOrder = $stateset->purchaseOrders->create([
'purchase_order_number' => 'PO-2026-001234',
'description' => 'Q1 inventory restock — blue t-shirts',
'vendor' => 'Acme Textiles Inc.',
'total' => '4500.00',
'subtotal' => '4200.00',
'purchase_date' => '2026-01-15T00:00:00.000Z',
'delivery_date' => '2026-02-01T00:00:00.000Z',
]);
var purchaseOrder = await stateset.PurchaseOrders.CreateAsync(
new PurchaseOrderCreateParams
{
PurchaseOrderNumber = "PO-2026-001234",
Description = "Q1 inventory restock — blue t-shirts",
Vendor = "Acme Textiles Inc.",
Total = "4500.00",
Subtotal = "4200.00",
PurchaseDate = "2026-01-15T00:00:00.000Z",
DeliveryDate = "2026-02-01T00:00:00.000Z"
}
);
{
"id": "po_1a2b3c4d5e6f",
"createdat": "2026-01-15T12:00:00.000Z",
"delivery_date": "2026-02-01T00:00:00.000Z",
"description": "Q1 inventory restock — blue t-shirts",
"external_id": "ext_po_98765",
"financer": "fin_abc123",
"fulfiller": "ful_def456",
"lastupdated": "2026-01-15T12:00:00.000Z",
"purchase_date": "2026-01-15T00:00:00.000Z",
"purchase_order_hash": "a1b2c3d4e5f6",
"purchase_order_name": "Q1 Blue T-Shirt Restock",
"purchase_order_number": "PO-2026-001234",
"purchase_order_status": "created",
"purchaser": "usr_abc123",
"subtotal": "4200.00",
"total": "4500.00",
"vendor": "Acme Textiles Inc.",
"transaction_id": "txn_789xyz"
}
Body
string
This is the id of the purchase order.
string
This is the date the purchase order was created.
string
This is the date the purchase order was delivered.
string
This is the description of the purchase order.
string
This is the external id of the purchase order.
string
This is the financer of the purchase order.
string
This is the fulfiller of the purchase order.
string
This is the date the purchase order was last updated.
string
This is the date the purchase order was purchased.
string
This is the hash of the purchase order.
string
This is the name of the purchase order.
string
This is the number of the purchase order.
string
This is the status of the purchase order.
string
This is the purchaser of the purchase order.
string
This is the subtotal of the purchase order.
string
This is the total of the purchase order.
string
This is the vendor of the purchase order.
string
This is the transaction id of the purchase order.
Response
string
This is the id of the purchase order.
string
This is the date the purchase order was created.
string
This is the date the purchase order was delivered.
string
This is the description of the purchase order.
string
This is the external id of the purchase order.
string
This is the financer of the purchase order.
string
This is the fulfiller of the purchase order.
string
This is the date the purchase order was last updated.
string
This is the date the purchase order was purchased.
string
This is the hash of the purchase order.
string
This is the name of the purchase order.
string
This is the number of the purchase order.
string
This is the status of the purchase order.
string
This is the purchaser of the purchase order.
string
This is the subtotal of the purchase order.
string
This is the total of the purchase order.
string
This is the vendor of the purchase order.
string
This is the transaction id of the purchase order.
curl -X POST https://api.stateset.com/v1/purchaseorders \
-H "Authorization: Bearer ${STATESET_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"purchase_order_number": "PO-2026-001234",
"description": "Q1 inventory restock — blue t-shirts",
"vendor": "Acme Textiles Inc.",
"total": "4500.00",
"subtotal": "4200.00",
"purchase_date": "2026-01-15T00:00:00.000Z",
"delivery_date": "2026-02-01T00:00:00.000Z"
}'
mutation InsertNewPurchaseOrder(
$po: purchaseorders_insert_input!
) {
insert_purchaseorders(objects: [$po]) {
returning {
id
purchase_order_number
description
vendor
total
subtotal
purchase_order_status
purchase_date
delivery_date
}
}
}
const purchaseOrder = await stateset.purchaseOrders.create({
purchase_order_number: 'PO-2026-001234',
description: 'Q1 inventory restock — blue t-shirts',
vendor: 'Acme Textiles Inc.',
total: '4500.00',
subtotal: '4200.00',
purchase_date: '2026-01-15T00:00:00.000Z',
delivery_date: '2026-02-01T00:00:00.000Z',
});
purchase_order = stateset.purchase_orders.create(
purchase_order_number="PO-2026-001234",
description="Q1 inventory restock — blue t-shirts",
vendor="Acme Textiles Inc.",
total="4500.00",
subtotal="4200.00",
purchase_date="2026-01-15T00:00:00.000Z",
delivery_date="2026-02-01T00:00:00.000Z",
)
purchase_order = Stateset::PurchaseOrder.create({
purchase_order_number: 'PO-2026-001234',
description: 'Q1 inventory restock — blue t-shirts',
vendor: 'Acme Textiles Inc.',
total: '4500.00',
subtotal: '4200.00',
purchase_date: '2026-01-15T00:00:00.000Z',
delivery_date: '2026-02-01T00:00:00.000Z',
})
purchaseOrder, err := stateset.PurchaseOrders.Create(&stateset.PurchaseOrderParams{
PurchaseOrderNumber: "PO-2026-001234",
Description: "Q1 inventory restock — blue t-shirts",
Vendor: "Acme Textiles Inc.",
Total: "4500.00",
Subtotal: "4200.00",
PurchaseDate: "2026-01-15T00:00:00.000Z",
DeliveryDate: "2026-02-01T00:00:00.000Z",
})
Map<String, Object> params = new HashMap<>();
params.put("purchase_order_number", "PO-2026-001234");
params.put("description", "Q1 inventory restock — blue t-shirts");
params.put("vendor", "Acme Textiles Inc.");
params.put("total", "4500.00");
params.put("subtotal", "4200.00");
params.put("purchase_date", "2026-01-15T00:00:00.000Z");
params.put("delivery_date", "2026-02-01T00:00:00.000Z");
PurchaseOrder purchaseOrder = stateset.purchaseOrders().create(params);
$purchaseOrder = $stateset->purchaseOrders->create([
'purchase_order_number' => 'PO-2026-001234',
'description' => 'Q1 inventory restock — blue t-shirts',
'vendor' => 'Acme Textiles Inc.',
'total' => '4500.00',
'subtotal' => '4200.00',
'purchase_date' => '2026-01-15T00:00:00.000Z',
'delivery_date' => '2026-02-01T00:00:00.000Z',
]);
var purchaseOrder = await stateset.PurchaseOrders.CreateAsync(
new PurchaseOrderCreateParams
{
PurchaseOrderNumber = "PO-2026-001234",
Description = "Q1 inventory restock — blue t-shirts",
Vendor = "Acme Textiles Inc.",
Total = "4500.00",
Subtotal = "4200.00",
PurchaseDate = "2026-01-15T00:00:00.000Z",
DeliveryDate = "2026-02-01T00:00:00.000Z"
}
);
{
"id": "po_1a2b3c4d5e6f",
"createdat": "2026-01-15T12:00:00.000Z",
"delivery_date": "2026-02-01T00:00:00.000Z",
"description": "Q1 inventory restock — blue t-shirts",
"external_id": "ext_po_98765",
"financer": "fin_abc123",
"fulfiller": "ful_def456",
"lastupdated": "2026-01-15T12:00:00.000Z",
"purchase_date": "2026-01-15T00:00:00.000Z",
"purchase_order_hash": "a1b2c3d4e5f6",
"purchase_order_name": "Q1 Blue T-Shirt Restock",
"purchase_order_number": "PO-2026-001234",
"purchase_order_status": "created",
"purchaser": "usr_abc123",
"subtotal": "4200.00",
"total": "4500.00",
"vendor": "Acme Textiles Inc.",
"transaction_id": "txn_789xyz"
}
⌘I