Commerce

Read bounded current Business Central orders

GET
/v1/protocol/commerce/data/business-central/{connectionId}/orders

Default off; requires COMMERCE_MCP_OAUTH_DATA_ACCESS_ENABLED and COMMERCE_MCP_BUSINESS_CENTRAL_ENABLED, a live Accounts Microsoft purchase, current membership and signed v2 or v3 consent. An opaque connection identifies a separately verified company within the purchaser tenant extracted by Accounts. Reads are bounded to eight seconds and 100 documents, return no connector credentials, and cannot execute an ERP action. Connected v3 source discovery reports BC history unavailable; its historical tools cover only Walmart and Adobe. Requires erp:read.

Authorization

CommerceAccountsOAuth
AuthorizationBearer <token>

Opaque Accounts-issued Commerce OAuth access credential with resource-bound current purchase. Legacy base3, signed v2 ERP/history and fresh signed v3 nine-scope connected grants retain distinct route profiles. Refresh credentials never authenticate. Per-operation connection, current role, proof, quota and confirmation checks remain mandatory.

In: header

Path Parameters

connectionId*string
Formatuuid

Query Parameters

org_id*string
Formatuuid

Response Body

application/json

curl -X GET "https://example.com/v1/protocol/commerce/data/business-central/497f6eca-6276-4993-bfeb-53cbbbba6f08/orders?org_id=497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "version": "commerce-erp-orders-v1",  "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",  "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",  "data": {    "version": "decionis.business_central.read.v1",    "platform": "business-central",    "view": "posted_invoices",    "observed_at": "2019-08-24T14:15:22Z",    "window": {      "days": 90,      "start_date": "string",      "end_date_exclusive": "string",      "date_field": "postingDate",      "anchor": "server_utc_date"    },    "documents": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "transaction_date": "string",        "date_precision": "day",        "date_field": "postingDate",        "status": "Draft",        "currency": "string",        "currency_source": "document",        "net_amount_excluding_tax": 0,        "cost_basis": null,        "cost_currency": null,        "cost_provenance": "unavailable",        "lines": [          {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "quantity": 0,            "net_amount_excluding_tax": 0          }        ],        "lines_complete": true      }    ],    "coverage": {      "document_limit": 100,      "complete": true,      "truncated": true,      "lines_complete": true,      "reasons": [        "historical_cost_unavailable"      ]    },    "summary": {      "documents_scanned": 0,      "documents_returned": 0,      "missing_cost": 0,      "missing_currency": 0,      "excluded_date": 0,      "excluded_status": 0,      "invalid_amount": 0,      "excluded_lines": 0    }  },  "execution_available": false}

List authorized Business Central connections GET

Default off; requires COMMERCE_MCP_OAUTH_DATA_ACCESS_ENABLED and COMMERCE_MCP_BUSINESS_CENTRAL_ENABLED, a live Accounts Microsoft purchase, current membership and signed v2 or v3 consent. An opaque connection identifies a separately verified company within the purchaser tenant extracted by Accounts. Reads are bounded to eight seconds and 100 documents, return no connector credentials, and cannot execute an ERP action. Connected v3 source discovery reports BC history unavailable; its historical tools cover only Walmart and Adobe. Requires erp:read.

Assess the previous ninety complete dates POST

Default off; requires COMMERCE_MCP_OAUTH_DATA_ACCESS_ENABLED and COMMERCE_MCP_BUSINESS_CENTRAL_ENABLED, a live Accounts Microsoft purchase, current membership and signed v2 or v3 consent. An opaque connection identifies a separately verified company within the purchaser tenant extracted by Accounts. Reads are bounded to eight seconds and 100 documents, return no connector credentials, and cannot execute an ERP action. Connected v3 source discovery reports BC history unavailable; its historical tools cover only Walmart and Adobe. This preserved BC historical flow admits only v2 erp:read and history:assess consent; v3 grants are refused. COMMERCE_HISTORY_ENABLED and an explicit history_assessment_limit_monthly in the verified publisher/offer/plan mapping are required; a missing limit disables assessments. Compares available historical merchandise margin against the exact selected policy floor over the previous ninety complete UTC dates. Missing costs or provenance are not_assessed; this is not full policy replay, execution authority, or a ninety-day trial. Results disclose partial coverage and are unsigned. One durable allowance reservation per new idempotent report; an exact completed retry returns the original report without another charge. An uncertain attempt is retained and cannot silently rerun.