Cancel an order in the partner's system

Cancels an order in the partner's system

Request

DELETE

/order/{orderId}

Path parameters

Name

Description

orderId

Type: string

Order identifier in the partner's system

Example: ``

Body

application/json
{
  "eatsId": "190330-12345678",
  "comment": "Client refusal"
}

Name

Description

eatsId

Type: string

End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDDDD

Example: 190330-12345678

comment

Type: string

Description of cancellation reasons (can be empty)

Example: Client refusal

Responses

200 OK

Order successfully canceled in the restaurant

400 Bad Request

Bad request. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]

ErrorItem

Name

Description

code

Type: integer

Error code agreed with Yandex

description

Type: string

Error message

Example: Description of error

Example
{
  "code": 100,
  "description": "Description of error"
}

401 Unauthorized

Authorization failed - the token expired or was not passed in the request. A retry will be made

Body

application/json
{
  "reason": "Access token has been expired. You should request a new one"
}

Name

Description

reason

Type: string

Reason for authorization failure

Example: Access token has been expired. You should request a new one

404 Not Found

The order was not found in the system. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]

500 Internal Server Error

Internal server errors. An array with an object from the error list is expected in the response body

Body

application/json
[
  {
    "code": 100,
    "description": "Description of error"
  }
]

Type: ErrorItem[]