# Navarik Bridge API Data Types

There are JavaScript examples for each API call. All API objects are transmitted in JSON format, so any limitations of JSON types apply here. The object creation schema use a concise JavaScript format with the following field types.

# Primitive types

Type Description
string JSON-compatible string
text Large JSON-compatible string
int Integer
float Floating point number
boolean true or false
datetime ISO 8601 date and time, as a string
reference ID of another entity, a UUID string

# Catalog reference type

Catalog mapping functionality operates with the union type of either a catalog item reference or an object of following shape:

  name: string
  xref: string

# Entity Envelope Format

Bridge uses a generic data structure called Entity Envelope to represent id, data and meta-information about an individual business-object. This format is used by the majority of v2 APIs and provides following information about the entities.

Field Description Format Comment
id Globally unique entity ID UUID
version_id Entity version ID UUID A UUIDv5 hash of the entity content with its ID as the namespace. Comparing 2 entity version_id values alone can determine whether or not they represent the same version of the same entity.
previous_version_id ID of the previous version of the same entity UUID null if the entity has never changed.
last_action The action used to create this entity version "create" "update" "delete" null if the entity has never changed.
created_by User identity used to create the entity UUID Can refer to a user or a service account.
created_at Date and time of the entity creation datetime
modified_by User identity used to create the current version UUID Can refer to a user or a service account.
modified_at Date and time of the version creation datetime
type Entity type string The type defines the format of the entity's body according to the type schema.
schema The ID of the particular version of the type used to format this version of the entity UUID
body Business-object content object Formatted according to the schema.
meta Entity metadata object Optional system-controlled metadata.

# Response example

    "id": "ad27f47d-353c-45c9-bae7-ceff8bb35ba1",
    "version_id": "4a85acc9-305e-5b1b-9257-fa9b3422e9de",
    "previous_version_id": null,
    "last_action": "create",
    "created_by": "4afe1087-c307-4dfd-a85c-4849aad03a19",
    "created_at": "2022-04-14T18:07:34.431Z",
    "modified_by": "4afe1087-c307-4dfd-a85c-4849aad03a19",
    "modified_at": "2022-04-14T18:07:34.431Z",
    "type": "navarik.bridge.externalReference",
    "schema": "6683c2e2-f63a-5826-af14-fe72e0a64862",
    "body": {
        "workspace": "a2070b04-ca32-4a36-af58-c56e25715cb5",
        "ownerParty": "017950f1-7e14-44ae-b171-38b6903676d0",
        "name": "Galveston, TX",
        "xtype": "locations",
        "xref": "qsummary_Galveston, TX"
    "meta": {
        "sc": "83b8b4dc-581a-4a38-8e6a-b4a447dcf11c"