POST /company/optionsets/@id/options
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 option set where to create a new option |
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 |
price_change | Int | Price change in cents. Positive for price increase, negative for discounts. |
order | Int | The options of a option set are sorted on the order property (descending). If you specify the same order for multiple option sets, the id of the option set is used. Setting the same order for all option sets is discouraged. |
code | String? | Optional. Nullable. Your own ID or key that you can associate with an option |
POST /company/optionsets/12/options HTTP/1.1
Host: api.bakeronline.be
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 145
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"price_change": 10,
"order": 16,
"code": "..."
}
Field | Type | Description |
---|---|---|
name | [Language: String] | Name of the option |
price_change | Int | Price change in cents. Positive for price increase, negative for discounts. |
id | Int | ID of this option |
code | String? | Nullable. Your own ID or key that you can associate with an option |
order | Int | The options of a option set are sorted on the order property (descending). If you specify the same order for multiple option sets, the id of the option set is used. Setting the same order for all option sets is discouraged. |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 159
{
"name": {
"nl": "...",
"en": "...",
"fr": "..."
},
"price_change": 19,
"id": 14,
"code": "...",
"order": 18
}