請(qǐng)求(POST 或者 GET)
api.ihuyi.com/f/giftcard?action=getproducts
| 參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必填 |
| Content-Type | 內(nèi)容類型,固定值 | application/x-www-form-urlencoded | string | 是 |
| 參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必填 |
| username | API ID | 123456 | string | 是 |
| timestamp | 時(shí)間戳格式如:yyyyMMddHHmmss 允許 10分鐘統(tǒng)一以東 8 時(shí)間 | 20240321150546 | string | 是 |
| sign | 簽名 | 81ed625f338277f1bd7f27b9339e302c | string | 是 |
| 參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必返 |
| code | 返回值為1時(shí),表示提交成功 | 1|1001 | int | |
| message | 提交結(jié)果描述 | 查詢成功|API ID 為空 | string | |
| data | 結(jié)果集 | object | ||
| products[] | 產(chǎn)品列表 | array | ||
| productid | 產(chǎn)品 ID | k111-1 | string | |
| name | 產(chǎn)品名稱 | 中石油100元 | string | |
| number | 數(shù)值(用于充值請(qǐng)求) | 234 | int | |
| value | 面額 | 1.00 | float | |
| price | 市場(chǎng)價(jià) | 1.00 | float | |
| discount | 配置價(jià)格 | 1.00 | float |
| code | msg |
| 1000 | 無(wú)此操作類型(action 為空或不存在) |
| 1001 | API ID 為空 |
| 1002 | API ID 錯(cuò)誤 |
| 1003 | 手機(jī)號(hào)碼為空 |
| 1004 | 手機(jī)號(hào)碼錯(cuò)誤 |
| 1005 | 產(chǎn)品 ID 不能為空 |
| 1006 | 時(shí)間戳不能為空 |
| 1007 | 不存在的產(chǎn)品 |
| 1008 | 簽名不能為空 |
| 1009 | 簽名錯(cuò)誤 |
| 1010 | 簽名過(guò)期 |
| 1011 | 賬號(hào)被凍結(jié) |
| 1012 | 余額不足 |
| 1013 | 訪問(wèn) ip 與備案 ip 不相同 |
| 1014 | 訂單 ID 不能為空 |
| 1015 | 訂單 ID 已存在 |
| 1016 | 客戶訂單號(hào)格式錯(cuò)誤 |
| 1017 | 產(chǎn)品未配置,聯(lián)系商務(wù) |
| 1018 | 購(gòu)買數(shù)量為空 |
| 1019 | 購(gòu)買數(shù)量錯(cuò)誤 |
| 1020 | 產(chǎn)品資金異常 |
| 1021 | 通道故障 |
| 1024 | 擴(kuò)展參數(shù)錯(cuò)誤 |
| 2001 | 不支持的手機(jī)號(hào)碼 |
| 2002 | 手機(jī)號(hào)碼已加入黑名單 |
| 2003 | 不支持的地區(qū) |
| 2005 | 請(qǐng)求失敗 |
| 2008 | 訂單 ID 不存在 |
| 3001 | 扣費(fèi)失敗 |
| 4001 | 系統(tǒng)內(nèi)部故障 |
不支持
示例(成功)
{"code":1,"message":"查詢成功","data":{"products":[{"productid":"k111-1","name":"中石油100元","number":"234","value":"1.00","price":"1.00","discount":"1.00"},{"productid":"k111-1","name":"中石油100元","number":"234","value":"1.00","price":"1.00","discount":"1.00"},{"productid":"k111-1","name":"中石油100元","number":"234","value":"1.00","price":"1.00","discount":"1.00"}]}}
示例(失?。?/p>
{"code":1001,}
$apikey = 'xxxxxxxxxxxxxxxx'; //可登錄用戶中心查看
$timestamp = '20240321150546';
$username = '123456';
$password=md5('apikey='.$apikey.'×tamp='.$timestamp.'&username='.$username);
$password=md5('apikey=xxxxxxxxxxxxxxxx×tamp=20240321150546&username=123456');
//注意:所有字符編碼統(tǒng)一為UTF-8
國(guó)內(nèi)專業(yè)互聯(lián)網(wǎng)團(tuán)隊(duì)
21年行業(yè)經(jīng)驗(yàn)
7x24小時(shí)售后支持
豐富的行業(yè)經(jīng)驗(yàn)
互 億 無(wú) 線 官 方 微 信 號(hào)
Copyright ? 2004-2025 上海思銳信息技術(shù)有限公司 All rights reserved. 滬ICP備07035915號(hào)-15 電信增值業(yè)務(wù)許可證:B2-20160082
服務(wù)熱線:
4008 808 898
服務(wù)熱線(工作時(shí)間):
4008 808 898
業(yè)務(wù)咨詢(非工作時(shí)間):
售后咨詢(非工作時(shí)間):