订单审核驳回,再次提交
订单审核驳回后,重新上传照片并完成制作,携带原订单号与新的 pic_id 再次提交审核。
接口地址:https://api.zjzapi.com/receipt/submit
请求方式:POST(application/x-www-form-urlencoded)
返回格式:json
接口费用:订单办理完成扣费,7元每单;若选择打印邮寄服务再增加7元。
请求参数:
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
| key | 是 | string | 应用的key |
| pic_id | 是 | int | 制作接口返回的pic_id,有效期50分钟。 |
| order_no | 是 | int | 上次提交的订单号 |
| notice_url | 是 | string | 回调地址 |
| param | 否 | string | 附加参数(json),具体查看每个规格的要求,如下广东驾驶证:
|
返回参数:
| 名称 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| msg | string | 返回说明 |
| data | array | 数据集 |
JSON返回示例:
{
"data": {
"order_no": "20210616134106190536"
},
"code": 0,
"msg": "提交成功"
}
请求示例代码:
请替换占位值后在服务端运行;凭据和应用 key 不要放入浏览器代码。HTTP 成功后仍需按接口文档检查业务 code。 param 的 {} 仅为结构占位,请按回执规格填写所需 JSON 资料;notice_url 必须是你实际部署、平台可访问的回调地址。 使用原订单号及重新制作得到的新 pic_id。
# Bash / zsh,cURL 7.76+;Windows 可使用 Git Bash 或 WSL。
curl --fail-with-body --max-time 60 --request POST 'https://api.zjzapi.com/receipt/submit' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'key=YOUR_APP_KEY' \
--data-urlencode 'pic_id=NEW_PIC_ID' \
--data-urlencode 'order_no=ORIGINAL_ORDER_NO' \
--data-urlencode 'notice_url=https://your-domain.example/receipt/notice' \
--data-urlencode 'param={}'
// Java 11+,保存为 Main.java,编译运行:javac -encoding UTF-8 Main.java && java Main
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) throws Exception {
Map<String, String> form = new LinkedHashMap<>();
form.put("key", "YOUR_APP_KEY");
form.put("pic_id", "NEW_PIC_ID");
form.put("order_no", "ORIGINAL_ORDER_NO");
form.put("notice_url", "https://your-domain.example/receipt/notice");
form.put("param", "{}");
String body = form.entrySet().stream()
.map(entry -> URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8)
+ "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8))
.collect(Collectors.joining("&"));
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10)).build();
HttpRequest request = HttpRequest.newBuilder(URI.create("https://api.zjzapi.com/receipt/submit"))
.timeout(Duration.ofSeconds(60))
.header("Content-Type", "application/x-www-form-urlencoded")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));
if (response.statusCode() < 200 || response.statusCode() >= 300) {
throw new IllegalStateException("HTTP " + response.statusCode());
}
// HTTP 成功不代表业务成功,还需检查响应 JSON 中的 code。
System.out.println(response.body());
}
}
# Python 3.8+,需先安装 requests:pip install requests
import requests
response = requests.post(
"https://api.zjzapi.com/receipt/submit",
headers={"Content-Type": "application/x-www-form-urlencoded"},
data={
"key": "YOUR_APP_KEY",
"pic_id": "NEW_PIC_ID",
"order_no": "ORIGINAL_ORDER_NO",
"notice_url": "https://your-domain.example/receipt/notice",
"param": "{}",
},
timeout=(10, 60),
)
response.raise_for_status()
# 按接口文档检查业务 code,再读取 data。
print(response.json())
<?php
// PHP 7.2+,需启用 cURL 扩展。
// 使用 http_build_query 编码表单,不能直接向 CURLOPT_POSTFIELDS 传数组。
$form = [
'key' => 'YOUR_APP_KEY',
'pic_id' => 'NEW_PIC_ID',
'order_no' => 'ORIGINAL_ORDER_NO',
'notice_url' => 'https://your-domain.example/receipt/notice',
'param' => '{}',
];
$curl = curl_init('https://api.zjzapi.com/receipt/submit');
curl_setopt_array($curl, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($form),
CURLOPT_HTTPHEADER => ['Content-Type: application/x-www-form-urlencoded'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 60,
]);
$result = curl_exec($curl);
$error = curl_error($curl);
$status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($result === false) {
throw new RuntimeException($error);
}
if ($status_code < 200 || $status_code >= 300) {
throw new RuntimeException('HTTP ' . $status_code);
}
// 按接口文档检查响应 JSON 中的业务 code,再读取 data。
echo $result;
// Go 1.16+,仅使用标准库。
package main
import (
"fmt"
"io"
"net/http"
"net/url"
"strings"
"time"
)
func main() {
form := url.Values{
"key": {"YOUR_APP_KEY"},
"pic_id": {"NEW_PIC_ID"},
"order_no": {"ORIGINAL_ORDER_NO"},
"notice_url": {"https://your-domain.example/receipt/notice"},
"param": {"{}"},
}
request, err := http.NewRequest("POST", "https://api.zjzapi.com/receipt/submit", strings.NewReader(form.Encode()))
if err != nil {
panic(err)
}
request.Header.Set("Content-Type", "application/x-www-form-urlencoded")
client := &http.Client{Timeout: 60 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
if response.StatusCode < 200 || response.StatusCode >= 300 {
panic(fmt.Errorf("HTTP %d", response.StatusCode))
}
result, err := io.ReadAll(response.Body)
if err != nil {
panic(err)
}
// 按接口文档检查响应 JSON 中的业务 code,再读取 data。
fmt.Println(string(result))
}
// Node.js 18+,保存为 request.mjs;仅在服务端运行,勿将凭据放进浏览器代码。
const form = new URLSearchParams([
["key", "YOUR_APP_KEY"],
["pic_id", "NEW_PIC_ID"],
["order_no", "ORIGINAL_ORDER_NO"],
["notice_url", "https://your-domain.example/receipt/notice"],
["param", "{}"],
]);
const response = await fetch('https://api.zjzapi.com/receipt/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: form,
signal: AbortSignal.timeout(60000),
});
if (!response.ok) {
throw new Error('HTTP ' + response.status);
}
// 按接口文档检查业务 code,再读取 data。
console.log(await response.json());
// C# 10 / .NET 6+,放入控制台项目的 Program.cs。
using System;
using System.Collections.Generic;
using System.Net.Http;
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(60) };
using var content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("key", "YOUR_APP_KEY"),
new KeyValuePair<string, string>("pic_id", "NEW_PIC_ID"),
new KeyValuePair<string, string>("order_no", "ORIGINAL_ORDER_NO"),
new KeyValuePair<string, string>("notice_url", "https://your-domain.example/receipt/notice"),
new KeyValuePair<string, string>("param", "{}"),
});
// FormUrlEncodedContent 自动设置 application/x-www-form-urlencoded 并编码字段。
using var response = await client.PostAsync("https://api.zjzapi.com/receipt/submit", content);
response.EnsureSuccessStatusCode();
// 按接口文档检查响应 JSON 中的业务 code,再读取 data。
Console.WriteLine(await response.Content.ReadAsStringAsync());