inquireBenefitSync

POST /v1/marketing/benefit/sync/query

With this API call, an Independent Software Vendor (ISV) can inquire about the result of benefit synchronization.

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

benefitSyncRequestId

String

Yes

Indicates the unique ID assigned by the ISV to identify a request of benefit synchronization.

  • Maximum length: 64 characters
  • Characters not allowed: special characters such as @ # ?

Response parameters

Field

Data type

Required

Description

result

Result

Yes

Indicates the request result such as status and error codes.

syncStatus

String

No

Indicates the status of benefit synchronization. Valid values are:

  • PROCESSING: The benefit is synchronizing.
  • SUCCESS: The benefit has synchronized successfully.
  • FAIL: The benefit failed to synchronize.

syncFailCode

String

No

Indicates the error codes of benefit synchronization. Valid values are:

  • AUDIT_FAIL: Failed to pass our review.
  • INNER_PROCESS_FAIL: Failed to complete the internal processing.
  • SYNC_CLIENT_FAIL: Failed to synchronize to the super app.

Note: This field is required when the value of syncStatus is FAIL.

syncFailReason

String

No

Indicates the reason when the value of syncStatus is FAIL.

  • Maximum length: 256 characters
  • Characters not allowed: special characters such as @ # ?
  • Can be empty.

Result process logic

In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status:

Result Status

Description 

S

The inquiry is successful.

The corresponding result.resultCode is SUCCESS and the result.resultMessage is Success.

U

The status of the inquiry is unknown. 

The corresponding result.resultCode is UNKNOWN_EXCEPTION and result.resultMessage is "An API calling is failed, which is caused by unknown reasons.".For details, see the Common error codes section.

F

The inquiry is failed.

The corresponding result.resultCode and result.resultMessage are various based on different situations. For details, see the following Error codes section.

Error codes

Error codes are usually classified into the following categories:

  • Common error codes are common across all openAPIs for ISVs.
  • API-specific error codes are listed in the following table:

Error code

Result status

Error message

Further action

SYNC_REQUEST_ID_NOT_EXIST

F

The request ID of benefit synchronization does not exist.

Use a valid request ID.

Samples

Request

copy
{
    "benefitSyncRequestId": "20211111010101000001234"
}

Response

copy
{
    "result": {
        "resultStatus": "S",
        "resultCode": "",
        "resultMessage": ""
    },
    "syncStatus": "FAIL",
    "syncFailCode": "AUDIT_FAIL",
    "syncFailReason": "audit fail"
}