---
title: Integration Test Endpoint
slug: docs/integration-test-endpoint
createdAt: 2025-02-01T10:33:17.041Z
---

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.&#x20;

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.&#x20;

## Overview

This endpoint is protected and requires a valid Jomablue API token added a bearer token to the *Authorization* request header.&#x20;

### Authentication&#x20;

Firstly, obtain a valid token from the authentication endpoint

:::CodeblockTabs
Authentication

```curl
curl -L -X POST "https://acme.jomablue.com/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email": "apiuser@jomablue.com", "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.&#x20;

You are required to include a valid *authorization Bearer* header and the *Content-Type* header as per the examples below.&#x20;



Request for the mock payloads:

:::CodeblockTabs
Mock Event

```curl
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
  -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1..." \
    -d '{"resource_type":"event"}'
```

Mock Person

```curl
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
  -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1..." \
    -d '{"resource_type":"person"}'
```

Mock Session Participation

```curl
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
  -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1..." \
    -d '{"resource_type":"session_participation"}'
```

Mock Lead

```curl
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.&#x20;

:::CodeblockTabs
Example Response

```json
{
    "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.&#x20;

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.&#x20;



Examples are below with slight changes to data values.&#x20;

:::CodeblockTabs
Custom Event Payload

```curl
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"
      }
    ]
  }
}'
```

Custom Person

```curl
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
  -H "Content-Type: application/vnd.api+json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiL...." \
    -d '{
  "resource_type": "person",
  "generated_at": "2025-01-28T04:45:34.089026Z",
  "context": {
    "event_id": "acme/event/123",
    "event_name": "Sonic Conference 2025",
    "event_metadata": {
      "event_owner": "Jane Smith",
      "region": "EMEA",
      "cost-center": "0x7718-COGS"
    }
  },
  "identifiers": {
    "first_name": "James",
    "last_name": "Dean",
    "email": "jd@example.com",
    "phone": "",
    "company": "Example Inc.",
    "id": "acme/event_person/123",
    "organisation_uid": "0x8718741991a"
  },
  "data": {
    "job_title": "Accountant",
    "cancelled": false,
    "checked_in": true,
    "first_check_in": null,
    "import_type": "import",
    "updated_at": "2025-01-28T04:45:34.089026Z",
    "created_at": "2025-01-28T04:45:34.089026Z",
    "custom_fields": [
      {
        "key": "member_id",
        "value": "0xj18ajAlOpQq"
      },
      {
        "key": "data_consent",
        "value": "yes"
      },
      {
        "key": "primary_interest",
        "value": "Technology"
      }
    ],
    "categories": [
      {
        "id": "acme/category/2",
        "name": "Attendee"
      },
      {
        "id": "acme/category/3",
        "name": "Day 1"
      }
    ]
  }
}'
```

Custom Session Participation

```curl
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
  -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG..." \
    -d '{
  "resource_type": "session_participation",
  "generated_at": "2025-01-28T04:27:07.322076Z",
  "context": {
    "event_id": "acme/event/123",
    "event_name": "Sonic Conference 2025",
    "event_metadata": {
      "text": "anything",
      "selector": "option2",
      "predefined": "predefinedValue"
    },
    "person_first_name": "Walt",
    "person_last_name": "McGraw",
    "person_email": "walt@example.com",
    "person_phone": "+61491570006",
    "person_company": "Barrows, Heaney and Watsica",
    "person_id": "acme/event_person/123",
    "person_organisation_uid": "4ab9ecb4-91cd-34ba-928e-b6d929b81a1c",
    "session_id": "acme/session/123",
    "session_name": "Session of discovery",
    "session_organisation_uid": "ecb44ab9-91cd-34ba-928e-b81a1cb6d929"
  },
  "identifiers": {
    "id": "acme/session_participation/123"
  },
  "data": {
    "attended": false,
    "updated_at": "2025-01-28T04:27:07.322076Z",
    "created_at": "2025-01-28T04:27:07.322076Z"
  }
}'
```

Custom Lead

```curl
curl -L -X POST "https://acme.jomablue.com/integration/api/test/payload" \
  -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhb..." \
    -d '{
  "resource_type": "lead",
  "generated_at": "2025-01-28T04:27:07.476819Z",
  "context": {
    "event_id": "acme/event/123",
    "event_name": "Sonic Conference 2025",
    "event_metadata": {
      "text": "anything",
      "selector": "option2",
      "predefined": "predefinedValue"
    },
    "person_first_name": "Derrek",
    "person_last_name": "Jammers",
    "person_email": "derrek.jammers@example.com",
    "person_phone": "+61491570006",
    "person_company": "",
    "person_id": "acme/event_person/123",
    "person_organisation_uid": "404419",
    "vendor_id": "acme/vendor/123",
    "vendor_name": "CloudGate22",
    "vendor_organisation_uid": "00918"
  },
  "identifiers": {
    "id": "acme/lead/123"
  },
  "data": {
    "updated_at": "2025-01-28T04:27:07.476819Z",
    "created_at": "2025-01-28T04:27:07.476819Z"
  }
}'
```
:::

