The Origo Cloud Events extension provides API endpoints for managing and processing cloud event messages following the CloudEvents specification. This document describes all available API endpoints and supported message types.
Namespace: Origo.PTE.CloudEvents API Publisher: origo API Group: cloudEvent API Version: v1.0
Purpose: Returns the response data content for a given message.
Endpoint Details:
responseresponses/api/origo/cloudEvent/v1.0/responsesFields:
| Field Name | Type | Description |
|---|---|---|
id | Guid | Unique identifier of the message |
data | Blob | Response data content |
Supported Operations:
Example Request:
GET /api/origo/cloudEvent/v1.0/responses('{message-id}')
Purpose: Returns the original request data payload for a given message. Useful for inspecting or re-replaying what was sent.
Endpoint Details:
requestrequests/api/origo/cloudEvent/v1.0/requestsFields:
| Field Name | Type | Description |
|---|---|---|
id | Guid | Unique identifier of the message |
data | Blob | Original request payload (JSON, XML, or plain text) |
Supported Operations:
Preferred — fetch the raw payload directly (no prior lookup needed):
GET /api/origo/cloudEvent/v1.0/requests('{message-id}')/data
Authorization: Bearer {token}
Or fetch the OData record (returns the id and data fields as JSON):
GET /api/origo/cloudEvent/v1.0/requests('{message-id}')
Authorization: Bearer {token}
Security: Results are automatically filtered to records created by the calling application (SystemCreatedBy = UserSecurityId()).
Purpose: Create message requests and get status for queued (asynchronous) messages.
Endpoint Details:
queuequeues/api/origo/cloudEvent/v1.0/queuesFields:
| Field Name | Type | Description | Required |
|---|---|---|---|
specversion | Text | CloudEvents specification version | Yes |
type | Enum | Message type identifier | Yes |
source | Text | Description of the application using the cloud event (e.g., "MyApp v1.2.3", "DataSync Service") | Yes |
id | Guid | Unique identifier (auto-generated) | No |
time | DateTime | Event timestamp | No |
subject | Text | Subject of the event | No |
continueFromRecordId | Guid | SystemId of the record to resume from in continuation-enabled message types (e.g., CSV.Records.Get). Omit for the first request; set to the value returned in a previous response to continue. | No |
lcid | Integer | Windows Language ID for language-specific captions (e.g., 1033 for English, 1031 for German). If not specified, uses the Default Language Code from Cloud Events Setup | No |
datacontenttype | Text | Content type of the data (application/json, application/xml, text/plain) | No |
data | BigText | Request parameters (JSON, XML, or plain text depending on implementation; all built-in message types require JSON) | No |
Supported Operations:
Creates a new message request that will be processed asynchronously.
Request Body:
{
"specversion": "1.0",
"type": "Help.Tables.Get",
"source": "MyIntegrationApp v1.0",
"lcid": 1033
}
Response: Returns the created message with assigned ID and timestamp. Once processing is complete, the data field will contain the download URL to retrieve the response data.
Retrieves queued messages (messages with an assigned Task ID).
Example Request:
GET /api/origo/cloudEvent/v1.0/queues
Not typically used for this API.
Retries the processing of a cloud event message.
Endpoint:
POST /api/origo/cloudEvent/v1.0/queues('{message-id}')/Microsoft.NAV.RetryTask
Description: Attempts to reprocess a failed or completed message. If the task is already running it will not be restarted.
Status Values:
| Semantic Status | HTTP Status Code | Description |
|---|---|---|
| Created | 201 Created | Task is already running and cannot be retried |
| Updated | 200 OK | Task was successfully restarted |
| None | 204 No Content | Failed to create a new background task |
Cancels the scheduled task for a cloud event message.
Endpoint:
POST /api/origo/cloudEvent/v1.0/queues('{message-id}')/Microsoft.NAV.CancelTask
Description: Cancels a running or scheduled background task. If no task is scheduled, the action returns immediately.
Status Values:
| Semantic Status | HTTP Status Code | Description |
|---|---|---|
| Deleted | 204 No Content | No task was scheduled |
| Updated | 200 OK | Task was successfully cancelled |
| None | 204 No Content | Task cancellation failed |
Gets the status of a cloud event message.
Endpoint:
POST /api/origo/cloudEvent/v1.0/queues('{message-id}')/Microsoft.NAV.GetStatus
Status Values:
HTTP Status Codes:
The GetStatus action returns standard HTTP status codes based on the message state:
| Semantic Status | HTTP Status Code | Description |
|---|---|---|
| Created | 201 Created | Message is still being processed |
| Updated | 200 OK | Processing completed successfully |
| Deleted | 204 No Content | No task scheduled for this message |
| None | 204 No Content | Message status is not known |
Response: Returns the current processing status via the WebServiceActionContext.
Purpose: Create and process cloud event messages synchronously (immediate processing).
Endpoint Details:
tasktasks/api/origo/cloudEvent/v1.0/tasksFields:
| Field Name | Type | Description | Required |
|---|---|---|---|
specversion | Text | CloudEvents specification version | Yes |
type | Enum | Message type identifier | Yes |
source | Text | Description of the application using the cloud event (e.g., "MyApp v1.2.3", "DataSync Service") | Yes |
id | Guid | Unique identifier (auto-generated) | No |
time | DateTime | Event timestamp | No |
subject | Text | Subject of the event | No |
continueFromRecordId | Guid | SystemId of the record to resume from in continuation-enabled message types (e.g., CSV.Records.Get). Omit for the first request; set to the value returned in a previous response to continue. | No |
datacontenttype | Text | Content type of the data (application/json, application/xml, text/plain) | No |
data | BigText | Request parameters (JSON, XML, or plain text depending on implementation; all built-in message types require JSON) | No |
Supported Operations:
Creates a new message and processes it immediately. The response will contain the download URL to the response data in the data field.
Request Body:
{
"specversion": "1.0",
"type": "Help.Fields.Get",
"source": "MyIntegrationApp v1.0",
"subject": "Customer",
"datacontenttype": "application/json",
"data": "{\"tableName\":\"Customer\"}"
}
Response: Returns the message with the download URL to the response data in the data field.
Retrieves task messages (messages without an assigned Task ID).
Example Request:
GET /api/origo/cloudEvent/v1.0/tasks
The Cloud Events extension supports the following message types for data operations and business workflows:
Extensibility: This extension can be extended with custom implementations for additional message types by implementing the Cloud Event Msg Interface. All built-in message types require JSON format in the data field for request parameters.
For detailed documentation, see the specialized reference documents:
| Message Type | Description | Direction | Documentation |
|---|---|---|---|
| Data Operations | |||
| Data.Records.Get | Retrieve full record data as JSON following data shipping standard. Supports field filtering, table view filtering, and date/time range filtering. | Outbound | Data_Message_Types.md |
| Data.Records.Set | Insert or update full record data as JSON. Automatically determines insert vs update based on SystemId or primary key. | Inbound | Data_Message_Types.md |
| Data.RecordIds.Get | Retrieve record IDs and modification timestamps for sync scenarios. | Outbound | Data_Message_Types.md |
| CSV.Records.Get | Export all matching records from a specified table as a UTF-8 CSV file in Open Mirroring format. Supports continuation via continueFromRecordId for large exports approaching the 2 GB limit. | Outbound | Data_Message_Types.md |
| Data.Totals.Get | Aggregate Decimal SumIndexFields across all matching records using CalcSums. Returns field totals as a single JSON object. | Outbound | Data_Message_Types.md |
| Deleted.Records.Get | Retrieve full field-level snapshots of deleted records from the Cloud Events Delete Log. Requires "Store Record" enabled per table. | Outbound | Data_Message_Types.md |
| Deleted.RecordIds.Get | Retrieve SystemId and deletion timestamp for deleted records. Lightweight — no "Store Record" requirement. | Outbound | Data_Message_Types.md |
| CSV.DeletedRecords.Get | Export deleted record audit log entries as CSV. Fixed audit columns: systemId, tableId, tableName, deletedAt, userId. | Outbound | Data_Message_Types.md |
| Metadata Operations | |||
| Help.Tables.Get | Returns list of all available tables with ID and name. | Outbound | Metadata_Message_Types.md |
| Help.Fields.Get | Retrieve field metadata including field number, name, type, length, primary key status, and table relation indicators. | Outbound | Metadata_Message_Types.md |
| Help.MessageTypes.Get | Returns list of all available message types with metadata for API discovery. | Outbound | Metadata_Message_Types.md |
| Help.Implementation.Get | Returns help documentation for a specified message type (self-documenting API). | Outbound | Metadata_Message_Types.md |
| Help.Permissions.Get | Retrieve current user's read/write permissions for a specified table. | Outbound | Metadata_Message_Types.md |
| Help.NextLineNo.Get | Returns the next available line number for a table whose last PK field is an Integer. | Outbound | Metadata_Message_Types.md |
| Help.PageUrl.Get | Returns the Business Central web URL for the card page of a specific record. Response content type: text/json. | Outbound | Metadata_Message_Types.md |
| Help.TableRelations.Get | Returns all foreign-key relationships for a table including conditional relation branches. | Outbound | Metadata_Message_Types.md |
| Field.Translation.Get | Retrieve BC system translations for a specific record field. | Outbound | Metadata_Message_Types.md |
| Field.Translation.Set | Write or delete BC system translations for a record field. | Inbound | Metadata_Message_Types.md |
| Field.Translations.Get | Retrieve BC system translations for all fields (or a specific field) on a record. | Outbound | Metadata_Message_Types.md |
| Sales, Customer & Item Operations | |||
| Customer.CreditLimit.Get | Retrieve customer credit limit information with balance, outstanding amounts, and credit status. | Outbound | Sales_Message_Types.md |
| Customer.SalesHistory.Get | Retrieve sales history by item for a specific customer within a date range, based on Item Ledger Entries. | Outbound | Sales_Message_Types.md |
| Customer.Statement.Pdf | Retrieve customer statement as a PDF document with optional date range using configured report selection. | Outbound | Sales_Message_Types.md |
| Item.Availability.Get | Retrieve item availability (Physical Inventory or Calculated Quantity with supply/demand). | Outbound | Sales_Message_Types.md |
| Item.Price.Get | Retrieve item price information from price lists based on customer, date, quantity, and variant. | Outbound | Sales_Message_Types.md |
| Sales.Document.Post | Post a released sales order (shipment, invoice, or both). | Inbound | Sales_Message_Types.md |
| Sales.Document.Release | Release an open sales order to make it ready for processing and posting. | Inbound | Sales_Message_Types.md |
| Sales.Document.Reopen | Reopen a released or pending approval sales document to allow modifications. | Inbound | Sales_Message_Types.md |
| Sales.Document.Statistics | Retrieve sales document statistics including amounts, VAT totals, quantities, weight and volume. | Outbound | Sales_Message_Types.md |
| Sales.Document.PreviewPost | Simulate posting a sales document and return every captured ledger entry (G/L, VAT, Item, Value, Cust. / Detailed Cust. Ledger, and any other ledger table populated by the BC posting routine, including extension tables) without committing. | Inbound | Sales_Message_Types.md |
| Sales.SalesInvoice.Pdf | Retrieve posted sales invoice as a PDF document using configured report selection. | Outbound | Sales_Message_Types.md |
| Sales.SalesShipment.Pdf | Retrieve posted sales shipment as a PDF document using configured report selection. | Outbound | Sales_Message_Types.md |
| Sales.SalesCreditMemo.Pdf | Retrieve posted sales credit memo as a PDF document using configured report selection. | Outbound | Sales_Message_Types.md |
| Sales.ReturnReceipt.Pdf | Retrieve posted return receipt as a PDF document using configured report selection. | Outbound | Sales_Message_Types.md |
| Purchase Operations | |||
| Purchase.Document.Release | Release an open purchase document. | Inbound | Purchase_Message_Types.md |
| Purchase.Document.Reopen | Reopen a released or pending approval purchase document to allow modifications. | Inbound | Purchase_Message_Types.md |
| Purchase.Document.Statistics | Retrieve purchase document statistics including amounts, VAT totals, quantities, weight and volume. | Outbound | Purchase_Message_Types.md |
| Purchase.Document.Post | Post a purchase document and return the resulting posted invoice number. | Inbound | Purchase_Message_Types.md |
| Purchase.Document.PreviewPost | Simulate posting a purchase document and return every captured ledger entry (G/L, VAT, Item, Value, Vendor / Detailed Vendor Ledger, and any other ledger table populated by the BC posting routine, including extension tables) without committing. | Inbound | Purchase_Message_Types.md |
| Finance Operations | |||
| Finance.GeneralJournal.Check | Validates a general journal batch and returns comprehensive readiness status with detailed validation results. Uses BC Error Message Management framework to collect all errors in a single pass. | Outbound | Finance_Message_Types.md |
| Finance.GeneralJournal.Post | Posts a general journal batch and returns posting statistics including entry counts by type (GL, Customer, Vendor). | Inbound | Finance_Message_Types.md |
| Finance.FAJournal.SetupNewLine | Create and initialize a new fixed asset journal line with defaults inherited from template and batch. | Inbound | Finance_Message_Types.md |
| Finance.FAJournal.Check | Validates a fixed asset journal batch without posting. Zero-amount lines produce warnings (non-blocking). | Outbound | Finance_Message_Types.md |
| Finance.FAJournal.Post | Posts a fixed asset journal batch and returns posting statistics including FA register and entry range. | Inbound | Finance_Message_Types.md |
| Finance.FAJournal.PreviewPost | Simulate posting a fixed asset journal batch and return every captured ledger entry (Maintenance Ledger, FA Ledger, G/L, VAT) without committing. | Inbound | Finance_Message_Types.md |
| Inventory Operations | |||
| Inventory.ItemJournal.SetupNewLine | Create and initialize a new item journal line with defaults inherited from template and batch. | Inbound | Inventory_Message_Types.md |
| Inventory.ItemJournal.Check | Validates an item journal batch without posting. Returns line count, total quantity, total amount, and errors/warnings. | Outbound | Inventory_Message_Types.md |
| Inventory.ItemJournal.Post | Posts an item journal batch and returns posting statistics including item register and entry range. | Inbound | Inventory_Message_Types.md |
| Inventory.ItemJournal.PreviewPost | Simulate posting an item journal batch and return every captured ledger entry (Item Ledger, Value Entry, and G/L when applicable) without committing. | Inbound | Inventory_Message_Types.md |
| Warehouse Operations | |||
| Warehouse.Shipment.Create | Creates one Warehouse Shipment per supplied source document (Sales Order, Outbound Transfer Order) via BC codeunit 5752 Get Source Doc. Outbound. Each source produces its own header. | Inbound | Inventory_Message_Types.md |
| Warehouse.Shipment.Post | Posts a Warehouse Shipment via BC codeunit 5763 Whse.-Post Shipment. Optional invoice=true also invoices the source documents. Gated by CE Warehouse Posting (always) and CE G/L Posting (when invoice=true). | Inbound | Inventory_Message_Types.md |
| Warehouse.Shipment.PreviewPost | Simulate posting a Warehouse Shipment (Ship + Invoice — invoice flag is forced by BC's preview subscriber) and return every captured ledger entry without committing. WMS locations require a registered pick first. | Inbound | Inventory_Message_Types.md |
| Projects Operations | |||
| Projects.ProjectJournal.SetupNewLine | Create and initialize a new project (job) journal line with defaults inherited from template and batch. | Inbound | Projects_Message_Types.md |
| Projects.ProjectJournal.Check | Validates a project journal batch without posting. Returns line count, total quantity, total line amount, and errors/warnings. | Outbound | Projects_Message_Types.md |
| Projects.ProjectJournal.Post | Posts a project journal batch and returns posting statistics including job register and entry range. | Inbound | Projects_Message_Types.md |
| Projects.ProjectJournal.PreviewPost | Simulate posting a project (job) journal batch and return every captured ledger entry (Job Ledger Entry with tableCaption "Project Ledger Entry", Res. Ledger Entry, and G/L when applicable) without committing. DimensionSetID is returned as an array of {DimensionCode, DimensionValueCode}. | Inbound | Projects_Message_Types.md |
| Resources Operations | |||
| Resources.ResourceJournal.SetupNewLine | Create and initialize a new resource journal line with defaults inherited from template and batch. | Inbound | Resources_Message_Types.md |
| Resources.ResourceJournal.Check | Validates a resource journal batch without posting. Returns line count, total quantity, total cost, and errors/warnings. | Outbound | Resources_Message_Types.md |
| Resources.ResourceJournal.Post | Posts a resource journal batch and returns posting statistics. Resource register fields are conditional (present only when a register is created). | Inbound | Resources_Message_Types.md |
| Incoming Document Operations | |||
| Incoming.Document.Create | Create a new Incoming Document with a main file attachment. | Inbound | IncomingDocument_Message_Types.md |
| Incoming.Document.Attach | Add a supplemental attachment to an existing Incoming Document. | Inbound | IncomingDocument_Message_Types.md |
| Incoming.Document.Process | Process an Incoming Document to create a purchase invoice or journal line. | Inbound | IncomingDocument_Message_Types.md |
| Incoming.Document.Get | Retrieve an Incoming Document with header fields and all attachments as Base64. | Outbound | IncomingDocument_Message_Types.md |
| Approval Operations | |||
| Document.Approval.Get | Retrieve approval log entries with linked active and posted approval entries, with per-record permission filtering. | Outbound | Approval_Message_Types.md |
| Document.Approval.Send | Create approval entries for a document with approver assignments based on configured approval workflows. | Inbound | Approval_Message_Types.md |
| Document.Approval.Approve | Approve one or more open Approval Entry records using BC standard Approvals Mgmt. authorization. | Inbound | Approval_Message_Types.md |
| Document.Approval.Reject | Reject one or more open Approval Entry records with optional comment. | Inbound | Approval_Message_Types.md |
| Document.Approval.Me | Retrieve approval entries assigned to the calling user with source document linking. | Outbound | Approval_Message_Types.md |
| Document.Approval.Delegate | Delegate one or more open Approval Entry records to another user. | Inbound | Approval_Message_Types.md |
| Memory Operations | |||
| Memory.Company.Get | Retrieve company-scoped memory records with pagination and tableView filtering. | Outbound | Memory_Message_Types.md |
| Memory.Company.Set | Insert or update company-scoped memory records via a data array. | Inbound | Memory_Message_Types.md |
| Memory.User.Get | Retrieve user-scoped memory records (private to the creator). | Outbound | Memory_Message_Types.md |
| Memory.User.Set | Insert or update user-scoped memory records (private to the creator). | Inbound | Memory_Message_Types.md |
The Cloud Events extension provides External Business Events that enable external systems to receive webhook notifications when messages complete or fail processing. This eliminates the need for continuous polling and enables true event-driven architectures.
Event Pattern: Minimal Notification + API Fetch
| Event Name | When Raised | Webhook Payload | Use Case |
|---|---|---|---|
| CloudEventMessageCompleted | Message processing succeeds | { MessageId, MessageType, ResponseContentLink, Timestamp } | Notify external systems of successful completion |
| CloudEventMessageFailed | Message processing fails | { MessageId, MessageType, ResponseContentLink, Timestamp } | Alert on processing failures |
Configure webhook subscriptions via Business Central's Event Subscriptions page:
CloudEventMessageCompleted or CloudEventMessageFailedFor comprehensive webhook setup, security considerations, code examples, and troubleshooting:
→ See Events and Webhooks Reference
Includes:
All API endpoints require proper authentication using OAuth 2.0 or Basic Authentication as configured in Business Central.
Required Permissions:
Cloud Events Full permission set or equivalent permissions to access cloud event functionality.All Cloud Events endpoints (/tasks, /queues, /responses, /requests) enforce strict data isolation at the Entra Application level.
Every response is automatically filtered server-side to records where SystemCreatedBy = UserSecurityId(). UserSecurityId() in Business Central resolves to the Object ID of the Entra Application (Client ID) that authenticated the request.
Consequences:
| Scenario | Result |
|---|---|
App A lists /queues | Returns only messages submitted by App A |
App A requests /responses({id}) for a message created by App B | Returns empty — no data leaked |
App A requests /requests({id}) for a message created by App B | Returns empty — no data leaked |
| Two apps share the same company + environment | Each sees only its own message history |
This isolation is unconditional — it cannot be overridden by OData filters, admin credentials, or any other mechanism. It applies to GET (listing and single-record reads) on all four endpoints.
Request:
POST /api/origo/cloudEvent/v1.0/tasks
Content-Type: application/json
{
"specversion": "1.0",
"type": "Help.Tables.Get",
"source": "MyIntegrationApp v1.0",
"datacontenttype": "application/json",
"data": "{}"
}
Response:
{
"@odata.context": "...",
"specversion": "1.0",
"type": "Help.Tables.Get",
"source": "MyIntegrationApp v1.0",
"id": "12345678-1234-1234-1234-123456789abc",
"time": "2026-02-19T10:30:00Z",
"subject": "",
"datacontenttype": "text/json",
"data": "/api/origo/cloudEvent/v1.0/responses(12345678-1234-1234-1234-123456789abc)"
}
Step 1: Queue the Request
POST /api/origo/cloudEvent/v1.0/queues
Content-Type: application/json
{
"specversion": "1.0",
"type": "Help.Fields.Get",
"subject": "Customer",
"source": "MyIntegrationApp v1.0",
"datacontenttype": "application/json",
"data": "{\"tableName\":\"Customer\"}"
}
Step 2a: Option 1 - Poll for Status
POST /api/origo/cloudEvent/v1.0/queues('{message-id}')/Microsoft.NAV.GetStatus
Step 2b: Option 2 - Webhook Notification (Recommended)
Subscribe to the CloudEventMessageCompleted event and receive automatic notification when processing completes:
{
"MessageId": "{message-id}",
"MessageType": "Help.Fields.Get",
"ResponseContentLink": "/api/origo/cloudEvent/v1.0/responses({message-id})/data",
"Timestamp": "2026-03-08T14:30:22Z"
}
Step 3: Retrieve Results
GET /api/origo/cloudEvent/v1.0/responses('{message-id}')
Note: For webhook setup, see Events and Webhooks Reference.
Request:
POST /api/origo/cloudEvent/v1.0/tasks
Content-Type: application/json
{
"specversion": "1.0",
"type": "Data.RecordIds.Get",
"source": "DataSync Service v2.1",
"datacontenttype": "application/json",
"data": "{\"tableName\":\"Customer\",\"startDateTime\":\"2026-02-01T00:00:00Z\",\"endDateTime\":\"2026-02-19T23:59:59Z\"}"
}
Request:
POST /api/origo/cloudEvent/v1.0/tasks
Content-Type: application/json
{
"specversion": "1.0",
"type": "Help.MessageTypes.Get",
"source": "MyIntegrationApp v1.0",
"datacontenttype": "application/json",
"data": "{}"
}
Response:
{
"@odata.context": "...",
"specversion": "1.0",
"type": "Help.MessageTypes.Get",
"source": "my-application",
"id": "12345678-1234-1234-1234-123456789abc",
"time": "2026-02-25T10:30:00Z",
"subject": "",
"datacontenttype": "text/json",
"data": "/api/origo/cloudEvent/v1.0/responses(12345678-1234-1234-1234-123456789abc)"
}
Note: The data field contains a download URL. Retrieve the actual response data by calling the URL.
Request:
POST /api/origo/cloudEvent/v1.0/tasks
Content-Type: application/json
{
"specversion": "1.0",
"type": "Help.Implementation.Get",
"subject": "Help.Fields.Get",
"source": "my-application",
"datacontenttype": "application/json"
}
Response:
{
"@odata.context": "...",
"specversion": "1.0",
"type": "Help.Implementation.Get",
"source": "my-application",
"id": "12345678-1234-1234-1234-123456789abc",
"time": "2026-02-25T10:35:00Z",
"subject": "Help.Fields.Get",
"datacontenttype": "text/markdown",
"data": "/api/origo/cloudEvent/v1.0/responses(12345678-1234-1234-1234-123456789abc)"
}
Note: The data field contains a download URL. Retrieve the actual markdown help documentation by calling the URL.
type or specversion are not providedapplication/json for structured data payloadstext/jsonVersion 1.0.0.0 - Initial release
© Origo – Cloud Events Base Extension