Wiki

Clone wiki

API-2.0 / Get_custom_fields

API method DEPRECATED, please use Custom fields for booking instead


Method: GET

Path: /api/custom_fields

Return list of new booking custom fields.

Example response JSON

{"custom_fields":[{
  "id":29,
  "name":"custom_dropdown",
  "label":"custom dropdown",
  "ordering":0,
  "required":false,
  "control_type":"drop_down",
  "options":[{
    "order":0,"value":"1","label":"111"
  },{
    "order":0,"value":"2","label":"222"
  }],
  "default_value":""
},{
  "id":30,
  "name":"custom_radio",
  "label":"custom radio",
  "ordering":0,
  "required":false,
  "control_type":"radio_buttons",
  "options":[{
    "order":0,"value":"1","label":"111"
  },{
    "order":0,"value":"2","label":"222"
  }],
  "default_value":""
},{
  "id":28,
  "name":"custom_text",
  "label":"custom text",
  "ordering":0,
  "required":false,
  "control_type":"single_line",
  "options":[],
  "default_value":""
}]}

Example request:

For production, replace https://acme-sandbox.l27.co with https://<your subdomain>.launch27.com

curl -H "X-API-Key: test_8kBFkhmf8TA7TZyQBh" \
     -H "Content-Type: application/json" \
     -H "Accept: application/launch27.v2" \
     -X GET -k \
     https://acme-sandbox.l27.co/api/custom_fields

Updated