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

TypeNotes
IntegerAny integer value.
StringAny string value
ObjectAn object. Keys will always be strings within the OpenTransact API. Values will always be another valid data type.
UUIDA 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
BooleanA boolean value.
TimestampA 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

AddressRelationship represents a link to an Address

KeyValue
typeaddresses
Required
idUUID
Required

Example AddressRelationship

{
  "data": {
    ...
  },
  "relationships": {
    "address": {
      "data": {
        "type": "addresses",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
  }
}

ApplicationRelationship

ApplicationRelationship represents a link to an Application

KeyValue
typeapplications
Required
idUUID
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

KeyValue
typeach-batch-entries
Required
idUUID
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

KeyValue
typeemail-addresses
Required
idUUID
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

KeyValue
typephone-numbers
Required
idUUID
Required

Example PhoneNumberRelationship

{
  "data": {
    ...
  },
  "relationships": {
    "default-phone-number": {
      "data": {
        "type": "phone-numbers",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      },
      ...
    }
  }
}

RoleRelationship

RoleRelationship represents a link to a Role

KeyValue
typeroles
Required
idUUID
Required

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

KeyValueNotes
typeStringmust be valid object type, lowercase, plural
Required
idUUID
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

KeyValueNotes
typeStringmust be valid object type, lowercase, plural
Required
idUUID
Required

Example AuthorRelationship

{
  "data": {
    ...
  },
  "relationships": {
    "author": {
      "data": {
        "type": "rules",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
}

ProfileRelationship

ProfileRelationship represents a link to a Profile

KeyValueNotes
typeprofiles
Required
idUUID
Required

Example ProfileRelationship

{
  "data": {
    ...
  },
  "relationships": {
    "profile": {
      "data": {
        "type": "profiles",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
  }
}

AccountRelationship

AccountRelationship represents a link to an Account

KeyValue
typeaccounts
Required
idUUID
Required

Example AccountRelationship

{
  "data": {
    ...
  },
  "relationships": {
    "account": {
      "data": {
        "type": "accounts",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
  }
}

SourceRelationship

SourceRelationship represents a link to a Source

KeyValueNotes
typeStringmust be valid object type, lowercase, plural
Required
idUUID
Required

Example SourceRelationship

{
  "data": {
    ...
  },
  "relationships": {
    "source": {
      "data": {
        "type": "sources",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
  }
}

TransactionRelationship

TransactionRelationship represents a link to a Transaction

KeyValueNotes
typetransactions
Required
idUUID
Required

Example TransactionRelationship

{
  "data": {
    ...
  },
  "relationships": {
    "transaction": {
      "data": {
        "type": "transactions",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
  }
}

Was this page helpful?