欢迎光临
我们一直在努力

苹果 · 保修激活日期查询Pro API

通过该API接口可得到型号、颜色、容量、有效购买日期、激活状态、预计购买时间、注册状态、保修状态、保修过期时间、电话技术支持、AppleCare等信息,帮助苹果用户确定iPad、iPod和iPhone是否处于保修期内。

一、获取API秘钥

1、点击进入果查查API官网,用邮箱注册账号。

果查查API官网

果查查API官网

2、登录成功后,点击左侧“用户中心”菜单,获取专属API密钥

果查查API秘钥

果查查API秘钥

二、使用API

1、请求信息

(1)请求地址:

https://open-api.51gcc.com

(2)请求方法:

POST

(3)请求参数

参数名

是否必填

说明

参数值

sn 序列号或IMEI 设备的序列号或IMEI
api_id api_id 4

api_test

是否模拟请求返回示例数据。1=是;0=否

1

api_key

用户中心的API密钥

自己的API密钥 查看秘钥

2、响应结果

(1)结果字段说明:

字段名

类型

说明

示例值

image

string

设备图片

https://snapi.51gcc.com/storage/site/no_name.png

key

string

字段名

model

text

string

字段含义

型号

value

string|array

字段含义对应的查询结果

iPhone XR

notice string 对value字段含义的补充说明 用于查询保修的凭证号码

(2)成功示例:

{
"code": 200,
"msg": "ok",
"data": {
"image": "https://snapi.51gcc.com/storage/site/no_name.png",
"result": [
{
"key": "model",
"text": "型号",
"value": "iPhone XR",
"notice": ""
},
{
"key": "model_description",
"text": "型号描述",
"value": "iPhone XR BLACK 256GB-CHN",
"notice": ""
},
{
"key": "origin_model",
"text": "零件说明",
"value": "iPhone XR BLACK 256GB-CHN",
"notice": ""
},
{
"key": "imei",
"text": "imei",
"value": "35859852552XXXX",
"notice": ""
},
{
"key": "imei2",
"text": "imei2",
"value": "35859852591XXXX",
"notice": ""
},
{
"key": "meid_number",
"text": "meid",
"value": "3585985255XXXX",
"notice": ""
},
{
"key": "eid_number",
"text": "EID",
"value": "35859852XXXXXX",
"notice": ""
},
{
"key": "capacity",
"text": "容量",
"value": "256GB",
"notice": ""
},
{
"key": "color",
"text": "颜色",
"value": "黑色",
"notice": ""
},
{
"key": "activation_status",
"text": "激活状态",
"value": "已激活",
"notice": ""
},
{
"key": "warranty_status",
"text": "保修状态",
"value": "已过保",
"notice": ""
},
{
"key": "active_date",
"text": "激活日期",
"value": "2024-05-28",
"notice": ""
},
{
"key": "coverage_start_date",
"text": "保修开始时间",
"value": "2024-05-28",
"notice": ""
},
{
"key": "applecare",
"text": "是否购买AppleCare",
"value": "否",
"notice": ""
},
{
"key": "ac_expiry",
"text": "AppleCare到期时间",
"value": "2025-05-27",
"notice": ""
},
{
"key": "ac_days_left",
"text": "AppleCare剩余天数",
"value": "0天",
"notice": ""
},
{
"key": "estimated_purchase_date",
"text": "预计购买时间",
"value": "2024-05-28",
"notice": ""
},
{
"key": "telephone_technical_support",
"text": "电话技术支持",
"value": "否",
"notice": ""
},
{
"key": "any_time",
"text": "7X24小时技术支持",
"value": "已过期",
"notice": ""
},
{
"key": "express_replacement_service",
"text": "快速更换服务",
"value": "已过保",
"notice": ""
},
{
"key": "unlimited_repairs_for_accidental_damage",
"text": "AppleCare+意外损坏无限次维修",
"value": "已过保",
"notice": ""
},
{
"key": "express_replacement",
"text": "AppleCare+快速更换服务",
"value": "已过保",
"notice": ""
},
{
"key": "repairs_and_service_coverage",
"text": "维修和服务",
"value": "已过保",
"notice": ""
},
{
"key": "warranty_expires_in",
"text": "剩余保修期",
"value": "0天",
"notice": ""
},
{
"key": "warranty",
"text": "保修服务",
"value": "已过保",
"notice": ""
},
{
"key": "applecare_estimated_expiration_date",
"text": "AppleCare估计到期日期",
"value": "2025-05-27",
"notice": ""
},
{
"key": "applecare_agreement_code",
"text": "AppleCare协议代码",
"value": "10689459522XX",
"notice": "苹果内部系统识别保修的后台代码"
},
{
"key": "applecare_agreement_number",
"text": "AppleCare协议编号",
"value": "1568987946XX",
"notice": "用于查询保修的凭证号码"
},
{
"key": "theft_and_loss_replacement_coverage",
"text": "盗窃和丢失更换保障服务",
"value": "已过期",
"notice": ""
},
{
"key": "warranty_year",
"text": "保修年数",
"value": "1年",
"notice": ""
},
{
"key": "accidental_damage_repairs",
"text": "意外损坏保修服务",
"value": "已过保",
"notice": ""
},
{
"key": "ac_eligible",
"text": "在线购买AppleCare的资格",
"value": "无资格",
"notice": ""
},
{
"key": "pre_activated",
"text": "预激活状态",
"value": "已激活",
"notice": ""
},
{
"key": "applecare_eligible",
"text": "AppleCare延保服务",
"value": "是",
"notice": ""
},
{
"key": "valid_purchase_date",
"text": "有效购买日期",
"value": "是",
"notice": ""
},
{
"key": "warranty_expiration_date",
"text": "保修过期时间",
"value": "2025-05-27",
"notice": ""
},
{
"key": "registered_device",
"text": "已在苹果官方注册",
"value": "是",
"notice": ""
},
{
"key": "replaced_by_apple",
"text": "被苹果官方更换",
"value": "否",
"notice": ""
},
{
"key": "product",
"text": "入网型号",
"value": "A352X",
"notice": ""
},
{
"key": "sku_item_code",
"text": "SKU ID",
"value": "3293-1XXX",
"notice": ""
}
],
"other_result": []
}
}

