Skip to content

Order Integrations

Order Integrations

Manage connections to external e-commerce platforms.
Connect Shopify, WooCommerce, or other platforms to automatically receive and process orders into invoices.

The Order Integration object

object

Attributes

idstring
Other attributes
entity_idstring
namestring
sourcestring
is_activeboolean
shop_domainstringnullable
scopesstringnullable
auto_processboolean
auto_process_onstring
default_payment_typestringnullable
send_invoice_emailboolean
send_estimate_emailboolean
issue_invoice_for_bankboolean
issue_invoice_on_completeboolean
auto_process_delay_secondsinteger
auto_reissue_on_updateboolean
localestringnullable
business_unit_idstringnullable
business_premise_idstringnullable
electronic_device_idstringnullable
metadata
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Examplejson
{
  "id": "oint_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "My Store",
  "source": "manual",
  "is_active": true,
  "shop_domain": null,
  "scopes": null,
  "auto_process": false,
  "auto_process_on": "paid",
  "default_payment_type": null,
  "metadata": {},
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Start Shopify OAuth flow

POST/order-integrations/shopify/authorize

Generate a Shopify OAuth authorization URL. Redirect the user to this URL to authorize the Shopify connection.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

shop_domainstringrequired

Shopify shop domain, e.g. myshop.myshopify.com

Other parameters
namestringoptional
auto_processbooleanoptional
send_invoice_emailbooleanoptional
issue_invoice_for_bankbooleanoptional
issue_invoice_on_completebooleanoptional
auto_process_delay_secondsintegeroptional
business_unit_idstringoptionalnullable
curl -X POST "https://eu.spaceinvoices.com/order-integrations/shopify/authorize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "shop_domain": "myshop.myshopify.com"
  }'
Example:

Returns

redirect_urlstring<uri>
json
{
  "redirect_url": "https://myshop.myshopify.com/admin/oauth/authorize?client_id=...&scope=read_orders&redirect_uri=...&state=..."
}

Resume Shopify install after app launch

POST/order-integrations/shopify/resume-install

Continue a pending Shopify custom-app install after Shopify redirects the merchant back to the app URL.

Body parameters

shopstringrequired
curl -X POST "https://eu.spaceinvoices.com/order-integrations/shopify/resume-install" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "shop": "myshop.myshopify.com"
  }'

Returns

redirect_urlstring<uri>
entity_idstring
frontend_originstring<uri>nullable
json
{
  "redirect_url": "https://myshop.myshopify.com/admin/oauth/authorize?client_id=...&scope=read_orders&redirect_uri=...&state=...",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "frontend_origin": "https://v2.getapollo.io"
}

Create a new order integration

POST/order-integrations

Create a new order integration for receiving orders from external platforms.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

namestringrequired
Other parameters
sourcestringoptional
auto_processbooleanoptional
auto_reissue_on_updatebooleanoptional
localestringoptionalnullable
business_unit_idstringoptionalnullable
business_premise_idstringoptionalnullable
electronic_device_idstringoptionalnullable
metadataobjectoptionalnullable
curl -X POST "https://eu.spaceinvoices.com/order-integrations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Store"
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
namestring
sourcestring
is_activeboolean
shop_domainstringnullable
scopesstringnullable
auto_processboolean
auto_process_onstring
default_payment_typestringnullable
send_invoice_emailboolean
send_estimate_emailboolean
issue_invoice_for_bankboolean
issue_invoice_on_completeboolean
auto_process_delay_secondsinteger
auto_reissue_on_updateboolean
localestringnullable
business_unit_idstringnullable
business_premise_idstringnullable
electronic_device_idstringnullable
metadata
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "oint_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "My Store",
  "source": "manual",
  "is_active": true,
  "shop_domain": null,
  "scopes": null,
  "auto_process": false,
  "auto_process_on": "paid",
  "default_payment_type": null,
  "metadata": {},
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

List all order integrations

GET/order-integrations

Retrieve a paginated list of order integrations with optional filtering and sorting.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

order_byoptional

Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with - for descending order. When paginating, reuse cursors only with the same effective ordering.

