Creates a custom field template.
Endpoint URL
https://{{base_url}}/api/v2/custom-field-template
Authentication and rate limits
Item | Details |
---|---|
Authentication method | OAuth 2.0 Bearer token |
Rate limit | Rate Limit |
Requests Example
curl --request POST \
--url 'https://{{base_url}}/api/v2/custom-field-template \
--header 'Authorization: Bearer $BEARER_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '$JSON'
Request Syntax
{
"company": integer,
"name": "string",
"type": "asset" | "contract" | "supplier",
"fields": [
{
"name": "string",
"data_type": "date" | "money" | "number" | "text"
},
]
}
Body Parameters
- company (integer) --
[REQUIRED]
The ID of the specific company your API is calling. For accounts with only one company, the default value is1
.
To lookup a specific company ID, see the List Company API. - name (string) --
[REQUIRED]
The name of the custom field template.
Max characters =50
The name of the custom field template must be unique per the type of the custom field template. - type (string) --
[REQUIRED]
The type of the custom field template.
Options:asset
|contract
|supplier
- fields (list) --
[REQUIRED] at least one custom field must be added
- name (string) --
[REQUIRED]
The name of the custom field.
Max characters =50
The name of the custom field must be unique per the custom field template. - data_type (string) --
[REQUIRED]
The data type of the custom field.
Options:date
|money
|number
|text
- name (string) --
Response Syntax
{
"id": integer,
"name": "string",
"is_active": true|false,
"type": "asset" | "contract" | "supplier",
"fields": [
{
"id": integer,
"name": "string",
"data_type": "date" | "money" | "number" | "text",
"is_active": true|false,
"order": integer
},
]
}