If you sent an invoice requesting a shipping address and the parameter *is\_flexible* was specified
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
Body
Required
-
Unique identifier for the query to be answered
-
Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
-
This object represents one shipping option.
-
Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
POST
/answerShippingQuery
curl \
-X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/answerShippingQuery \
-H "Content-Type: application/json" \
-d '{"shipping_query_id":"string","ok":true,"shipping_options":[{"id":"string","title":"string","prices":[{"label":"string","amount":42}]}],"error_message":"string"}'
Request example
{
"shipping_query_id": "string",
"ok": true,
"shipping_options": [
{
"id": "string",
"title": "string",
"prices": [
{
"label": "string",
"amount": 42
}
]
}
],
"error_message": "string"
}
Request examples
{
"shipping_query_id": "string",
"ok": true,
"shipping_options": [
{
"id": "string",
"title": "string",
"prices": [
{
"label": "string",
"amount": 42
}
]
}
],
"error_message": "string"
}
Response examples (default)
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
Response examples (default)
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
Response examples (200)
{
"ok": true,
"result": true
}
Response examples (200)
{
"ok": true,
"result": true
}