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

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.test.catch-e.com/event

Headers

Key

Format

Notes

Mandatory

Audit-User-Id

string

Pass 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:UserIdOverride

No

Body (JSON)

JSON

Field Format

Notes

Mandatory

type

string

The type of event being emitted. This determines which subscribers will receive it

Yes

payload

object

The data associated with the event. This will be included in the message sent to subscribers

Yes

Input Fields (JSON)

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

Response Details

Validation Message

Comments

202 Accepted

The event is accepted for publishing

401 - 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

You do not have permissions for this request

422 - Unprocessable Entity

Event type not found or invalid

423 - Locked

Unable to establish a billing lock

Successful Response Example

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

Error Response Examples

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 Entity

{ "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 or invalid.

423 Locked

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Locked", "status": 423, "detail": "Failure obtaining billing process lock" } 

Unable to establish a billing lock.