Interaction

Note

A file is attached to an interaction through the base 64 upload field, and to a whole batch through sharedValues.upload. See Uploading files.

Object Shape

An interaction object will always have this shape when not embedded into other objects:

{
  "id": "integer",
  "_type": "string",
  "firstDelegate": "object:delegate",
  "secondDelegate": "object:delegate",
  "thirdDelegate": "object:delegate",
  "firstDevice": "object:device",
  "secondDevice": "object:device",
  "thirdDevice": "object:device",
  "interactionType": "string",
  "data": "object",
  "recordedAt": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

The data property inside the interaction object does not have a configurable structure and will depend on the type of interaction. For example a lead interaction will have all answers loaded in this property.

Posting Form Answers

When an interaction captures a form submission (for example a lead capture, a poll vote, a registration form or any custom form-based interaction), answers must be posted following the convention below. The backend will automatically reshape them into the structures expected by reporting, exports and downstream consumers.

This convention applies to every source — REST API, mobi/rego sites, portal, batch imports, when-then actions — because the reshaping happens in a single event subscriber, regardless of where the interaction was created.

Input shape

Send the form payload inside the interaction’s data property:

{
  "firstDelegate": 789,
  "firstDevice": 85,
  "data": {
    "form": "leadcapture",
    "answers": [
      {
        "field": "name",
        "fieldLabel": "Full Name",
        "fieldType": "text",
        "answer": "Jane Doe"
      },
      {
        "field": "company",
        "fieldLabel": "Company",
        "fieldType": "text",
        "answer": "Acme Corp"
      },
      {
        "field": "contact.email",
        "fieldLabel": "Email Address",
        "fieldType": "email",
        "answer": "jane@satellite.test"
      },
      {
        "field": "contact.phone",
        "fieldLabel": "Phone Number",
        "fieldType": "tel",
        "answer": "+64 21 555 0000"
      }
    ]
  }
}

Required keys inside data:

  • form — a string identifier for the form (used to disambiguate when an interaction type has multiple forms).

  • answers — a flat list of answer objects.

Each answer object supports:

Key

Required

Description

field

yes

The field path. Use dot-notation (contact.email) for nested answers; a single segment (name) for top-level answers.

answer

yes

The submitted value (string, number, boolean, array — whatever the field type produces).

fieldLabel

no

Human-readable label. Used as the key in reportData for exports and reports. Falls back to field when missing.

fieldType

no

The form field type (text, checkbox, select, …). Carried through for consumers that need it; not used by the reshaping logic.

How the backend reshapes the payload

After the interaction is received, the original data is augmented with two derived structures:

  • answersData — the answers reassembled into a nested object that mirrors the dot-notation paths. Use this when reading answers programmatically.

  • reportData — a flat label => value map. Use this for exports, CSV/XLSX downloads and reports where the human-readable label is what matters.

The original form and answers keys are preserved untouched.

Given the request above, the stored data becomes:

{
  "form": "lead-capture",
  "answers": [
    { "field": "name", "fieldLabel": "Full Name", "fieldType": "text", "answer": "Jane Doe" },
    { "field": "company", "fieldLabel": "Company", "fieldType": "text", "answer": "Acme Corp" },
    { "field": "contact.email", "fieldLabel": "Email Address", "fieldType": "email", "answer": "jane@acme.test" },
    { "field": "contact.phone", "fieldLabel": "Phone Number", "fieldType": "tel", "answer": "+64 21 555 0000" }
  ],
  "answersData": {
    "name": "Jane Doe",
    "company": "Acme Corp",
    "contact": {
      "email": "jane@acme.test",
      "phone": "+64 21 555 0000"
    }
  },
  "reportData": {
    "Full Name": "Jane Doe",
    "Company": "Acme Corp",
    "Email Address": "jane@acme.test",
    "Phone Number": "+64 21 555 0000"
  }
}

Notes and gotchas

  • Always send the flat answers array. Do not pre-build answersData or reportData — the subscriber will skip reshaping if answersData is already present in the payload, leaving an inconsistent record.

  • Field paths are dot-separated, not bracketed. Use contact.email, not contact[email].

  • Answers without a field are silently skipped; make sure every answer object has one.

  • form is required for the reshaping to run. An interaction with answers but no form will be stored as-is, with no answersData / reportData.

  • The convention is the same for POST /interaction/new/{type} and POST /interaction/batch.

Interaction Types

The interaction types shipped by default are listed below. A project can add, remove or retag them — the authoritative list for a given instance is the tagx_interaction.types setting, so treat this as the shipped default rather than a closed set.

Each type carries a set of tags, and four of them govern what you can do over the API:

public-write

Clients may create interactions of this type. Without this tag, a POST is rejected.

rest-api

Interactions of this type are included in the delegate payload returned by /delegate/list and /delegate/{idType}:{id}. Types without it still exist, but are not embedded in delegate responses.

deviceless

The interaction is meaningful without a device, so no device slot is required.

system-only

Written by the system and not to be altered. Do not create or modify these; they are produced by comms delivery, site visits and similar internal events.

Attendance

check-in (public-write, rest-api)

Someone has checked in to an event, session or any other device. The most common action, and the right choice wherever you do not need custom behaviour or complex data.

check-out (public-write)

The opposite of a check-in — leaving a session. Used to implement single-entry sessions.

join (public-write, rest-api)

Usually about a session. Broadly, the delegate is expected to attend, or is allowed in.

cancel-join

Reverses a join.

registered (rest-api), accepted, declined, cancel-declined

Registration outcomes for an invitation or an event.

waitlist, cancel-waitlist

The delegate is waitlisted for a session, or has come off the waitlist.

scanned

A code belonging to the delegate or device was scanned.

Interest and engagement

favourite, cancel-favourite

The delegate marked a device as a favourite, or removed it.

lead (public-write)

A lead capture. The capturer is firstDelegate, the captured delegate is secondDelegate, and the event or stand is firstDevice.

connect, connected (deviceless)

A connection request between two delegates, and its acceptance.

feedback, question, poll-vote, competition (deviceless)

Delegate-submitted content — feedback, a question for a session, a poll vote, a competition entry.

image, upload (deviceless)

Media attached by a delegate; the file itself rides on the interaction’s upload field.

message, note, alert (deviceless)

Free-text records against a delegate or device.

Invitations

invite, un-invite

Invite delegates to a session, and withdraw that invitation. Usually paired with project-specific logic.

Bookings and orders

booking, cancel-booking

Book a device and cancel that booking. The device should be of a bookable type, though this is not enforced.

order, order-processing, order-cleared

An ad-hoc order placed against an order handler and moved through its lifecycle. The handler is firstDevice and the item ordered is secondDevice.

coat-check-in, coat-check-out (deviceless)

Cloakroom hand-over and collection.

Purchasing

purchase-complete (deviceless)

An order was paid for and fulfilled. Its data carries the transaction code and totals.

purchase-unfulfilled (deviceless)

An order was paid for but could not be supplied.

variation, sub-product

Product structure, both parent → child between two product devices: a variation axis, and a bundled product that generates its own ticket.

promo-code-discount, promo-code-show, promo-code-hide

The effect a promo code had on an order. A discount cascades to every variation leaf beneath the product it names.

seat-assignment

A delegate occupies a seat. The occupant is firstDelegate and the seat is firstDevice. Releasing a seat soft-deletes this interaction rather than adding a counter-interaction.

Rewards

points (data: value, reason)

Points awarded to a delegate. The integer amount is in data.value.

win

The delegate won a prize; the prize device is firstDevice.

claim, redeem, open (public-write)

A delegate claims, redeems or opens something — a voucher, coupon or prize.

voucher (deviceless)

A voucher issued to the delegate.

assign

A device or item was assigned to a delegate.

limit (data: limit)

An access-control cap, with the integer ceiling in data.limit.

Communications

send-email, send-sms, send-push (deviceless)

A request to send a message.

email-sent, email-delivered, email-open, email-click (deviceless, system-only)

Email lifecycle events. The comm id is in data.emailId; open and click rows accumulate counts on one row rather than appending new ones.

sms-sent, sms-received (deviceless, system-only)

SMS lifecycle events.

link-recovery (deviceless)

The delegate requested their personal link again.

System

visited-mobi, visited-rego, visited-portal (deviceless, system-only)

The delegate opened one of the sites.

print (deviceless, data: appType, printTemplate)

Something was printed for the delegate, such as a badge.

download, downloaded (deviceless)

A download was offered and taken.

ai-result (deviceless)

The result of an AI Assistant action recorded against a delegate or device.

own

Ownership of a device — typically an organisation — by a delegate.

GET /interaction/list

Get the list of interactions matching the specified query.

Note

This method supports pagination.

Use limit and offset to paginate returned results. The defaults if no limit or offset are provided are limit=5000 and offset=0.

GET /interaction/list?offset=0&limit=5000

The total result set count is returned in all responses in the meta property. Links to the next or previous page are also provided in the same property.

Searching interactions

Pass a search query parameter with a JSON expression to filter the list. See Searching lists for the full operator reference.

Category

Fields

Direct fields

id, interactionType, linkedId, linkedClass, origin, sources, recordedAt, createdAt, updatedAt

Relations (by ID)

firstDelegate, secondDelegate, thirdDelegate, recordedBy, firstDevice, secondDevice, thirdDevice, recordedFrom

Relations (by record)

The same names with *=, matching the related record’s own fields — a delegate by name, email, phone or type, a device by name or type.

Any slot

anyDelegate and anyDevice match across all three slots of their kind, with ==, in, *= or empty.

Related type fields

firstDelegate.delegateType and its siblings, anyDelegate.delegateType, firstDevice.deviceType and its siblings, anyDevice.deviceType. Other fields of a related record are not reachable and return 400.

Unstructured data

ud, against the interaction’s own data.

Interaction filters

Not supported. Using fi, si, ti or i on the interaction list returns 400 Bad Request.

Filter by interaction type:

GET /interaction/list?search={"==":["interactionType","check-in"]}

Check-ins for a specific delegate:

GET /interaction/list?search={"and":[{"==":["interactionType","check-in"]},{"==":["firstDelegate",789]}]}

Interactions for a specific device:

GET /interaction/list?search={"==":["firstDevice",85]}

Multiple interactions by ID:

GET /interaction/list?search={"in":["id",[101,102,103]]}

Interactions involving a delegate whose name contains “smith”, in any slot:

GET /interaction/list?search={"*=":["anyDelegate","smith"]}

Check-ins recorded against a session, by the delegate’s type:

GET /interaction/list?search={"and":[{"==":["interactionType","check-in"]},{"==":["firstDelegate.delegateType","vip"]},{"==":["firstDevice.deviceType","session"]}]}

Interactions with no device in any slot:

GET /interaction/list?search={"empty":["anyDevice"]}

Interactions carrying a value in their unstructured data:

GET /interaction/list?search={"ud":["reason","==","late arrival"]}

POST /interaction/new/{interactionType}

Creates a new interaction.

See the list of Error Responses for more information, in particular error 1301, 1401, 1501, 1502, 1503.

Some examples for common interactions:

POST /interaction/new/check-in
POST /interaction/new/join
POST /interaction/new/lead
POST /interaction/new/print

Example request to check-in a delegate into a session:

POST /interaction/new/check-in
{
  "firstDelegate": 789,
  "firstDevice": 85,
  "recordedAt": 1696185089
}

Referencing delegates and devices by code

Instead of a numeric ID, any participant can be referenced by one of its unique identifiers using a key of the form {slot}Delegate_{codeType} or {slot}Device_{codeType}.

The slot is one of first, second or third. The code type is one of id, code, rfid, externalId, barcode, uhfId, publicId or slug.

For example, to check a delegate in by scanning their barcode, into a session referenced by its slug:

{
  "firstDelegate_barcode": "A1B2C3D4",
  "firstDevice_slug": "keynote-theatre",
  "recordedAt": 1696185089
}

If no delegate or device matches the supplied code, the request fails with the relevant not-found error (see Error Responses).

The same {slot}{Delegate|Device}_{codeType} keys are accepted by POST /interaction/test/{interactionType} and the batch endpoints.

Example response:

{
  "data": {
    "id": 89027,
    "_type": "interaction",
    "firstDelegate": {
      "id": 789,
      "_type": "delegate"
    },
    "firstDevice": {
      "id": 6,
      "_type": "device"
    },
    "interactionType": "check-in",
    "recordedAt": "2018-03-13T23:31:16+00:00",
    "createdAt": "2018-03-13T23:31:32+00:00",
    "updatedAt": "2018-03-13T23:31:32+00:00"
  },
  "meta": {}
}

POST /interaction/test/{interactionType}

Tests if creating an interaction with the given parameter would succeed or not. This can be used for example to validate tickets before using them.

See the list of Error Responses for more information, in particular error 1301, 1401, 1501, 1502, 1503.

Example request to check-in a delegate into a session:

POST /interaction/test/check-in
{
  "firstDelegate": 789,
  "firstDevice": 85,
  "recordedAt": 1696185089
}

Example response:

{
  "data": {
    "id": null,
    "_type": "interaction",
    "firstDelegate": {
      "id": 789,
      "_type": "delegate"
    },
    "firstDevice": {
      "id": 6,
      "_type": "device"
    },
    "interactionType": "check-in",
    "recordedAt": "2018-03-13T23:31:16+00:00",
    "createdAt": "2018-03-13T23:31:32+00:00",
    "updatedAt": "2018-03-13T23:31:32+00:00"
  },
  "meta": {}
}

Example of response in case of failure:

{
  "data": {},
  "meta": {
    "error": {
      "code": 412,
      "message": "Too many interactions",
      "internalCode": 740
    }
  }
}

DELETE /interaction/id:{id}

Delete the given interaction. Returns a no content response (status 204).

Example request to delete interaction 123:

POST /interaction/id:123

POST /interaction/batch

You can send a batch of interaction to this endpoint and they will be processed in order and a ordered collection of responses will be returned.

See the list of Error Responses for more information, in particular error 1301, 1401, 1501, 1502, 1503.

Example request:

POST /interaction/batch
{
  "interactions": {
    "a": {
      "firstDelegate": 1,
      "interactionType": "upload"
    },
    "b": {
      "firstDelegate": 3,
      "firstDevice": 123,
      "interactionType": "check-in"
    }
  },
  "sharedValues": {
    "upload": "iVBORw0KGgoAA[ ... more base64 encoded stuff ... ]oI5NwAAAABJRU5ErkJggg=="
  }
}