Commerce

Read Business Central sales history for reconciliation

GET
/v1/commerce/sales/history

Default off with the native Business Central reader. Ordinary workspace key with decision:read and decision:write and current native READ authority. Reads the extension's fixed read-only sales pages (1.0.2.4) for open sales orders by Order Date and posted sales invoices by Posting Date, for a window of at most 92 days. Identifiers are company-scoped SHA-256 digests; document numbers, order numbers and External Document No. never leave Core. The External Document No. is digested exactly as Business Central stores it. Amounts exclude tax, in integer minor units of the document currency. A read capped at 4,000 orders or 8,000 invoices sets coverage.truncated with a reason. When the connected extension does not publish a page (older than 1.0.2.4), that list is empty and coverage is incomplete with SALES_ORDER_PAGE_NOT_INSTALLED or SALES_INVOICE_PAGE_NOT_INSTALLED; no sale is inferred. A negative document is left out with NEGATIVE_SALES_DOCUMENTS_EXCLUDED. Nothing is written.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

An organization API key. Its scopes decide what it may call; decision:shadow is the narrowest: SHADOW evaluations through POST /v1/authority/grants or its alias POST /v1/authority/enforce-and-bind only (DECISION_SHADOW_MODE_DENIED in any other mode; DECISION_SHADOW_FIELD_DENIED for a body carrying context.decionis_policy, evidence or escalation), with no integration dispatch. A key whose only scope is decision:shadow (an AgentSafe hosted gateway's) reaches exactly those two, POST /v1/auth/credential-context, POST /v1/hosted-gateway/keys/confirm and POST /v1/hosted-gateway/keys/revoke-self; every other route answers 403 HOSTED_GATEWAY_KEY_PATH_DENIED. decision:enforce is an enforced hosted gateway's key: evaluations in SHADOW or ENFORCEMENT through POST /v1/authority/grants or its alias (400 DECISION_ENFORCE_FIELD_DENIED for a body carrying context.decionis_policy; it never holds policy:write), and the grants and managed escalations they bind. A key whose scopes are decision:enforce (with or without decision:shadow) reaches exactly POST /v1/authority/enforce-and-bind, POST /v1/authority/grants, GET /v1/authority/grants/{grant_id}, POST /v1/authority/grants/{grant_id}/claims, POST /v1/authority/grants/{grant_id}/receipts, POST /v1/authority/grants/{grant_id}/reconciliations, POST /v1/execution/verify-token, POST /v1/execution/claim-token, POST /v1/execution/consume-token, POST /v1/execution/finalize-token, GET /v1/authority/escalations/{escalation_id}, DELETE /v1/authority/escalations/{escalation_id}, POST /v1/auth/credential-context, POST /v1/hosted-gateway/keys/confirm and POST /v1/hosted-gateway/keys/revoke-self, each id a UUID; every other route answers 403 HOSTED_GATEWAY_KEY_PATH_DENIED.

In: header

Query Parameters

connection_id*string
Formatuuid
revision*integer

The connection revision the caller expects.

Range1 <= value
from*string
Formatdate
to*string

Exclusive.

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/commerce/sales/history?connection_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&revision=1&from=2019-08-24&to=2019-08-24"
{  "version": "commerce-sales-history-v1",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",  "connection_revision": 1,  "company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf",  "observed_at": "2019-08-24T14:15:22Z",  "window": {    "from": "string",    "to": "string"  },  "orders": [    {      "document_digest": "string",      "order_digest": "string",      "external_document_digest": "string",      "document_date": "string",      "currency": "string",      "scale": 0,      "amount_minor": 0    }  ],  "invoices": [    {      "document_digest": "string",      "order_digest": "string",      "external_document_digest": "string",      "document_date": "string",      "currency": "string",      "scale": 0,      "amount_minor": 0    }  ],  "coverage": {    "complete": true,    "truncated": true,    "reasons": [      "string"    ]  },  "execution_available": false}

Read posted Business Central payment history for an assessment GET

Default off with the native Business Central reader. Ordinary workspace key with decision:read and decision:write and current native READ authority. Reads the fixed read-only pages for posted vendor payments, vendor invoices and their applications, and the Change Log's vendor bank-account entries, for a window of at most 92 days. Identifiers are company-scoped SHA-256 digests; bank numbers and business identifiers never leave Core. When the Change Log is off or does not log vendor bank accounts, bank_changes.available is false and coverage is incomplete; no change history is inferred. Nothing is written.

Start connecting a Drupal Commerce site POST

The first call of Decionis for Drupal's connect, made by the module with no credential. It registers the site's Ed25519 public key and answers a one-time challenge for the site to serve, signed, at `/.well-known/decionis-challenge` (see `connect/verify`). A public HTTPS site on the default port is proven by that challenge. A site Decionis cannot reach (a private or local host, plain HTTP or a port) is accepted too, and can be proven only by the 6-digit code `connect/verify` emails to `billing_email`. A public host over plain HTTP or on a port is refused. Nothing is ever fetched from a private address. Not idempotent: each call starts a new connect with a new challenge, valid for `expires_in_seconds`; an unfinished connect expires. Requests are limited per address and per site, and a refused one answers 429 with Retry-After.