The API has four custom scalar types: Datetime, Date, Json, and DataUpload. The reference has a page for each one: Datetime, Date, Json, and DataUpload.
Datetime
A Datetime value is a date and a time in UTC. The API writes it with this format.
YYYY-MM-DDTHH:MM:SSZ
For example, 2026-06-15T14:30:00Z. The API drops fractions of a second in its output.
In a query argument, send the full date, the letter T, and the time. A date without a time is not valid. Send the time in UTC. End it with Z.
query RecentSessions($gatheringId: ID!) {
agendaSessions(
gatheringId: $gatheringId
filters: { createdAfter: "2026-06-01T00:00:00Z" }
) {
id
name
startsAt
}
}
Date
A Date value is a calendar date with this format.
YYYY-MM-DD
For example, 2026-06-15. A value with a time is not valid.
The createGathering and updateGathering mutations use Date for startsOn and endsOn. These two fields set the first day and the last day of an event (gathering in the schema, selected with gatheringId). The API uses Date only in input.
Json
A Json value is a JSON value of any shape. The API uses Json only in output. The field options of FieldDefinition is the only field with this type.
DataUpload
Use DataUpload in mutation input to send a file. The photo field of an attendee or a speaker takes a DataUpload.
You can send the file in one of two ways.
- As a
data:URI in a string. For example,data:image/png;base64,iVBORw0KGgo.... Use a standard MIME type, such asimage/jpegorimage/png. - As the name of a file part in a multipart request. Send the file in the same request.
mutation SetSpeakerPhoto($gatheringId: Int!, $speakerId: Int!, $photo: DataUpload) {
updateSpeaker(gatheringId: $gatheringId, id: $speakerId, speaker: { photo: $photo }) {
id
photo
}
}
{
"gatheringId": 123,
"speakerId": 501,
"photo": "data:image/png;base64,iVBORw0KGgo..."
}
You cannot read a DataUpload value. To read the photo of a speaker, use the photo field of the speaker.
The photoUrl field of an attendee returns the address that was sent in photoUrl.
Date filters
These list queries accept a filters argument: agendaSessions, attendeesConnection, exhibitors, gatherings, and infos. The filter type is AgendaSessionFilters, AttendeeFilters, ExhibitorFilters, GatheringFilters, or InfoFilters. Each type has the same four fields. All four fields are optional.
| Field | Type | Matches |
|---|---|---|
createdAfter |
Datetime |
Items created at or after this time. |
createdBefore |
Datetime |
Items created at or before this time. |
updatedAfter |
Datetime |
Items last changed at or after this time. |
updatedBefore |
Datetime |
Items last changed at or before this time. |
When you use more than one field, an item must match all of them.
query SessionsChangedInJune($gatheringId: ID!) {
agendaSessions(
gatheringId: $gatheringId
filters: { updatedAfter: "2026-06-01T00:00:00Z", updatedBefore: "2026-06-30T23:59:59Z" }
) {
id
name
updatedAt
}
}
This article is a copy of Scalars in the Touchpoint API documentation.
Comments
0 comments
Please sign in to leave a comment.