Skip to content

Order Cancellation

Request

This endpoint allows merchants to request order cancellation through the Keeta platform when they are unable to fulfill a customer's order.

Notes:

  1. The developers should only invoke this API when the merchant is unable to fulfill the order.
  2. Upon successful cancellation, the order status will be updated to "CANCELLED" in Keeta's system and Keeta will automatically initiate a full refund to the customer.
  3. This API does not support duplicate calls. If the order is already in a "CANCELLED" state, the system will return an error response.
  4. Merchants should confirm the necessity of cancellation before proceeding to avoid unnecessary losses.
Bodyapplication/jsonrequired
orderViewIdinteger, (int64)required

Unique identifier for orders on Keeta platform

Example:756823555555859
shopIdinteger, (int64)required

Unique identifier of the Keeta store

Example:466663
cancelCodeintegerrequired

This field represents the code value for the reason an order was canceled. Please send the corresponding cancellation reason code for the merchant's order cancellation in this field.

Enum ValueDescription
500000

indicates other unspecified reasons (requires cancelReason)

500001

indicates insufficient ingredients

500002

indicates store temporary closure

500003

indicates staff shortage

Example:500000
cancelReasonstring

This text field provides a detailed explanation for the cancellation when using the generic reason code (500000).

Example:"too expensive"
curl -i -X POST \
  https://open.mykeeta.com/api/open/order/cancel \
  -H 'Content-Type: application/json' \
  -d '{
    "orderViewId": 756823555555859,
    "shopId": 466663,
    "cancelCode": 500000,
    "cancelReason": "too expensive"
  }'

Responses

Request executed successfully

Bodyapplication/json
codeintegerrequired

A numeric status identifier indicating the result of the interface call, used to determine whether the operation executed successfully.

Enum ValueDescription
0

The request was executed successfully.

Non-zero value

The request execution failed. Specific error details can be viewed in the message field.

Example:0
messagestringrequired

Text description corresponding to the status code, explaining the operation result or error cause to users.

Example:"Success"
Response
{ "code": 0, "message": "Success" }