Company Fields
Here you can manage via API the fields data collected from your visitors
The Field Object
Attribute | Description |
*id | The id of the field. |
*type | The type of the field. It can be one value of:
[ |
name | The label displayed to the visitor. It's required if the type is |
required | It indicates if the field is required or not. Default |
sort | The order that this field will be visible to the visitor. Default: it will be added to the end |
options | An array of strings that is only used when the type is |
Endpoints
Get Fields
GET
https://api.w3lcome.com/v1/company/fields
This endpoint allows you to get the company fields
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Authentication | string | Basic |
Post Field
POST
https://api.w3lcome.com/v1/company/fields
Create a new field
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Authentication | string | Basic |
Request Body
Name | Type | Description |
---|---|---|
id | string | If not provided will be automatically generated |
type | string | The type of the field. See the list above |
name | string | The label name displayed to the visitor. Required when the type is |
required | boolean | Whether the field is required or not |
sort | number | It has to be a number greater than 0. If not provided it will be added to the end of the fields list |
options | array | An array of string. Required if the type is |
Update a field
PATCH
https://api.w3lcome.com/v1/company/fields/:id
Update a field
Path Parameters
Name | Type | Description |
---|---|---|
id | string | The field id |
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Authorization | string | Basic |
Request Body
Name | Type | Description |
---|---|---|
type | string | The type of the field |
name | string | The label name displayed to the visitor. Required when the type is |
required | boolean | Whether the field is required or not |
sort | number | It has to be a number greater than 0. If not provided it will be added to the end of the fields list |
options | array | An array of string. Required if the type is |
Delete a field
DELETE
https://api.w3lcome.com/v1/company/fields/:id
Delete a field
Path Parameters
Name | Type | Description |
---|---|---|
id | string | The field id |
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Authorization | string | Basic |
Table of errors
Method | Type |
| NOT_FOUND |
| INVALID_TYPE |
| MISSING_OPTIONS |
| MISSING_NAME |
| FIELD_ID_ALREADY_EXISTS |
| TYPE_ALREADY_USED |
| INTERNAL |
Last updated