inquireOrderDetail

POST /v2/pos/inquireOrderDetail

The inquireOrderDetail API is called by D-Store to inquire of the POS provider about the order details. This request is sent when the expected order notification is lost or delayed so as to ensure a normal transaction.

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Request parameters

Field

Data type

Required

Description

requestOrderId

String

Yes

The unique ID that is assigned by D-Store to identify an order.

Maximum length: 255 characters

Response parameters

Field

Data type

Required

Description

result

Result

Yes

The result of the order inquiry request.

posOrderId

String

Yes

The unique ID that is assigned by the POS provider to identify an order.

Maximum length: 255 characters

orderStatus

String

Yes

The latest order status. Refer to Order journey to specify this parameter properly. Valid values are:

  • For success-related statuses:
    • ORDER_SUCCESS: The POS provider creates the order successfully.
    • ACCEPTED: The merchant accepts the order.
    • PREPARING: The order is being prepared.
    • READY: The order is ready for the buyer to pick up or enjoy.
    • COMPLETED: The order is completed.
  • For issue-related statuses:
    • CANCELLED: The order is canceled.
    • REJECTED: The merchant rejects the order.
    • ORDER_FAIL: The order failed due to either of the following reasons:
      • System issues. For example, the POS provider fails to create the order.
      • Fulfillment exceptions. For example, the delivery driver fails to deliver the order.

extendInfo

Object

No

An extended attribute that is used to provide additional information if necessary.

Maximum length: 2048 characters

More information

How to return the result

The POS provider needs to return the result (specified in the result parameter) by following these instructions:

  • If the order inquiry succeeds, set the value of result.resultStatus to S and the value of result.resultCode to SUCCESS.
  • If the order inquiry fails, set the value of result.resultStatus to F and specify the value of result.resultCode according to the failure reason.
  • If system or network issues exist, set the value of result.resultStatus to U and the value of result.resultCode to UNKNOWN_EXCEPTION, and D-Store will retry the request.

For more information about how to define your result codes, see the Result codes section.

Result codes

Result code

Result status

Result message

SUCCESS

S

success

PROCESS_FAIL

F

A general business failure occurred. Do not retry.

PARAM_ILLEGAL

F

Parameter names or values do not meet the specified requirements. The result message can vary according to the specific error encountered.

INVALID_API

F

The called API is invalid or not active.

INVALID_SIGNATURE

F

Signature is invalid.

ACCESS_DENIED

F

Access is denied

REQUEST_TRAFFIC_EXCEED_LIMIT

F

The request traffic exceeds the limit.

UNKNOWN_EXCEPTION

U

An API calling is failed, which is caused by unknown reasons.

Samples

Request

The following sample shows that D-Store requests to obtain the order details:

copy
{
  "requestOrderId": "pds_2109xxxxxxxxxxxx_2022xxxxxxxxxxxxxxx_1"
}

Response

The following sample shows how to return a response when the order detail inquiry is successful:

copy
{
  "posOrderId": "2023063000010002",
  "orderStatus": "ACCEPTED",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success",
    "resultStatus": "S"
  }
}