ContactPerson

URL

https://api.primaerp.com/v1/time/clients/{id}/contacts

Properties

Name Type Access Required Description
client Client read write no Provides info about client for which person works.
createdAt Date read only no Date of creation.
displayName String read only no Describes an object in human readable form.
email String read write no Contact person's e-mail address.
firstName String read write no Contact person's first name.
id String read write no Unique object identifier.
jobTitle String read write no Describes the job position held by a person.
lastName String read write no Contact person's last name.
phone String read write no Contact person's phone number.
trashItem TrashItem read write no Informs whether an object is in the trash. An object is in the trash if a trash item was specified.
updatedAt Date read only no Last modified date.
version Long read write no Object version number.

Metadata

{
    "type" : "ContactPerson",
    "path" : "/v1/time/clients/{id}/contacts",
    "fields" : [
        {
            "type" : "Client",
            "path" : "/v1/time/clients",
            "name" : "client",
            "description" : "Provides info about client for which person works.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "Date",
            "name" : "createdAt",
            "description" : "Date of creation.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "String",
            "name" : "displayName",
            "description" : "Describes an object in human readable form.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "String",
            "name" : "email",
            "description" : "Contact person's e-mail address.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "Email",
                    "details" : "regexp .*"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "firstName",
            "description" : "Contact person's first name.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "String",
            "name" : "id",
            "description" : "Unique object identifier.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "Pattern",
                    "details" : "regexp [0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}"
                },
                {
                    "type" : "NotNull"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "jobTitle",
            "description" : "Describes the job position held by a person.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "String",
            "name" : "lastName",
            "description" : "Contact person's last name.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "String",
            "name" : "phone",
            "description" : "Contact person's phone number.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "TrashItem",
            "path" : "/v1/trash",
            "name" : "trashItem",
            "description" : "Informs whether an object is in the trash. An object is in the trash if a trash item was specified.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "Date",
            "name" : "updatedAt",
            "description" : "Last modified date.",
            "access" : "READ_ONLY"
        },
        {
            "type" : "Long",
            "name" : "version",
            "description" : "Object version number.",
            "access" : "READ_WRITE"
        }
    ],
    "cascades" : [
        {
            "cascadeType" : "REMOVE",
            "objectTypes" : [
                "TrashItem"
            ]
        }
    ]
}

Dummy data

{
    "id" : "153f492a-86e9-41c5-a1a6-f27d5a0fbc9d",
    "createdAt" : "/Date(1489386494135)/",
    "updatedAt" : "/Date(1489416794135)/",
    "version" : 8,
    "firstName" : "Pedro",
    "lastName" : "Examplo",
    "email" : "pedro@example.com",
    "phone" : "66 234 555 678",
    "jobTitle" : "deputy director",
    "client" : {
        "id" : "8d240484-104a-4110-831d-2df987bc8250",
        "createdAt" : "/Date(1489385294135)/",
        "updatedAt" : "/Date(1489387994135)/",
        "version" : 7,
        "externalSystem" : {
            "id" : "e3592dd5-aea2-455e-9444-251ad9c17785",
            "createdAt" : "/Date(1489387934135)/",
            "updatedAt" : "/Date(1489441994135)/",
            "version" : 3,
            "name" : "Vendor system",
            "integrationPlugin" : "vendor",
            "displayName" : "Vendor system"
        },
        "externalResourceId" : "customer-996",
        "externalBrowsableUrl" : "http://www.vendor.com/customers/996",
        "externalSyncedAt" : "/Date(1489387994135)/",
        "externalSynced" : true,
        "name" : "Example Ltd.",
        "code" : "EXL",
        "email" : "info@example.com",
        "billsCount" : 2,
        "projectsCount" : 1,
        "streetAddress" : "Rua 123 Sul Avenida Lo 15",
        "additionalAddressInfo" : "",
        "zipCode" : "89020-000",
        "city" : "Palmas",
        "state" : "Tocantins",
        "countryCode" : "BRA",
        "phone" : "+66 987 654 321",
        "vatId" : "23.456.789/0001-77",
        "website" : "http://www.example.com/",
        "displayName" : "Example Ltd."
    },
    "displayName" : "Examplo Pedro"
}