Contracts API: EmitEvent

API endpoints for contract management

EmitEvent

This method is used to broadcast an event when subscribed.

Use this information to match the event type to call the API createEventSubscription.

Supplementary SWAGGER documentation is available here: https://api.test.catch-e.com/docs/?/Events/emitEvent(https://api.test.catch-e.com/docs/?urls.primaryName=Main#/Events/emitEvent|).

Permissions

To run this API, the nominated 'web-services' role needs to be given permission.

If you are not actively using the API, leave the permission off for better security.

Go to Roles / Apis and check on Events:Emit

Note: This API is not configured for external use.
Contact your Account Manager to discuss access to this API.

HTTP Method

Use the HTTP Method 'POST' for consuming this web service.

URL Examples

https://api.demo.catch-e.com/authenticate
https://api..catch-e.com/authenticate
https://api.test.catch-e.com/event

Parameters - Path Variables

KeyFormatNotesMandatory
typestringThe type of event being emitted. This determines which subscribers will receive itYes
payloaddescriptionThe data associated with the event. This will be included in the message sent to subscribersYes

Headers

KeyFormatNotesMandatory
Audit-User-IdstringPass a user_id here to create audit records with this user's details. This can only be done if the authenticated API user has Roles / Apis checked for the permission Audit:UserIdOverrideNo

Body Sample

Event

[ { "type": "receipts.batch.posted", "payload": { "additionalProp1": {} }}]

Response Details

Validation MessagesComments
202 OK
{ { "title": "Accepted", "status": 202, "detail": "ReceiptBatchPosted event emitted", "messageId": "e0133369-2032-5e7a-aa9f-5392a081465c"}}

| The event is accepted for publishing. |
| 401 - Unauthorized | | |

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized"}

| You have not authenticated before running this API or The token_timeout of the current session has passed. You need to authenticate again. |
| 403 - Forbidden | | |

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden"}

| You do not have permissions for this request. Go to System Roles and enter 'web_services' Navigate to the Roles / APIs tab to make sure the permission you need to run this API is checked. |
| 422 - Unprocessable Content | | |

{ "validation_messages": { "type": { "notInArray": "Unsupported value" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation"}

| Event Type not found/valid. |
| 423 - Locked | | |

{ "validation_messages": [ { {"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","title":"Locked","status":423,"detail":"Failure obtaining billing process lock"} } ], "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 423, "detail": "Failed Validation"}

| Uanble to establish a billing lock. |