跳转至

单条发送

提醒用户待支付订单

HTTP请求

POST /v1/whatsapp/message/send

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Request Body
{
    "customerName": "Austin Bu",    
    "phone": "11987654321",  
    "countryCallingCode": "+55",  
    "messageType": "PAYMENT_REMINDER", 
    "countryCode": "BR",
    "orderInfo": {
        "productTitle": "Vacuum",      
        "orderId": "13490123",  
        "amountInCents": 100,   
        "currency": "BRL",
        "link": "https://www.liquido.com",
        "productImgList": [
            "https://static.wikia.nocookie.net/c__/images/6/6b/Quote.jpg/revision/latest?cb=20110107214657&path-prefix=cavestory"
        ]
    },
    "shippingInfo": {
        "shippingAddress": "340 E Middlefield Blvd, MTV, CA, 94043", 
        "trackingNumber": "1231242151",
        "transportCompany": "Fedex",
        "trackingLink":"https://www.fedex.com/fedextrack/?trknbr=1"
    }, 
    "paymentInfo": {
        "createTime": "2022-04-28 10:00:00",
        "paymentId": "159265", 
        "paymentMethod" : "PIX_DYNAMIC_QR",
        "vendor": "LIQUIDO"
    } 
}
Content-Type: application/json
{
    "msgId":  "gBGGFRBQmGUvAglCIxywFV5mRRY" // 用这个来跟踪消息状态
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "601",
            "errorMessage": "This phone number does not have an associated whatsapp account."
        }
    ]
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "500",
            "errorMessage": "Server internal error."
        }
    ]
}

Request Headers 字段说明

参数
Authorization "bearer" + " " + {{access_token}}
x-api-key {{api_key}}

Request Body 字段说明

参数 必填 类型 描述
customerName String 消费者名称
phone String 电话号码,包含国家电话代码
countryCallingCode String 国家电话代码. 如美国"+1"
messageType String Message Type 枚举
countryCode String 国家代码. 如巴西"BR"
orderInfo JSON 订单信息
shippingInfo JSON 支付者信息
paymentInfo JSON 支付信息

OrderInfo 对象字段说明

参数 必填 类型 描述
productTitle String 订单名.
orderId String 订单id.
amountInCents Long 订单金额, 整形,单位分
currency String 货币代码,如巴西"BRL"
link Long 订单链接
productImgList List 商品图片链接列表,当messageType=PAYMENT_REMINDER时不可空

ShippingInfo 对象字段说明

参数 必填 类型 描述
shippingAddress String 收件地址.
trackingNumber String 邮件跟踪编号.
transportCompany String 快递公司
trackingLink String 快递链接

PaymentInfo 对象字段说明

参数 必填 类型 描述
createTime String 支付记录创建时间.
paymentId String 来自payin支付接口的idempotency key.
paymentMethod String 支付方式. 用来做数据统计. Liduido的支付订单必填. 枚举: PIX_DYNAMIC_QR,CREDIT_CARD,DEBIT_CARD,BOLETO,BANK_TRANSFER
vendor String Liduido的支付订单填"LIQUIDO", 其他的填"OTHER". 用来做数据统计.

Message Type

参数 描述
PAYMENT_REMINDER 当一笔 pix 待付订单在一段时间内未付款时,您可以向用户发送 pix 付款提醒,告诉他们为订单付款。
PAYMENT_SETTLED 在信用卡支付订单创建和支付成功时提醒用户。
PAYMENT_CREATED_PIX 创建一个pix支付订单时提醒用户。 点击"Order details"按钮可以查看订单详情.
SHIPMENT_SHIPPED 订单发货时通知客户。

查询消息状态

请求

GET /v1/whatsapp/message/{{msgId}}

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}

响应

Content-Type: application/json
{
    "status": "Send",
    "lastUpdateTime": "2022-04-28 12:00:00"
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "601",
            "errorMessage": "This phone number does not have an associated whatsapp account."
        }
    ]
}
Content-Type: application/json
{
    "errors": [
        {
            "code": "500",
            "errorMessage": "Server internal error."
        }
    ]
}

Path Parameters

参数 必填 类型 描述
msgId String 来自发送消息接口响应的msgId
回到页面顶部