/v2/pds/console/inquireOperatorInfo

POST /v2/pds/console/inquireOperatorInfo

When the operator logs in to Alipay+ D-store Platform and tries to use the capabilities that are provided by the SaaS, the SaaS calls this API to inquire about the operator information for user authentication.

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

Example

loginToken

String

Yes

The login token that can be used to access the user resource scope. When this API is called, Mini Program Platform verifies the value of this parameter with clientId to ensure that the operator is authorized by the merchant.

Response parameters

Field

Data type

Required

Description

Example

result

Result

Yes

Indicates the request result, such as status and error codes.

{

"resultCode": "SUCCESS",

"resultStatus": "S",

"resultMessage": "success"

}

operator

Operator

No

Indicates the operator information, including the operator ID, the operator name, and the operator's roles and permissions.

This parameter must be returned when the request is successful, that is, when the value of result.resultStatus is S.

{

"operatorId": "2102****",

"operatorName": "J**k"

"status": "ACTIVE",

"merchantId": "2188120004706924",

"platformId": "GCASH",

"roles": [{

"roleCode": "ADMIN",

"permissions": [

"P_CREATE_ORDER",

"P_UPDATE_ORDER"

]

}]

}

Result process logic

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

Result status

Description 

S

The request to send a verification code is successful.

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

A

The request is accepted by wallets.

U

The status of the request to send a verification code is unknown. 

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

F

The request to send a verification code failed.

The corresponding values of result.resultCode and result.resultMessage can vary 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 for all mini program OpenAPIs in V2.  
  • API-specific error codes are listed in the following table.

Error code

Result status

Error message

Further action

EXPIRED_LOGIN_TOKEN

F

The login token is expired.

Ask for a refreshed login token and call this API again.

Sample

Request

copy
{
  "loginToken":"PDS_MERCHANT1af3f8e7-258f-4767-b962-c57f0d9c9098"
}

Response

copy
{
    "result": {
        "resultCode": "SUCCESS",
        "resultStatus": "S",
        "resultMessage": "success"
    },
    "operator": {
    "operatorId": "2102xxxxxxxx",
    "operatorName": "J**k",
    "status": "ACTIVE",
    "platformId": "GCASH",
    "merchantId": "2188120004706924",
    "roles": [
      {
        "roleCode": "ADMIN",
        "permissions": [
          "P_CREATE_ORDER",
          "P_UPDATE_ORDER"
        ]
      }
    ]
  }
}