Integration Test Endpoint
This protected endpoint allows you to generate payloads that are published to SNS, simulating production payloads such as event, people, session participation and vendor lead capture.
You can use this to produce payloads and test your integration/filtering or routing of messages. For example, you may want to test different workflows for 'attended' vs 'not attended' people.
Overview
This endpoint is protected and requires a valid Jomablue API token added a bearer token to the Authorization request header.
Authentication
Firstly, obtain a valid token from the authentication endpoint
curl -L -X POST "https://acme.jomablue.com/api/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "veryLongAPItoken"}'
Endpoint
This endpoint will allow you to publish a mock payload to SNS for each resource type or you can customise the payload in order to change values to test your business logic.
You are required to include a valid authorization Bearer header and the Content-Type header as per the examples below.
Request for the mock payloads:
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1..." \
-d '{"resource_type":"lead"}'Example Response
This is an example response to the HTTP request. The 'Payload' is published via SNS simultaneously.
{
"result": {
"MessageId": "3d2cca88-0547-58e1-9634-aa9135fe0693",
"@metadata": {
"statusCode": 200,
"effectiveUri": "https:\/\/sns.ap-southeast-2.amazonaws.com",
"headers": {
"x-amzn-requestid": "45ee1d26-fd19-5800-82e3-7d3fcda0a672",
"date": "Sun, 02 Feb 2025 08:36:09 GMT",
"content-type": "text\/xml",
"content-length": "294",
"connection": "keep-alive"
},
"transferStats": {
"http": [
[]
]
}
}
},
"payload": {
"resource_type": "event",
"generated_at": "2025-02-02T08:36:09.178812Z",
"identifiers": {
"id": "acme\/event\/123"
},
"data": {
"name": "Sonic Conference 2025",
"start_time": "2024-12-25T12:00:00.000000Z",
"end_time": "2024-12-26T12:00:00.000000Z",
"short_description": "An awesome education event",
"description": "For the 10th year we are running the awesome educatio...",
"person_count_goal": 3000,
"venue_name": "ICC Sydney",
"venue_address": "14 Darling Dr, Sydney NSW 2000",
"timezone": "Australia\/Sydney",
"updated_at": "2025-02-02T08:36:09.178812Z",
"created_at": "2025-02-02T08:36:09.178812Z",
"metadata": {
"text": "anything",
"selector": "option2",
"predefined": "predefinedValue"
},
"categories": [
{
"id": "acme\/category\/1231",
"name": "Delegate"
},
{
"id": "acme\/category\/1232",
"name": "VIP"
},
{
"id": "acme\/category\/1233",
"name": "Crew"
},
{
"id": "acme\/category\/1234",
"name": "Jomablue Support"
}
]
}
}
}
To test business logic you can also provide full payloads in the request to /integration/api/test/payload with values that are more suited to your use case.
In its simplest form, this can be used to test a person as "attended" or "not attended" the event. In a complex example, you can alter the event meta data and organisation uid's to ensure that data is routed to expected destinations within your organisation.
Examples are below with slight changes to data values.
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
-H "Content-Type: application/vnd.api+json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJh..." \
-d '{
"resource_type": "event",
"generated_at": "2025-01-28T04:27:07.012624Z",
"identifiers": {
"id": "acme/event/123"
},
"data": {
"name": "Corporate Event 22",
"start_time": "2024-12-25T12:00:00.000000Z",
"end_time": "2024-12-26T12:00:00.000000Z",
"short_description": "An awesome education event",
"description": "Corporate event desciption",
"person_count_goal": 3000,
"venue_name": "Sydney Convention Centre",
"venue_address": "n/a",
"timezone": "Australia/Sydney",
"updated_at": "2025-01-28T04:27:07.012624Z",
"created_at": "2025-01-28T04:27:07.012624Z",
"metadata": {
"event_owner": "Jane Smith",
"region": "EMEA",
"cost-center": "0x7718-COGS"
},
"categories": [
{
"id": "acme/category/1231",
"name": "Attendee"
},
{
"id": "acme/category/1232",
"name": "Speaker"
},
{
"id": "acme/category/1233",
"name": "Staff"
},
{
"id": "acme/category/1234",
"name": "Major Sponsor"
}
]
}
}'