Orders
Orders
Order management for e-commerce integrations.
Receive, store, and process orders from external platforms into invoices.
The Order object
Attributes
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "pending",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": false,
"cancelled_at": null,
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": null,
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": null,
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}Create a new order
/ordersCreate a new order manually or from an external source.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Order source platform
Possible values: "shopify", "woocommerce", "manual"
curl -X POST "https://eu.spaceinvoices.com/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
]
}'Returns
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "pending",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": false,
"cancelled_at": null,
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": null,
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": null,
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}List all orders
/ordersRetrieve a paginated list of orders with optional filtering and sorting.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
Cursor to fetch the next page of results. Use the value from pagination.next_cursor in the previous response.
Cursor to fetch the previous page of results. Use the value from pagination.prev_cursor in the previous response.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
JSON query object for filtering results. Supports MongoDB-style operators.
Supported operators:
- equals or direct value - Exact match (default)
- gte - Greater than or equal
- lte - Less than or equal
- gt - Greater than
- lt - Less than
- in - Value in array
- notIn - Value not in array
- contains - String contains (case-insensitive)
- startsWith - String starts with
- endsWith - String ends with
- between - Value between two numbers/dates [min, max]
Allowed fields: id, status, source, source_id, customer_name, customer_email, payment_status, order_integration_id, created_at, updated_at
Examples:
- {"total": {"gte": 1000}} - Invoices over 1000
- {"customer.name": {"contains": "Acme"}} - Customer name contains "Acme"
- {"date": {"between": ["2025-01-01", "2025-12-31"]}} - Date range
Full-text search query to filter results across multiple fields.
Searches are case-insensitive and match partial strings.
Searches across all text fields including names, descriptions, addresses, and metadata values.
When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.
curl "https://eu.spaceinvoices.com/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"data": [
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "pending",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": false,
"cancelled_at": null,
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": null,
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": null,
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}
],
"pagination": {
"total": 1,
"next_cursor": null,
"prev_cursor": null,
"has_more": false
}
}Get order by ID
/orders/{id}Retrieve a single order by its unique identifier.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl "https://eu.spaceinvoices.com/orders/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "pending",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": false,
"cancelled_at": null,
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": null,
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": null,
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}Update an order
/orders/{id}Update an existing order. Only the provided fields will be updated.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
Body parameters
curl -X PATCH "https://eu.spaceinvoices.com/orders/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"customer_name": "Updated Customer Name",
"customer_email": "updated@example.com"
}'Returns
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "pending",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": false,
"cancelled_at": null,
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": null,
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": null,
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}Delete an order
/orders/{id}Soft delete an order by its unique identifier.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X DELETE "https://eu.spaceinvoices.com/orders/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Process an order into an invoice
/orders/{id}/processProcess a pending order: resolve or create customer, generate invoice, and optionally record payment.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X POST "https://eu.spaceinvoices.com/orders/{id}/process" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "invoiced",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": false,
"cancelled_at": null,
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": "inv_7595a27b5d35015c3ef0c3fe",
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": "2024-01-15T12:00:00.000Z",
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}Cancel an order
/orders/{id}/cancelCancel a pending order. Already invoiced orders cannot be cancelled.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X POST "https://eu.spaceinvoices.com/orders/{id}/cancel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "cancelled",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": true,
"cancelled_at": "2024-01-15T12:00:00.000Z",
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": null,
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": null,
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}Reissue an order invoice
/orders/{id}/reissueCredit the existing invoice and create a new one with current order items. Only available when order items have changed after initial processing.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
curl -X POST "https://eu.spaceinvoices.com/orders/{id}/reissue" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"id": "ord_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"order_integration_id": "oint_6595a27b5d35015c3ef0c3fd",
"source": "manual",
"source_id": "manual-001",
"source_order_number": null,
"status": "invoiced",
"paid": false,
"paid_at": null,
"fulfilled": false,
"fulfilled_at": null,
"cancelled": false,
"cancelled_at": null,
"refunded": false,
"refunded_at": null,
"customer_name": null,
"customer_email": null,
"customer": null,
"billing_address": null,
"shipping_address": null,
"customer_id": null,
"currency_code": "EUR",
"total": 100,
"total_with_tax": 122,
"total_discount": 0,
"total_shipping": 0,
"items": [
{
"name": "Widget Pro",
"quantity": 2,
"price": 50,
"gross_price": 61,
"total": 100,
"total_with_tax": 122,
"tax_rate": 22
}
],
"payment_status": "unpaid",
"payment_method": null,
"payment_gateway": null,
"invoice_id": "inv_8595a27b5d35015c3ef0c3ff",
"estimate_id": null,
"process_after": null,
"transactions": [],
"complete": false,
"items_changed_after_processing": false,
"raw_data": null,
"source_event_id": null,
"error": null,
"ordered_at": null,
"processed_at": "2024-01-16T12:00:00.000Z",
"metadata": {},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-09-01T00:00:00.000Z",
"deleted_at": null
}