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 | true |
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>
Custom fields for job type
Returns a list of all custom fields configured for a job type. This service provides additional configuration information pertaining to the custom field for this job
Method | Result |
---|---|
URI | https://[CompanyID].crittah.com/ws/apiv2/[json or xml]/customfields/jobtype/[IDJobType] |
GET | Returns custom fields |
Data fields
Field | Value type | Description | Example |
---|---|---|---|
IDCustomField | string | Unique identifier of the custom field | 7090fad1-c4da-4488-9ceb-55ee9847edcc |
Order | int | The order to display the custom field in | 2 |
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 |
AddsToVehicle | boolean | If the custom field is a number or a measure, this value defines if the measure or number is being added to the vehicle | true |
DecimalPlaces | int | Decimal places if type is numbe | 2 |
Manditory | boolean | Is the field mandatory | true |
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/jobtype/BD176BE9-8C1B-4CD3-9B54-5AD51B2DE3F4
JSON Rsponse:
[ { "IDCustomField": "d1caa07e-6867-4f1d-b54b-32c80e63a1b1", "Order": 1, "Name": "Box Weight", "Type": "Measurement", "Descr": "Weight of boxes.", "DefaultValue": "0", "AddsToVehicle": true, "DecimalPLaces": 0, "Manditory": true, "MinimumLength": 0, "Abbreviation": "BXS" }, { "IDCustomField": "63d53c06-964a-4b76-bc5f-e9ccad651dc3", "Order": 2, "Name": "Containers Required", "Type": "Yes-No", "Descr": "Containers Required", "DefaultValue": "0", "AddsToVehicle": true, "DecimalPLaces": 0, "Manditory": true, "MinimumLength": 0, "Abbreviation": "CNT" } ]
XML Response:
<?xml version="1.0" encoding="UTF-8"?> <ArrayOfCustomFieldDefMap xmlns="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <CustomFieldDefMap> <IDCustomField>d1caa07e-6867-4f1d-b54b-32c80e63a1b1</IDCustomField> <Order>1</Order> <Name>Box Weight</Name> <Type>Measurement</Type> <Descr>Weight of boxes.</Descr> <DefaultValue>0</DefaultValue> <AddsToVehicle>true</AddsToVehicle> <DecimalPLaces>0</DecimalPLaces> <Manditory>true</Manditory> <MinimumLength>0</MinimumLength> <Abbreviation>BXS</Abbreviation> </CustomFieldDefMap> <CustomFieldDefMap> <IDCustomField>63d53c06-964a-4b76-bc5f-e9ccad651dc3</IDCustomField> <Order>1</Order> <Name>Containers Required</Name> <Type>Yes-No</Type> <Descr>Containers Required</Descr> <DefaultValue>0</DefaultValue> <AddsToVehicle>true</AddsToVehicle> <DecimalPLaces>0</DecimalPLaces> <Manditory>true</Manditory> <MinimumLength>0</MinimumLength> <Abbreviation>CNT</Abbreviation> </CustomFieldDefMap> </ArrayOfCustomFieldDefMap>