(3)失败示例:

{
"code": 403,
"msg": "签名错误",
"time": 1770703778,
"data": []
}

(4)状态码说明

状态码

说明

200

请求成功,服务器已成功处理了请求。

210

参数错误。

220

系统功能异常。

230

数据获取失败。

403

服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。

404

请求的资源未找到。请检查您的请求地址是否正确。

429

请求过于频繁。您已超出速率限制,请稍后再试。

500

服务器内部错误。服务器在执行请求时遇到了问题。

600

API账户余额不足。

三、调用示例

PHP示例

<?php
$url = 'https://open-api.51gcc.com/api.php';
$params = ['sn' => 'YOUR_VALUE', 'api_id' => '4', 'api_test' => 'YOUR_VALUE', 'api_key' => 'YOUR_VALUE', ];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>

Python示例

import requests

url = "https://open-api.51gcc.com/api.php"
params = {
'sn': 'YOUR_VALUE',
'api_id': '4',
'api_test': 'YOUR_VALUE',
'api_key': 'YOUR_VALUE',
}
response = requests.post(url, data=params)
print(response.text)

Java示例

import java.io.*;
import java.net.*;
import java.util.*;

public class ApiClient {
public static void main(String[] args) throws Exception {
String url = "https://open-api.51gcc.com/api.php";
Map<String, String> params = new HashMap<>();
params.put("sn", "YOUR_VALUE");
params.put("api_id", "4");
params.put("api_test", "YOUR_VALUE");
params.put("api_key", "YOUR_VALUE");

URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setDoOutput(true);

StringBuilder postData = new StringBuilder();
for (Map.Entry<String, String> param : params.entrySet()) {
if (postData.length() != 0) postData.append('&');
postData.append(URLEncoder.encode(param.getKey(), "UTF-8"));
postData.append('=');
postData.append(URLEncoder.encode(param.getValue(), "UTF-8"));
}

try (DataOutputStream wr = new DataOutputStream(con.getOutputStream())) {
wr.writeBytes(postData.toString());
}

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
}
}

赞(0)
未经允许不得转载:171主机测评 » 苹果 · 保修激活日期查询Pro API
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址