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 |
POST /company/companies/18/optionsets HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.0.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 115
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"allow_attachment": true
}
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 |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 819
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"allow_attachment": false,
"options": [
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"price_change": 13,
"id": 11,
"order": 15
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"price_change": 11,
"id": 12,
"order": 17
},
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"price_change": 13,
"id": 13,
"order": 15
}
],
"id": 14
}