跳转到主要内容
GET
/
api
/
v1
/
xparse
/
parse
/
async
/
{job_id}
查询异步解析任务状态
curl --request GET \
  --url https://api.textin.com/api/v1/xparse/parse/async/{job_id} \
  --header 'x-ti-app-id: <api-key>' \
  --header 'x-ti-secret-code: <api-key>'
import requests

url = "https://api.textin.com/api/v1/xparse/parse/async/{job_id}"

headers = {
    "x-ti-app-id": "<api-key>",
    "x-ti-secret-code": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
  method: 'GET',
  headers: {'x-ti-app-id': '<api-key>', 'x-ti-secret-code': '<api-key>'}
};

fetch('https://api.textin.com/api/v1/xparse/parse/async/{job_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.textin.com/api/v1/xparse/parse/async/{job_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "x-ti-app-id: <api-key>",
    "x-ti-secret-code: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.textin.com/api/v1/xparse/parse/async/{job_id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-ti-app-id", "<api-key>")
	req.Header.Add("x-ti-secret-code", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.textin.com/api/v1/xparse/parse/async/{job_id}")
  .header("x-ti-app-id", "<api-key>")
  .header("x-ti-secret-code", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.textin.com/api/v1/xparse/parse/async/{job_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-ti-app-id"] = '<api-key>'
request["x-ti-secret-code"] = '<api-key>'

response = http.request(request)
puts response.read_body
{ "code": 200, "message": "success", "data": { "job_id": "c020a1f03c994091a94d6763cdbe0684", "file_id": "00c685bad97544609d3607885d76bdc4", "status": "pending" } }

授权

x-ti-app-id
string
header
必填

登录Textin后前往 "工作台-账号设置-开发者信息" 查看 x-ti-app-id

x-ti-secret-code
string
header
必填

登录Textin后前往 "工作台-账号设置-开发者信息" 查看 x-ti-secret-code

路径参数

job_id
string
必填

任务ID

响应

200 - application/json

任务状态

code
enum<integer>
默认值:200
必填

状态码

  • 200: Success
  • 40101: x-ti-app-id 或 x-ti-secret-code 为空
  • 40102: x-ti-app-id 或 x-ti-secret-code 无效,验证失败
  • 40004: 参数错误,请查看技术文档,检查传参
  • 500: 服务器内部错误

更多详细错误信息参考错误码说明

可用选项:
200,
40101,
40102,
40004,
500
message
string
必填

错误信息

示例:

"success"

data
object
必填