Saltar al contenido principal

Contrato histórico: GET get-extra-options

Contrato histórico de API. Esta página describe un contrato anterior. Los métodos, las rutas y las respuestas pueden diferir de la API vigente.

Significado histórico​

Obtener opciones de extras

Este endpoint de la API se utiliza para obtener todas las opciones de producto de un grupo de opciones de producto.

API vigente​

Para desarrollar una integración nueva, consulta la referencia o guía vigente enlazada.

Ver la referencia de la API vigente

Parámetros​

[
{
"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": "params",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "offset",
"in": "query",
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]

Cuerpo de solicitud​

null

Respuestas​

{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": [\n {\n \"id\": 63,\n \"extra_id\": 59,\n \"name\": \"<redacted-personal>\",\n \"conditioned\": false,\n \"respect_to\": null,\n \"min\": 1,\n \"max\": 1,\n \"rank\": 1,\n \"extra\": {\n \"id\": 59,\n \"business_id\": 0,\n \"name\": \"<redacted-personal>\",\n \"description\": null,\n \"enabled\": true\n },\n \"suboptions\": [\n {\n \"id\": 218,\n \"extra_option_id\": 63,\n \"name\": \"<redacted-personal>\",\n \"price\": 1,\n \"image\": null,\n \"sku\": null,\n \"rank\": 1\n },\n {\n \"id\": 219,\n \"extra_option_id\": 63,\n \"name\": \"<redacted-personal>\",\n \"price\": 5,\n \"image\": null,\n \"sku\": null,\n \"rank\": 1\n }\n ]\n }\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 63,
"default": 0
},
"extra_id": {
"type": "integer",
"example": 59,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"conditioned": {
"type": "boolean",
"example": false,
"default": true
},
"respect_to": {},
"min": {
"type": "integer",
"example": 1,
"default": 0
},
"max": {
"type": "integer",
"example": 1,
"default": 0
},
"rank": {
"type": "integer",
"example": 1,
"default": 0
},
"extra": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 59,
"default": 0
},
"business_id": {
"type": "integer",
"example": 0,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"description": {},
"enabled": {
"type": "boolean",
"example": true,
"default": true
}
}
},
"suboptions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 218,
"default": 0
},
"extra_option_id": {
"type": "integer",
"example": 63,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"price": {
"type": "integer",
"example": 1,
"default": 0
},
"image": {},
"sku": {},
"rank": {
"type": "integer",
"example": 1,
"default": 0
}
}
}
}
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": true,\n \"result\": [\n \"The options could not be obtained.\"\n ]\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": true,
"default": true
},
"result": {
"type": "array",
"items": {
"type": "string",
"example": "The options could not be obtained."
}
}
}
}
}
}
},
"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."
}
}
}
}
}
}
}
}