Data Types
One aim of the OpenTransact API and this documentation site is to have stable, consistent data types across all endpoints. This page documents the shared data types that are used throughout the OpenTransact API. You will find types specific to an endpoint in the endpoint's documentation.
Core Types
| Type | Notes |
|---|---|
| Integer | Any integer value. |
| String | Any string value |
| Object | An object. Keys will always be strings within the OpenTransact API. Values will always be another valid data type. |
| UUID | A string value which is a valid UUID. UUID fields are typically referring to the IDs of other objects in the system. See more about UUID's |
| Boolean | A boolean value. |
| Timestamp | A timestamp value in UTC timezone and ISO-8601 format. |
Examples
{
"integer": 32,
"string": "Hello, World!",
"object": { "name": "John", "age": 30 },
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"boolean": true,
"timestamp": "2024-02-29T12:00:00Z"
}
Relationship Types
AddressRelationship
Example AddressRelationship
{
"data": {
...
},
"relationships": {
"address": {
"data": {
"type": "addresses",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}
ApplicationRelationship
ApplicationRelationship represents a link to an Application
| Key | Value | |
|---|---|---|
| type | applications | Required |
| id | UUID | Required |
Example ApplicationRelationship
{
"data": {
...
},
"relationships": {
"application": {
"data": {
"type": "applications",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}
AchBatchEntryRelationship
AchBatchEntryRelationship represents a link to an ACH Batch Entry
| Key | Value | |
|---|---|---|
| type | ach-batch-entries | Required |
| id | UUID | Required |
Example AchBatchEntryRelationship
{
"data": {
...
},
"relationships": {
"ach-batch-entry": {
"data": {
"type": "ach-batch-entries",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}
EmailAddressRelationship
EmailAddressRelationship represents a link to an EmailAddress
| Key | Value | |
|---|---|---|
| type | email-addresses | Required |
| id | UUID | Required |
Example EmailAddressRelationship
{
"data": {
...
},
"relationships": {
"default-email-address": [{
"data": {
"type": "email-addresses",
"id": "123e4567-e89b-12d3-a456-426614174000"
},
...
}]
}
}
PhoneNumberRelationship
PhoneNumberRelationship represents a link to a PhoneNumber
| Key | Value | |
|---|---|---|
| type | phone-numbers | Required |
| id | UUID | Required |
Example PhoneNumberRelationship
{
"data": {
...
},
"relationships": {
"default-phone-number": {
"data": {
"type": "phone-numbers",
"id": "123e4567-e89b-12d3-a456-426614174000"
},
...
}
}
}
RoleRelationship
Example RoleRelationship
{
"data": {
...
},
"relationships": {
"roles": {
"data": [{
"type": "roles",
"id": "123e4567-e89b-12d3-a456-426614174000"
},
...
]
}
}
}
SubjectRelationship
SubjectRelationship represents a link to another object in the system which is the subject of an Activity
| Key | Value | Notes | |
|---|---|---|---|
| type | String | must be valid object type, lowercase, plural | Required |
| id | UUID | Required |
Example SubjectRelationship
{
"data": {
...
},
"relationships": {
"subject": {
"data": {
"type": "transactions",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}
AuthorRelationship
AuthorRelationship represents a link to another object in the system which is the author of an Activity
| Key | Value | Notes | |
|---|---|---|---|
| type | String | must be valid object type, lowercase, plural | Required |
| id | UUID | Required |
Example AuthorRelationship
{
"data": {
...
},
"relationships": {
"author": {
"data": {
"type": "rules",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
ProfileRelationship
Example ProfileRelationship
{
"data": {
...
},
"relationships": {
"profile": {
"data": {
"type": "profiles",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}
AccountRelationship
Example AccountRelationship
{
"data": {
...
},
"relationships": {
"account": {
"data": {
"type": "accounts",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}
SourceRelationship
SourceRelationship represents a link to a Source
| Key | Value | Notes | |
|---|---|---|---|
| type | String | must be valid object type, lowercase, plural | Required |
| id | UUID | Required |
Example SourceRelationship
{
"data": {
...
},
"relationships": {
"source": {
"data": {
"type": "sources",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}
TransactionRelationship
TransactionRelationship represents a link to a Transaction
| Key | Value | Notes |
|---|---|---|
| type | transactions | Required |
| id | UUID | Required |
Example TransactionRelationship
{
"data": {
...
},
"relationships": {
"transaction": {
"data": {
"type": "transactions",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
}
}