本文為您提供了Go語言版本的提交查詢接口對接DEMO示例
//測試:go run ./test.go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
const strUrl = "https://api.ihuyi.com/idcard/entpat/Submit.json"
func main() {
v := url.Values{}
v.Set("account", "xxxxxxxx") //APIID(用戶中心【認(rèn)證核驗】-【企業(yè)信息驗證】-【產(chǎn)品總覽】查看)
v.Set("password", "xxxxxxxxx") //1、APIKEY(用戶中心【認(rèn)證核驗】-【企業(yè)信息驗證】-【產(chǎn)品總覽】查看)
2、動態(tài)密碼(生成動態(tài)密碼方式請看該文檔末尾的說明)
v.Set("ent_name", "上海************有限公司") //企業(yè)名稱(ent_name、ent_code、organization_code、reg_no四選一傳遞)
v.Set("ent_code", "913******") //社會信用代碼(ent_name、ent_code、organization_code、reg_no四選一傳遞)
v.Set("organization_code", "403925******") //組織機構(gòu)代碼(ent_name、ent_code、organization_code、reg_no四選一傳遞)
v.Set("reg_no", "403925******") //注冊號(ent_name、ent_code、organization_code、reg_no四選一傳遞)
v.Set("app_begin_date", "2025-01-01") //申請開始日(格式y(tǒng)yyy-MM-DD)
v.Set("app_end_date", "2025-01-01") //申請結(jié)束日(格式y(tǒng)yyy-MM-DD)
v.Set("begin_date", "2025-01-01") //發(fā)布開始日(格式y(tǒng)yyy-MM-DD)
v.Set("end_date", "2025-01-01") //發(fā)布結(jié)束日(格式y(tǒng)yyy-MM-DD)
v.Set("type", "1") //專利類型代碼(1-發(fā)明專利;2-實用新型;3-外觀設(shè)計)
v.Set("page_index", "1") //頁碼,默認(rèn)第一頁
v.Set("page_size", "50") //每頁條數(shù)(默認(rèn)50條,最大50條)
v.Set("time", "1623643787") //Unix時間戳(10位整型數(shù)字,當(dāng)使用動態(tài)密碼方式時為必填)
body := strings.NewReader(v.Encode()) //把form數(shù)據(jù)編碼
client := &http.Client{}
req, _ := http.NewRequest("POST", strUrl, body)
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
resp, err := client.Do(req) //發(fā)送
if err != nil {
fmt.Println(err)
}
defer resp.Body.Close() //一定要關(guān)閉resp.Body
res, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(res))
}
國內(nèi)專業(yè)互聯(lián)網(wǎng)團隊
21年行業(yè)經(jīng)驗
7x24小時售后支持
豐富的行業(yè)經(jīng)驗
Copyright ? 2004-2025 上海思銳信息技術(shù)有限公司 All rights reserved. 滬ICP備07035915號-15 電信增值業(yè)務(wù)許可證:B2-20160082
服務(wù)熱線:
4008 808 898
服務(wù)熱線(工作時間):
4008 808 898
業(yè)務(wù)咨詢(非工作時間):
售后咨詢(非工作時間):