SMSPVAdevelopers
Private Email Rental
SMSPVA / DOCUMENTATION

取消租赁

GET /api/rent_email.php?method=cancel_order

SMSPVA API
GEThttps://smspva.com/api/rent_email.php?method=cancel_order

发送 GET 请求后,即使 HTTP 为 200,也请检查 status:1 成功,0 失败,创建租赁时的 2 表示暂无邮箱。错误详情可能在 msg、errormsg 和 errorid 中。

此请求可能修改租赁订单或产生费用。响应丢失后,先查询订单及历史,再决定是否重试:更改可能已经生效。示例不会自动重试。

身份验证

apikey 为必填查询参数。

参数

名称位置类型必填示例说明
apikeyquerystring是SMSPVA_API_KEY账户 API 密钥。读取邮件及管理租赁需要使用订单所属账户的密钥。
methodquerystring是"cancel_order"要调用的方法。
orderidqueryinteger是123456按所调用方法,从 Create Order、Active Orders 或 Archived Orders 获取订单 ID。

使用说明

取消 API 密钥所属账户的租赁。ID 取自有效订单。取消不保证退款。

请求示例

运行环境及依赖. 示例会对查询参数编码,最多等待 30 秒。使用 data 前请检查 HTTP 和 JSON status。cURL 输出原始响应供你检查,Java 使用 Jackson 读取 JSON。

  • SMSPVA_EMAIL_ORDER_ID: orderid.
: "${SMSPVA_API_KEY:?Set SMSPVA_API_KEY}"
: "${SMSPVA_EMAIL_ORDER_ID:?Set SMSPVA_EMAIL_ORDER_ID}"
curl --get --fail-with-body --max-time 30 "https://smspva.com/api/rent_email.php" \
  --data-urlencode "method=cancel_order" \
  --data-urlencode "apikey=$SMSPVA_API_KEY" \
  --data-urlencode "orderid=$SMSPVA_EMAIL_ORDER_ID"

响应

请查看与你的请求对应的响应。数值和日期仅供示例;可选字段可能因结果或所选响应格式而不同。

HTTP 200

HTTP 为 200 时仍需检查 status;示例数值仅供参考。

application/json

成功响应示例

{
  "status": 1,
  "data": true
}

错误

{
  "status": 0,
  "msg": "Incorrect apikey"
}

成功

名称类型说明
statusinteger(enum: [1])
databoolean

必填: status, data

错误

部分错误含 errorid 和 errormsg,其他错误仅有 msg。请检查响应中提供的全部错误字段。

名称类型说明
statusinteger(enum: [0])
erroridinteger可选的结构化错误代码。
errormsgstring可选的错误说明。
msgstring错误信息。

相关指南

本页内容