Custom fields
Get Fields
- Endpoint:
GET /fields
Name | Type | Comment |
---|---|---|
id | int | ID of the field |
resource | string | property , lead , landlord , user , transaction |
name | string | Name that will be display in MyCRM |
description | string | Text that will be display in MyCRM in the tooltip |
type | string | The constraint of the field text , number , date , email , phone , boolean , URL |
mandatory | boolean | If the field will be mandatory while creating / editing the resource |
restricted | boolean | If the field will be part of the full / partial view. Not available for user/transaction |
- Allowed for:
Everyone.
- Filters:
Name | Type | Comment |
---|---|---|
resource | string | property , lead , landlord , user , transaction |
is_mandatory | boolean | Filter custom fields by mandatory value |
The filter resource
is mandatory.
Create Field
- Endpoint:
POST /fields
- Allowed for:
Admins only.
Curl example :
$ curl -X GET http://api-v2.mycrm.com/fields
- JSON request example:
{
"field" : {
"resource": "property",
"name": "Bedroom view",
"description": "View from the bedroom",
"type": "text",
"mandatory": true,
"restricted": true,
}
}
If resource is user or transaction then dont send restricted field as there is no partial access acl for these two entities
- JSON response example:
{
"field" : {
"id": 1,
"resource": "property",
"name": "Bedroom view",
"description": "View from the bedroom",
"type": "text",
"mandatory": true,
"restricted": true,
}
}
Update Field
- Endpoint:
PUT /fields/{id}
- Allowed for:
Admins only.
- Available parameters:
Name | Type | Comment |
---|---|---|
name | string | Name that will be display in MyCRM |
description | string | Text that will be display in MyCRM in the tooltip |
mandatory | boolean | If the field will be mandatory while creating / editing the resource |
restricted | boolean | If the field will be part of the full / partial view. Not available for user/transaction |
Delete Field
- Endpoint:
DELETE /fields/{id}
- Allowed for:
Admins only.