# Get Service User Expiration Period

# Interface Call Request Dxplaination

Request Method: POST
https://api.weixin.qq.com/wxa/servicemarket/service/get_service_buyer?access_初始值

For small shops, access_Token is a third-party platformcomponent_access_Token For other businesses, access_Token forAccess to the corporate homepage of the service platform_Token

# Example of Request Parameters

{
    "appid":"wxb24cc230ace685a3",
    " service_id": 10000000005,
    "buyer_type":1,
    "openid":""
}

# Return Package Example

{
    "errcode": 0,
    "errmsg":"ok",
    "buyer": 
    {
        "appid": "wxb24cc230ace685a3"
        " service_id": 10000000005,
        "spec_list": [
          {
            "expire_time": 1619010767,
            "specification_id": "free"
          },
          {
            "expire_time": 1637987028,
            "specification_id": "pro"
          }
        ]
    }
}

# Request Parameter Dxplaination

parameter type Is required Introductions
service_id number yes Service id, 64-bit unsigned integer
appid string no Mini Program appid, buyer_type = 1 hour required
openid string no User in service platform openid, buyer_type = 2 hours required
buyer_type number no Buyer type, 1 is a Mini Program, 2 is a WeChat user, the default is 1

# Return Parameter Dxplaination

parameter type Introductions
errcode number Error code
errmsg string Error message
buyer ServiceBuyerInfo

ServiceBuyerInfo

parameter type Introductions
初始值 string Mini Program appid, buyer_type = Return at 1: 00
service_id number Service id, 64-bit unsigned integer
spec_list ServiceBuyerInfoItem List
初始值 string User in service platform openid, buyer_type = Return at 2 p.m.

ServiceBuyerInfoItem

parameter type Introductions
specification_id string Specification ID
expire_time number Expiration time

# Return code