Relation

URL

https://api.primaerp.com/v1/relations

https://api.primaerp.com/v1/time/timerecords/{id}/relations

https://api.primaerp.com/v1/time/timerecords/{id}/relations/@inbound

https://api.primaerp.com/v1/time/timerecords/{id}/relations/@outbound

https://api.primaerp.com/v1/billing/bills/{billId}/items/{id}/relations

https://api.primaerp.com/v1/billing/bills/{billId}/items/{id}/relations/@inbound

https://api.primaerp.com/v1/billing/bills/{billId}/items/{id}/relations/@outbound

Properties

Name Type Access Required Description
createdAt Date read only no Date of creation.
displayName String read only no Describes an object in human readable form.
id String read write no Unique object identifier.
inboundId String read write no Unique id of inbound side object.
inboundType String read write no Inbound bean type. Lowercase simple class name.
outboundId String read write no Unique id of outbound side object.
outboundType String read write no Outbound bean type. Lowercase simple class name.
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" : "Relation",
    "path" : "/v1/relations",
    "fields" : [
        {
            "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" : "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" : "inboundId",
            "description" : "Unique id of inbound side object.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "Pattern",
                    "details" : "regexp [0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "inboundType",
            "description" : "Inbound bean type. Lowercase simple class name.",
            "access" : "READ_WRITE"
        },
        {
            "type" : "String",
            "name" : "outboundId",
            "description" : "Unique id of outbound side object.",
            "access" : "READ_WRITE",
            "constraints" : [
                {
                    "type" : "Pattern",
                    "details" : "regexp [0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}"
                }
            ]
        },
        {
            "type" : "String",
            "name" : "outboundType",
            "description" : "Outbound bean type. Lowercase simple class name.",
            "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" : "d78b7cfb-2a05-45a5-a4d2-5237d8777963",
    "createdAt" : "/Date(1489384455037)/",
    "updatedAt" : "/Date(1489452795038)/",
    "version" : 1,
    "inboundId" : "d648831f-5795-4b93-9f36-abeb25180ba6",
    "inboundType" : "user",
    "outboundId" : "107ae876-afe1-4309-9110-74adf56b0d44",
    "outboundType" : "timerecord",
    "displayName" : "user d648831f-5795-4b93-9f36-abeb25180ba6 -> timerecord 107ae876-afe1-4309-9110-74adf56b0d44"
}