Skip to main content

Historical contract: Edit Extras SubOption

Historical API contract. This page describes an earlier API contract. Methods, paths, and responses may differ from the current API.

Historical meaning​

Edit Extras SubOption

This API endpoint is used to edit a product option choice.

Current API​

For new integrations, use the linked current API reference or guide.

View the current API reference

Parameters​

[
{
"name": "version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
},
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "business_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "extra_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "option_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "suboption_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]

Request body​

{
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"price": {
"type": "number",
"format": "float"
},
"image": {
"type": "string",
"format": "binary"
},
"sku": {
"type": "string"
},
"rank": {
"type": "integer",
"format": "int32"
},
"description": {
"type": "string"
},
"max": {
"type": "integer",
"format": "int32"
},
"half_price": {
"type": "number",
"format": "float"
},
"enabled": {
"type": "boolean"
}
}
}
}
}
}

Responses​

{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"id\": 172,\n \"extra_option_id\": \"53\",\n \"name\": \"<redacted-personal>\",\n \"price\": 1,\n \"half_price\": 1.5,\n \"max\": 5,\n \"image\": null,\n \"sku\": null,\n \"rank\": 1,\n \"created_at\": \"2018-10-06 18:18:25\",\n \"updated_at\": \"2018-10-06 18:18:25\",\n \"deleted_at\": null\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 172,
"default": 0
},
"extra_option_id": {
"type": "string",
"example": "53"
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"price": {
"type": "integer",
"example": 1,
"default": 0
},
"half_price": {
"type": "number",
"example": 1.5,
"default": 0
},
"max": {
"type": "integer",
"example": 5,
"default": 0
},
"image": {},
"sku": {},
"rank": {
"type": "integer",
"example": 1,
"default": 0
},
"created_at": {
"type": "string",
"example": "2018-10-06 18:18:25"
},
"updated_at": {
"type": "string",
"example": "2018-10-06 18:18:25"
},
"deleted_at": {}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"The selected Extra option is invalid.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "The selected Extra option is invalid."
}
}
}
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"You do not have permission.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "You do not have permission."
}
}
}
}
}
}
}
}