Tauhou API v4 (4.0.0 - Dilolo)

Download OpenAPI specification:

Contact Entity - Create

Creates a new contact entity.

While the contents of the details field are stored DynamoDB, they are still required to follow a strict structure as detailed in the request body schema. The exception to this is the custom subfield, which may contain any object with no further constraints.

Required Actions:

  • tauhou:contactEntity:create
Request Body schema: application/json
required
name
string
Default: ""
surname
string
Default: null
primaryContactName
string
Default: null
primaryContactSurname
string
Default: null
primaryAddress
string
Default: null
primaryEmail
string
Default: null
primaryPhone
string
Default: null
primaryMobile
string
Default: null
user
string
Default: null
archived
bool
Default: false
customField1
string
Default: null
customField2
string
Default: null
customField3
string
Default: null
object (ContactEntityDetails)

Responses

Request samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Response samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Contact Entity - Query

Lists existing contact entities.

Filter arguments are applied using SQL-style LIKE comparison.

The orderBy argument is directly injected into the underlying query as the Order By clause. Before being used, it is stripped of all text outside of column names and the keywords ASC and DESC.

Required Actions:

  • tauhou:contactEntity:get
  • tauhou:contactEntity:list
query Parameters
page
int

Zero-indexed page to return. Defaults to 0 if not supplied.

limit
int

Number of items per page. Defaults to 20 if not supplied.

details
bool
Example: details=true

Loads item details from DynamoDB

Request Body schema: application/json
required
name
string
surname
string
primaryContactName
string
primaryContactSurname
string
primaryAddress
string
primaryEmail
string
primaryPhone
string
primaryMobile
string
user
string
archived
bool
customField1
string
customField2
string
customField3
string
orderBy
string

This field orders the result using SQL-style order by syntax. This field is case insensitive, and is automatically stripped of any text that is not explicitly allowed (column names, ASC and DESC, commas).

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "surname": "string",
  • "primaryContactName": "string",
  • "primaryContactSurname": "string",
  • "primaryAddress": "string",
  • "primaryEmail": "string",
  • "primaryPhone": "string",
  • "primaryMobile": "string",
  • "user": "string",
  • "archived": false,
  • "customField1": "string",
  • "customField2": "string",
  • "customField3": "string",
  • "orderBy": "string"
}

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "maxAvailableItems": 1
}

Contact Entity - Update

Updates the given contact entity.

While the contents of the details field are stored DynamoDB, they are still required to follow a strict structure as detailed in the request body schema. The exception to this is the custom subfield, which may contain any object with no further constraints.

Required Actions:

  • tauhou:contactEntity:update
path Parameters
{contactentity}
required
string
Example: 530cbc05-f581-409f-9601-1594d080b3ba
Request Body schema: application/json
required
name
string
Default: ""
surname
string
Default: null
primaryContactName
string
Default: null
primaryContactSurname
string
Default: null
primaryAddress
string
Default: null
primaryEmail
string
Default: null
primaryPhone
string
Default: null
primaryMobile
string
Default: null
user
string
Default: null
archived
bool
Default: false
customField1
string
Default: null
customField2
string
Default: null
customField3
string
Default: null
object (ContactEntityDetails)

Responses

Request samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Response samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Contact Entity - Get

Gets the given contact entity.

Required Actions:

  • tauhou:contactEntity:get
path Parameters
{contactentity}
required
string
Example: 530cbc05-f581-409f-9601-1594d080b3ba
query Parameters
details
bool
Example: details=true

Loads item details from DynamoDB

Responses

Response samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Contact Entity - Create Self

Creates a new contact entity for the current user.

While the contents of the details field are stored DynamoDB, they are still required to follow a strict structure as detailed in the request body schema. The exception to this is the custom subfield, which may contain any object with no further constraints.

Contact entities are associated with users via the user field, which is always set from the authenticated identity and cannot be supplied or overridden by the caller. If a contact entity already exists for the current user, this action will be blocked.

Any value supplied in details.Admin is silently stripped; admin detail data cannot be set via this endpoint.

Request Body schema: application/json
required
name
string
Default: ""
surname
string
Default: null
primaryContactName
string
Default: null
primaryContactSurname
string
Default: null
primaryAddress
string
Default: null
primaryEmail
string
Default: null
primaryPhone
string
Default: null
primaryMobile
string
Default: null
user
string
Default: null
archived
bool
Default: false
customField1
string
Default: null
customField2
string
Default: null
customField3
string
Default: null
object (ContactEntityDetails)

Responses

Request samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Response samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Contact Entity - Update Self

Updates the contact entity for the current user.

While the contents of the details field are stored DynamoDB, they are still required to follow a strict structure as detailed in the request body schema. The exception to this is the custom subfield, which may contain any object with no further constraints.

Contact entities are associated with users via the user field, which is always overwritten with the authenticated user's identity regardless of the value supplied.

The details.Admin sub-field is preserved from the existing record and cannot be modified via this endpoint; any supplied value is silently ignored.

Request Body schema: application/json
required
name
string
Default: ""
surname
string
Default: null
primaryContactName
string
Default: null
primaryContactSurname
string
Default: null
primaryAddress
string
Default: null
primaryEmail
string
Default: null
primaryPhone
string
Default: null
primaryMobile
string
Default: null
user
string
Default: null
archived
bool
Default: false
customField1
string
Default: null
customField2
string
Default: null
customField3
string
Default: null
object (ContactEntityDetails)

Responses

Request samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Response samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}

Contact Entity - Get Self

Gets the contact entity for the current user.

Contact entities are associated with users via the user field.

The details.Admin sub-field is stripped from the response; callers via this endpoint never see admin-only detail data.

query Parameters
details
bool
Example: details=true

Loads item details from DynamoDB

Responses

Response samples

Content type
application/json
{
  • "ID": "79e7d6ca-7c78-4643-9528-ac9a2e75cfe6",
  • "Tenancy": "acme.org.nz.core",
  • "Name": "Test",
  • "Surname": "McTest",
  • "PrimaryEmail": "test@acme.org.nz",
  • "User": "test@acme.org.nz"
}