curl --request POST \
--url https://docflow.textin.com/api/app-api/sip/platform/v2/file/upload/sync \
--header 'Content-Type: multipart/form-data' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--form file='@example-file'{
"code": 200,
"msg": "<string>",
"result": {
"total": 100,
"page": 1,
"page_size": 20,
"files": [
{
"id": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"recognition_status": 0,
"verification_status": 0,
"category": "invoice",
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"batch_number": 202412190001,
"failure_causes": "<string>",
"pages": [
{
"page": 1,
"angle": 0,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "Invoice Code",
"identifier": "Invoice Code Identifier",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Invoice Number",
"value": "28737000",
"identifier": "Invoice Number Identifier",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "Goods and Services Name",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "Goods and Services Name",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "Text content",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "National Unified Invoice Supervision Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "Tax Bureau Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "March 1st",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "Zhang San",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "Exceeded daily limit"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"child_files": [
{
"id": 202412190001,
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"parent_task_id": 202412190001,
"batch_number": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"recognition_status": 0,
"verification_status": 0,
"category": "invoice",
"pages": [
{
"page": 1,
"angle": 0,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "Invoice Code",
"identifier": "Invoice Code Identifier",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Invoice Number",
"value": "28737000",
"identifier": "Invoice Number Identifier",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "Goods and Services Name",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "Goods and Services Name",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "Text content",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "National Unified Invoice Supervision Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "Tax Bureau Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "March 1st",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "Zhang San",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "Exceeded daily limit"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"from_parent_position_list": [
1
],
"crop_info": {
"page": 123,
"imageAngle": "<string>"
}
}
],
"duration_ms": 10000,
"total_page_num": 10
}
]
}
}Upload file and wait for processing to complete, returning processing results directly
curl --request POST \
--url https://docflow.textin.com/api/app-api/sip/platform/v2/file/upload/sync \
--header 'Content-Type: multipart/form-data' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--form file='@example-file'{
"code": 200,
"msg": "<string>",
"result": {
"total": 100,
"page": 1,
"page_size": 20,
"files": [
{
"id": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"recognition_status": 0,
"verification_status": 0,
"category": "invoice",
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"batch_number": 202412190001,
"failure_causes": "<string>",
"pages": [
{
"page": 1,
"angle": 0,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "Invoice Code",
"identifier": "Invoice Code Identifier",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Invoice Number",
"value": "28737000",
"identifier": "Invoice Number Identifier",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "Goods and Services Name",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "Goods and Services Name",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "Text content",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "National Unified Invoice Supervision Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "Tax Bureau Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "March 1st",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "Zhang San",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "Exceeded daily limit"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"child_files": [
{
"id": 202412190001,
"task_id": 202412190001,
"task_detail_url": "<string>",
"task_type": 1,
"parent_task_id": 202412190001,
"batch_number": 202412190001,
"name": "invoice.pdf",
"format": "<string>",
"recognition_status": 0,
"verification_status": 0,
"category": "invoice",
"pages": [
{
"page": 1,
"angle": 0,
"width": 1024,
"height": 1024,
"dpi": 144
}
],
"data": {
"fields": [
{
"key": "Invoice Code",
"identifier": "Invoice Code Identifier",
"value": "3100231130",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Invoice Number",
"value": "28737000",
"identifier": "Invoice Number Identifier",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"items": [
[
{
"key": "Goods and Services Name",
"value": "*Electronic Computer*Microcomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "DMS-SC68",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
[
{
"key": "Goods and Services Name",
"value": "*Mechanical Computer*Supercomputer Host",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"key": "Specification Model",
"value": "AN/FSQ-7",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
]
],
"tables": [
{
"tableName": "table1",
"tableType": 0,
"items": [
[
{
"key": "<string>",
"identifier": "<string>",
"value": "<string>",
"textInLines": [
{
"angle": 0,
"pos": [
1
],
"page": 1,
"text": "Text content",
"char_pos": [
[
1
]
]
}
],
"position": [
{
"page": 123,
"vertices": [
123
]
}
],
"index": 123
}
]
]
}
],
"stamps": [
{
"angel": 0,
"page": 0,
"text": "National Unified Invoice Supervision Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
},
{
"angel": 0,
"page": 0,
"text": "Tax Bureau Seal",
"type": "Other",
"color": "Red",
"shape": "Oval Seal",
"position": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
],
"handwritings": [
{
"angel": 0,
"page": 0,
"text": "March 1st",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
},
{
"angel": 0,
"page": 0,
"text": "Zhang San",
"position": [
{
"page": 0,
"vertices": [
0,
0,
100,
0,
100,
100,
0,
100
]
}
]
}
],
"invoiceVerifyResult": {
"invoiceVerifyStatus": 0,
"invoiceVerifyErrorCode": 0,
"invoiceVerifyCanRetry": 0,
"invoiceVerifyFailMsg": "Exceeded daily limit"
}
},
"document": {
"pages": [
{
"angle": 123,
"width": 123,
"height": 123,
"lines": [
{
"text": "<string>",
"position": [
123
],
"charPositions": [
[
123
]
]
}
]
}
]
},
"from_parent_position_list": [
1
],
"crop_info": {
"page": 123,
"imageAngle": "<string>"
}
}
],
"duration_ms": 10000,
"total_page_num": 10
}
]
}
}Workspace ID
1234567890
File Category
"invoice"
Batch Number. You can upload multiple times with the same batch number, and later retrieve processing results for multiple files in that batch using the batch number. If the value is empty, the system automatically generates a string up to 20 characters long.
202412190001
Whether to automatically verify VAT invoice
Whether to perform file splitting
Whether to perform multi-image cropping
Target processing type. Optional values: - classify: Classification - extract: Extraction
classify, extract "classify"
Remove watermark (0 no, 1 yes)
Crop and dewarp (0 no, 1 yes)
Merge cross-page paragraphs and tables (0 no, 1 yes)
Formula recognition level (0 recognizes both display and inline formulas, 1 recognizes display formulas only, 2 recognizes no formulas)
Split text blocks crossed by table lines (0 no, 1 yes)
Whether to return the task details page URL
File upload request body