POST /company/companies/@id/optionsets
This endpoint requires authentication.
Header | Value |
---|---|
Authorization | Set the value to Bearer + + access_token |
Replace the @ keywords in the URL with their corresponding value.
A dictionary with fields
Field | Type | Description |
---|---|---|
id | Int | ID of the company where to create a new option set |
Pass the following properties via application/json or form encoding in the body of the request.
Field | Type | Description |
---|---|---|
name | [Language: String] | Name of the option set |
allow_attachment | Bool | Allow the attachment of a picture to this option set |
code | String? | Optional. Nullable. Your own ID or key that you can associate with an option set |
POST /company/companies/1318/optionsets HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer ba178ca2151b1912a7547a38d17b3d92d318acf0b263ed52e8cdd98130cde223f25e1410795ba82a81479e4249d74cf64e4e11b828ee84f7b20bbe5b74beed2dd671a8fdcf7dc7224c4ab5c58eebb538dd1b0422969e08cb03aa1bffb39994aa92ddb163
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 233
{
"name": {
"nl": "Wil je je brood gesneden hebben?",
"en": "Do you want your bread sliced?",
"fr": "Est ce que vous voulez votre pain coupé?"
},
"allow_attachment": false,
"code": "ID15896"
}
POST /company/companies/1318/optionsets HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer ba178ca2151b1912a7547a38d17b3d92d318acf0b263ed52e8cdd98130cde223f25e1410795ba82a81479e4249d74cf64e4e11b828ee84f7b20bbe5b74beed2dd671a8fdcf7dc7224c4ab5c58eebb538dd1b0422969e08cb03aa1bffb39994aa92ddb163
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 179
{
"name": {
"nl": "Wil je je brood gesneden hebben?",
"en": "Do you want your bread sliced?",
"fr": "Est ce que vous voulez votre pain coupé?"
}
}
POST /company/companies/1318/optionsets HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer ba178ca2151b1912a7547a38d17b3d92d318acf0b263ed52e8cdd98130cde223f25e1410795ba82a81479e4249d74cf64e4e11b828ee84f7b20bbe5b74beed2dd671a8fdcf7dc7224c4ab5c58eebb538dd1b0422969e08cb03aa1bffb39994aa92ddb163
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 33
{
"allow_attachment": false
}
Field | Type | Description |
---|---|---|
name | [Language: String] | Name of the option set |
allow_attachment | Bool | Allow the attachment of a picture to this option set |
options | [company.Option] | Array of company.Option |
id | Int | Id of the option set |
code | String? | Nullable. Your own ID or key that you can associate with an option set |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 268
{
"id": 3739,
"name": {
"nl": "Wil je je brood gesneden hebben?",
"fr": "Est ce que vous voulez votre pain coupé?",
"en": "Do you want your bread sliced?"
},
"allow_attachment": false,
"code": "ID15896",
"options": []
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 146
[
{
"code": "missing_field",
"message": "Field allow_attachment is required",
"field": "data.allow_attachment"
}
]
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 122
[
{
"code": "missing_field",
"message": "Field name is required",
"field": "data.name"
}
]