Department
URL
https://api.primaerp.com/v1/departments
https://api.primaerp.com/v1/departments/@member
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. |
manager |
User |
read write |
no |
The user who is the manager of the department. |
name |
String |
read write |
no |
The department 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. |
{
"type" : "Department",
"path" : "/v1/departments",
"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" : "User",
"path" : "/v1/users",
"name" : "manager",
"description" : "The user who is the manager of the department.",
"access" : "READ_WRITE"
},
{
"type" : "String",
"name" : "name",
"description" : "The department 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",
"DepartmentMember"
]
}
]
}
Dummy data
{
"id" : "0fb8409d-22b9-4f67-9c1c-761e6df539c8",
"createdAt" : "/Date(1489386675348)/",
"updatedAt" : "/Date(1489387995348)/",
"version" : 9,
"name" : "Development",
"manager" : {
"id" : "fcb904c5-5aa5-4946-a11c-e0a67f88b423",
"createdAt" : "/Date(1489385475348)/",
"updatedAt" : "/Date(1489463595348)/",
"version" : 2,
"firstName" : "John",
"lastName" : "Smith",
"nickName" : "Smith, J.",
"email" : "john.smith@example.com",
"phone" : "55 123 444 567",
"position" : "Chief developer",
"timeZone" : "America/Sao_Paulo",
"dateFormat" : "dd/MM/yyyy",
"timeFormat" : "K:mm a",
"weekStart" : 7,
"language" : "en_US",
"password" : "",
"secretKey" : "userSecretKey",
"confirmed" : false,
"confirmedEmail" : false,
"active" : false,
"birthdayRemind" : "/Date(1490223600000)/",
"workingTimeStart" : "/Date(1489388400000)/",
"workingTimeEnd" : "/Date(1489420800000)/",
"created" : "/Date(1489301595348)/",
"admin" : false,
"projectManager" : false,
"displayName" : "Smith John"
},
"displayName" : "Development"
}