post https://developer-api.bringg.com/partner_api/companies//form
Configure a form
The Configure Form endpoint creates a structure of form, which the driver can fill on site. the definition of any field is:
parameter | type | Description |
---|---|---|
key | String | name of field |
label | String | display label |
type | Number | value type: 0 - NUMBER 1 - TEXT 2 - BOOLEAN 3 - LIST |
control | Number | UI control 0 - INPUT 1 - CHECKBOX 2 - SWITCH 3 - RADIO 4 - DROPDOWN |
mandatory | Boolean | define if the field is required |
defaultValue | Object | default value of field |
list_values | Array | list of options (only for type LIST) |
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{ \"title\": \"Form Title\", \"button_label\": \"Form Button Label\", \"enabled\": true, \"fields\": \"{\"key\":\"tow\",\"label\":\"Tow\",\"type\":2,\"control\":2},{\"key\":\"3\",\"label\":\"Windscreen wiper\",\"type\":2,\"control\":2},{\"key\":\"4\",\"label\":\"Scented tree\",\"type\":2,\"control\":2},{\"key\":\"price\",\"label\":\"Price\",\"type\":0,\"control\":0},{\"key\":\"description\",\"label\":\"Description\",\"type\":1,\"control\":0}]\", \"timestamp\":\"1414421210832\", \"access_token\":\"K2Pxkwvx6-3PtW44zvEV\", \"signature\":\"db00061fa75f869c968f72d48449e457ae06959a\"}" \
https://api.bringg.com/partner_api/companies/{id}/form