notifyBenefitSync

URL: https://www.isv.host:port/isv/provided/path/for/benefit/sync/notify

With this API call, our server can notify an Independent Software Vendor (ISV) of the result of benefit synchronization.

The message structure of this API is defined by us. When the ISV develops this API, follow the specifications below.

Note: If the ISV returns error codes not defined by us, we handle them as system errors.

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 @ # ?

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 code 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 why the value of syncStatus is FAIL.

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

Response parameters

Field

Data type

Required

Description

Example

success

Boolean

Yes

Indicates whether the ISV received the notification. By default, true means received.

"true"

resultCode

String

No

Indicates the result code.

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

Note: This field is required when the value of success is false.

-

resultMessage

String

No

Indicates the result messages that describe result codes in detail.

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

-

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
{
    "benefitIssueRequestId": "20211111010101000001234",
    "syncStatus": "FAIL",
    "syncFailCode": "AUDIT_FAIL",
    "syncFailReason": "audit fail"
}

Response

copy
{
    "success": true,
    "resultCode": "",
    "resultMessage": ""
}