shop.settings.getContactFields

Returns contact fields from multi-step checkout settings.

Parameters

  • customer_fields GET Optional

    Flag requiring to return only contact fields enabled in checkout settings, if a non-empty value is specified. Otherwise, all contact fields available in checkout settings are returned.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Return value

Array with a single item with the fields key, containing a list of contact fields. The sub-array of each field contains values with the following keys:

  • fields[]['id'] string Field ID.
  • fields[]['input_height'] int Text input or textarea field height expressed in rows.
  • fields[]['multi'] bool Flag denoting the possibility to enter multiple field values.
  • fields[]['name'] string Field name.
  • fields[]['required'] bool Flag denoting mandatory field value input or selection.
  • fields[]['type'] string Field type.
  • fields[]['ext'] array List of auxiliary types available for selection for each field value.
  • fields[]['options'] array List of available field values where array keys are programmatic field names and array values are fields’ text captions.
  • fields[]['oOrder'] array List of the options field array’s keys sorted in the order in which those values must be displayed in the user interface.
  • fields[]['defaultOption'] string A default value for a field allowing value selection from an available list.
  • fields[]['fields'] array For the Address field — list of simple fields of which this complex field consists. Array keys are field IDs, array values are sub-arrays with the same keys as the main fields array returned by this method.

Example

https://demo1.webasyst.com/api.php/shop.settings.getContactFields?