Custom Fields
Returns a list of all custom fields defined in Crittah.
Method | Result |
---|---|
URI | https://[CompanyID].crittah.com/ws/apiv2/[json or xml]/customfields |
GET | Returns custom fields |
Data fields
Field | Value type | Description | Example |
---|---|---|---|
IDCustomField | string | Unique identifier of the custom field | 7090fad1-c4da-4488-9ceb-55ee9847edcc |
Name | string | Name of the custom field | Boxes |
Type | string | The custom field type
| Measurement |
Descr | string | Description of custom field | Number of boxes |
DefaultValue | string | Default value | Fred |
DecimalPlaces | int | Decimal places if type is numbe | 2 |
Manditory | boolean | Is the field mandatory | tue |
MinimumLength | int | what is the lengh of the field | 3 |
Abbreviation | string | Field abbreviation used in reports and small displays | BXS |
Get custom fields
get all custom fields.
Sample cURL call:
curl -H "Content-Type: application/json" \ -H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \ -H "Api-Username: jsmith" \ -H "API-Password: abc123" \ http://[CompanyID].crittah.com/ws/apiv2/json/customfields
JSON Rsponse:
[ { "IDCustomField": "d1caa07e-6867-4f1d-b54b-32c80e63a1b1", "Name": "Box Weight", "Type": "Measurement", "Descr": "Weight of boxes.", "DefaultValue": "0", "DecimalPLaces": 0, "Manditory": true, "MinimumLength": 0, "Abbreviation": "BXS" }, { "IDCustomField": "63d53c06-964a-4b76-bc5f-e9ccad651dc3", "Name": "Containers Required", "Type": "Yes-No", "Descr": "Containers Required", "DefaultValue": "0", "DecimalPLaces": 0, "Manditory": true, "MinimumLength": 0, "Abbreviation": "CNT" } ]
XML Response:
<?xml version="1.0" encoding="UTF-8"?> <ArrayOfCustomFieldDefObj xmlns="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <CustomFieldDefObj> <IDCustomField>d1caa07e-6867-4f1d-b54b-32c80e63a1b1</IDCustomField> <Name>Box Weight</Name> <Type>Measurement</Type> <Descr>Weight of boxes.</Descr> <DefaultValue>0</DefaultValue> <DecimalPLaces>0</DecimalPLaces> <Manditory>true</Manditory> <MinimumLength>0</MinimumLength> <Abbreviation>BXS</Abbreviation> </CustomFieldDefObj> <CustomFieldDefObj> <IDCustomField>63d53c06-964a-4b76-bc5f-e9ccad651dc3</IDCustomField> <Name>Containers Required</Name> <Type>Yes-No</Type> <Descr>Containers Required</Descr> <DefaultValue>0</DefaultValue> <DecimalPLaces>0</DecimalPLaces> <Manditory>true</Manditory> <MinimumLength>0</MinimumLength> <Abbreviation>CNT</Abbreviation> </CustomFieldDefObj> </ArrayOfCustomFieldDefObj>