querystring<json>optional

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, name, source, is_active, 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

searchstringoptional

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.

deletedbooleanoptional

When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.

curl "https://eu.spaceinvoices.com/order-integrations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "oint_6595a27b5d35015c3ef0c3fd",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "name": "My Store",
      "source": "manual",
      "is_active": true,
      "shop_domain": null,
      "scopes": null,
      "auto_process": false,
      "auto_process_on": "paid",
      "default_payment_type": 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 integration by ID

GET/order-integrations/{id}

Retrieve a single order integration by its unique identifier.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl "https://eu.spaceinvoices.com/order-integrations/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring
Other parameters
entity_idstring
namestring
sourcestring
is_activeboolean
shop_domainstringnullable
scopesstringnullable
auto_processboolean
auto_process_onstring
default_payment_typestringnullable
send_invoice_emailboolean
send_estimate_emailboolean
issue_invoice_for_bankboolean
issue_invoice_on_completeboolean
auto_process_delay_secondsinteger
auto_reissue_on_updateboolean
localestringnullable
business_unit_idstringnullable
business_premise_idstringnullable
electronic_device_idstringnullable
metadata
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "oint_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "My Store",
  "source": "manual",
  "is_active": true,
  "shop_domain": null,
  "scopes": null,
  "auto_process": false,
  "auto_process_on": "paid",
  "default_payment_type": null,
  "metadata": {},
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Update an order integration

PATCH/order-integrations/{id}

Update an existing order integration. Only the provided fields will be updated.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Body parameters

namestringoptional
auto_processbooleanoptional
auto_reissue_on_updatebooleanoptional
localestringoptionalnullable
business_unit_idstringoptionalnullable
business_premise_idstringoptionalnullable
electronic_device_idstringoptionalnullable
metadataobjectoptionalnullable
is_activebooleanoptional
auto_process_onstringoptional
default_payment_typestringoptional
send_invoice_emailbooleanoptional
send_estimate_emailbooleanoptional
issue_invoice_for_bankbooleanoptional
issue_invoice_on_completebooleanoptional
auto_process_delay_secondsintegeroptional
curl -X PATCH "https://eu.spaceinvoices.com/order-integrations/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Store Name"
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
namestring
sourcestring
is_activeboolean
shop_domainstringnullable
scopesstringnullable
auto_processboolean
auto_process_onstring
default_payment_typestringnullable
send_invoice_emailboolean
send_estimate_emailboolean
issue_invoice_for_bankboolean
issue_invoice_on_completeboolean
auto_process_delay_secondsinteger
auto_reissue_on_updateboolean
localestringnullable
business_unit_idstringnullable
business_premise_idstringnullable
electronic_device_idstringnullable
metadata
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "oint_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "name": "My Store",
  "source": "manual",
  "is_active": true,
  "shop_domain": null,
  "scopes": null,
  "auto_process": false,
  "auto_process_on": "paid",
  "default_payment_type": null,
  "metadata": {},
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-09-01T00:00:00.000Z",
  "deleted_at": null
}

Delete an order integration

DELETE/order-integrations/{id}

Soft delete an order integration. If Shopify, webhooks will be unregistered (best effort).

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl -X DELETE "https://eu.spaceinvoices.com/order-integrations/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Sync Shopify orders

POST/order-integrations/{id}/sync-shopify

Fetch Shopify orders updated in the selected time window and upsert them into local orders. Missing orders are imported, existing orders are refreshed, and processing is queued separately.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Body parameters

updated_sincestring<date-time>optional
updated_untilstring<date-time>optional
limitintegeroptional
curl -X POST "https://eu.spaceinvoices.com/order-integrations/{id}/sync-shopify" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{}'
Example:

Returns

importedinteger
updatedinteger
queued_for_processinginteger
total_seeninteger
window_startstring<date-time>
window_endstring<date-time>
json
{
  "imported": 12,
  "updated": 4,
  "queued_for_processing": 6,
  "total_seen": 16,
  "window_start": "2026-03-20T00:00:00.000Z",
  "window_end": "2026-03-21T00:00:00.000Z"
}