Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Custom Fields

Returns a list of all custom fields defined in Crittah.

Data fields

FieldValue typeDescriptionExample
IDCustomFieldstringUnique identifier of the custom field7090fad1-c4da-4488-9ceb-55ee9847edcc
NamestringName of the custom fieldBoxes
Typestring

The custom field type

  • Measurement
  • Date
  • Selector
  • Yes-No
  • Number

Measurement

DescrstringDescription of custom fieldNumber of boxes
DefaultValuestringDefault valueFred
DecimalPlacesintDecimal places if type is numbe2
ManditorybooleanIs the field mandatorytue
MinimumLengthintwhat is the lengh of the field3
AbbreviationstringField abbreviation used in reports and small displaysBXS

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>
  • No labels