Saltar al contenido principal

Contrato histórico: POST create-delivery-option

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​

Crear opción de entrega

Este endpoint de la API se utiliza para crear una opción de entrega

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": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
}
]

Cuerpo de solicitud​

{
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"delivery_type_id",
"enabled"
],
"properties": {
"name": {
"type": "string"
},
"delivery_type_id": {
"type": "integer",
"format": "int32"
},
"enabled": {
"type": "boolean"
}
}
}
}
}
}

Respuestas​

{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"name\": \"<redacted-personal>\",\n \"delivery_type_id\": 1,\n \"enabled\": false,\n \"updated_at\": \"2022-02-10 22:35:53\",\n \"created_at\": \"2022-02-10 22:35:53\",\n \"id\": 34\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"delivery_type_id": {
"type": "integer",
"example": 1,
"default": 0
},
"enabled": {
"type": "boolean",
"example": false,
"default": true
},
"updated_at": {
"type": "string",
"example": "2022-02-10 22:35:53"
},
"created_at": {
"type": "string",
"example": "2022-02-10 22:35:53"
},
"id": {
"type": "integer",
"example": 34,
"default": 0
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{}"
}
},
"schema": {
"type": "object",
"properties": {}
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"examples": {
"Result": {
"value": ""
}
}
}
}
}
}