跳转到主要内容

获取处理事务列表

活动或已完成的处理事务列表可用于:
  • 跟踪当前处于人工校验阶段的活动处理事务。
  • 获取活动处理事务的人工校验链接。
  • 下载已完成处理事务的结果文件。
您可以使用 Vantage API 获取包含标识符的处理事务列表。也可以使用 Skill Monitor 应用更高级的筛选条件。

活动处理事务列表

要获取活动处理事务的列表,请向 transactions/active 资源发送 GET 请求。 在请求正文中,指定以下参数:
ParameterDescription
StageType处理事务所处的阶段。
可选值:
- ManualReview
- CustomActivity
- Automatic(无需用户参与的所有阶段,例如提取 field)
StageName具体操作的名称(仅适用于 ManualReview 阶段)。
SkillIdSkill 标识符。
如果未指定,将考虑所有可用的 Skill。
SkillVersionSkill 版本。
如果未指定,将考虑所有可用 Skill 的所有版本。
StartDate最早处理事务的创建时间(必须为 UTC 格式)。
EndDate最晚处理事务的创建时间(必须为 UTC 格式)。
如果未指定该值,将使用当前 UTC 时间。
TransactionParameters由键值对字符串组成的处理事务参数列表。这些参数提供额外的用户信息(例如客户名称)。
参数必须按以下格式提供:TransactionParameters={"key":"string_1","value":"string"}&TransactionParameters={"key":"string_2","value":"string"}
DocumentParameters由键值对字符串组成的文档参数列表。这些参数提供额外的文档信息(例如文件名)。
参数必须按以下格式提供:DocumentParameters={"key":"string_1","value":"string"}&DocumentParameters={"key":"string_2","value":"string"}
Offset分页偏移量。
该参数的默认值为 0
Limit分页上限。该参数为必填项。
该参数的默认值为 0
示例请求(Windows):
curl -X GET "https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/active"
-H "Authorization: Bearer token"
亦适用于其他地区:
# 北美
curl -X GET "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/active" \
  -H "Authorization: Bearer token"

# 澳大利亚
curl -X GET "https://vantage-au.abbyy.com/api/publicapi/v1/transactions/active" \
  -H "Authorization: Bearer token"
示例请求(Linux):
curl -X GET 'https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/active' \
  -H 'Authorization: Bearer token'
亦适用于其他地区:
# 北美
curl -X GET 'https://vantage-us.abbyy.com/api/publicapi/v1/transactions/active' \
  -H 'Authorization: Bearer token'

# 澳大利亚
curl -X GET 'https://vantage-au.abbyy.com/api/publicapi/v1/transactions/active' \
  -H 'Authorization: Bearer token'
对包含指定 Skill 标识符的请求,其响应将包含一个与下面类似的 JSON 文件:
{
  "items": [
    {
      "stage": "ManualReview",
      "stageName": "审核",
      "seqId": 13758,
      "transactionId": "56a50415-fe1d-4493-81ba-97ff07e3ffce",
      "createTimeUtc": "2023-09-11T13:53:30.633Z",
      "transactionParameters": [
        {
          "isReadOnly": true,
          "key": "string",
          "value": "string"
        },
        {
          "isReadOnly": true,
          "key": "App",
          "value": "PublicAPI"
        }
      ],
      "fileParameters": [
        {
          "isReadOnly": true,
          "key": "string",
          "value": "string"
        },
        {
          "isReadOnly": true,
          "key": "Index",
          "value": "0"
        },
        {
          "isReadOnly": true,
          "key": "SourceFileName",
          "value": "BillofLading_1.pdf"
        },
        {
          "isReadOnly": true,
          "key": "SourceType",
          "value": "PublicAPI"
        }
      ],
      "skillId": "workspace.default.processing",
      "skillVersion": 18,
      "documentCount": 1
    }
  ],
  "totalItemCount": 7
}
对于指定阶段和操作的请求,其响应将包含一个 JSON 文件,列出所有活跃的处理事务,如下所示:
{
  "items": [
    {
      "stage": "ManualReview",
      "stageName": "Review2",
      "seqId": 13852,
      "transactionId": "e646754e-d854-4b21-af91-58cb63ead7a6",
      "createTimeUtc": "2023-09-11T14:04:37.97Z",
      "transactionParameters": [
        {
          "isReadOnly": true,
          "key": "string",
          "value": "string"
        },
        {
          "isReadOnly": true,
          "key": "App",
          "value": "PublicAPI"
        }
      ],
      "fileParameters": [
        {
          "isReadOnly": true,
          "key": "string",
          "value": "string"
        },
        {
          "isReadOnly": true,
          "key": "Index",
          "value": "0"
        },
        {
          "isReadOnly": true,
          "key": "SourceFileName",
          "value": "BillofLading_1.pdf"
        },
        {
          "isReadOnly": true,
          "key": "SourceType",
          "value": "PublicAPI"
        }
      ],
      "documentCount": 1
    }
  ],
  "totalItemCount": 2
}
您还可以为当前正在进行的处理事务获取人工校验客户端链接。为此,请向 transactions/<transaction_id> 资源发送 GET 请求,并在请求 URI 中包含该处理事务的标识符。 示例请求(Windows):
curl -X GET "https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/transaction-id" \
  -H "Authorization: Bearer token"
其他地区亦可用:
# 北美
curl -X GET "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/transaction-id" \
  -H "Authorization: Bearer token"

# 澳大利亚
curl -X GET "https://vantage-au.abbyy.com/api/publicapi/v1/transactions/transaction-id" \
  -H "Authorization: Bearer token"
示例请求(Linux):
curl -X GET 'https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/transaction-id' \
  -H 'Authorization: Bearer token'
其他地区亦可用:
# 北美
curl -X GET 'https://vantage-us.abbyy.com/api/publicapi/v1/transactions/transaction-id' \
  -H 'Authorization: Bearer token'

# 澳大利亚
curl -X GET 'https://vantage-au.abbyy.com/api/publicapi/v1/transactions/transaction-id' \
  -H 'Authorization: Bearer token'
响应将包含类似如下的代码:
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "Processing",
  "manualReviewLink": "https://vantage-eu.abbyy.com/api/publicapi/v1/verify?documentIds=9838448d-72ae-4e9a-b071-2bb16f732e46",
  "sourceFiles": [
    {
      "id": "7b2eed6f-3fdd-43b9-a178-7211d0a8d5bb",
      "name": "Invoice07.JPG"
    }
  ]
}
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "Processing",
  "manualReviewLink": "https://vantage-us.abbyy.com/api/publicapi/v1/verify?documentIds=9838448d-72ae-4e9a-b071-2bb16f732e46",
  "sourceFiles": [
    {
      "id": "7b2eed6f-3fdd-43b9-a178-7211d0a8d5bb",
      "name": "Invoice07.JPG"
    }
  ]
}
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "处理中",
  "manualReviewLink": "https://vantage-au.abbyy.com/api/publicapi/v1/verify?documentIds=9838448d-72ae-4e9a-b071-2bb16f732e46",
  "sourceFiles": [
    {
      "id": "7b2eed6f-3fdd-43b9-a178-7211d0a8d5bb",
      "name": "Invoice07.JPG"
    }
  ]
}
如果需要进行人工校验,manualReviewLink 键将包含指向 Manual Review 客户端 Web 界面的链接以及一个 Vantage 访问令牌。可使用该链接和令牌对特定处理事务的分类和 field 提取结果进行审核与更正。该链接的有效期为 168 小时,之后应使用相同方法创建并获取新的链接,新的链接同样有效 168 小时。更多信息,请参见集成人工校验
通过此链接授权的用户无法查看或修改任何其他文档或处理事务。

已完成处理事务列表

要获取已完成处理事务的列表,请向 transactions/completed 资源发送 GET 请求。 在请求正文中指定以下参数:
ParameterDescription
TransactionStatus处理事务的状态。
可能的取值:
- Processed
- Canceled
- Failed
SkillIdSkill 标识符。
如果未指定值,将考虑所有可用的 Skill。
SkillVersionSkill 版本。
如果未指定值,将考虑所有可用 Skill 的所有版本。
StartDate最早处理事务的创建时间(必须为 UTC 格式)。
EndDate最晚处理事务的创建时间(必须为 UTC 格式)。
如果未指定该值,将使用当前 UTC 时间。
TransactionParameters由键值对 string 组成的处理事务参数列表。这些参数提供额外的用户信息(例如,客户名称)。
参数必须按以下格式提供:TransactionParameters={“key”: “string_1”,”value”:”string”}&TransactionParameters={“key”: “string_2”,”value”:”string”}
DocumentParameters由键值对 string 组成的文档参数列表。这些参数提供额外的文档信息(例如,文件名)。
参数必须按以下格式提供:DocumentParameters={“key”: “string_1”,”value”:”string”}&DocumentParameters={“key”: “string_2”,”value”:”string”}
Offset分页偏移量。
该参数的默认值为 0
Limit分页上限。该参数为必填项。
该参数的默认值为 0
响应将包含一个 JSON 文件,其中包含所有已完成的处理事务以及类似如下的已处理页数:
{
  "items": [
    {
      "status": "FinishedSuccessfully",
      "pageCount": 1,
      "seqId": 13705,
      "transactionId": "fc9920fe-f788-47f8-9972-b767493faed9",
      "createTimeUtc": "2023-09-11T13:47:50.273Z",
      "transactionParameters": [
        {
          "isReadOnly": true,
          "key": "string",
          "value": "string"
        },
        {
          "isReadOnly": true,
          "key": "App",
          "value": "PublicAPI"
        }
      ],
      "fileParameters": [
        {
          "isReadOnly": true,
          "key": "string",
          "value": "string"
        },
        {
          "isReadOnly": true,
          "key": "Index",
          "value": "0"
        },
        {
          "isReadOnly": true,
          "key": "SourceFileName",
          "value": "BillofLading_1.pdf"
        },
        {
          "isReadOnly": true,
          "key": "SourceType",
          "value": "PublicAPI"
        }
      ],
      "documentCount": 1
    },
    {
      "status": "FinishedSuccessfully",
      "pageCount": 2,
      "seqId": 29842,
      "transactionId": "c0dd3e08-f295-4c6c-b919-31eaa67817cc",
      "createTimeUtc": "2023-09-12T19:28:01.27Z",
      "transactionParameters": [
        {
          "isReadOnly": true,
          "key": "App",
          "value": "VantageUI"
        }
      ],
      "fileParameters": [
        {
          "isReadOnly": true,
          "key": "SourceFileName",
          "value": "Invoice _ 1213123123 _2__signed_signed _1__signed _1_.pdf"
        },
        {
          "isReadOnly": true,
          "key": "SourceType",
          "value": "VantageUI"
        }
      ],
      "documentCount": 1
    },
    {
      "status": "FinishedSuccessfully",
      "pageCount": 2,
      "seqId": 36254,
      "transactionId": "8391871e-abf5-41bc-8a66-1059418a3843",
      "createTimeUtc": "2023-09-13T08:53:41.9Z",
      "transactionParameters": [
        {
          "isReadOnly": true,
          "key": "App",
          "value": "VantageUI"
        }
      ],
      "fileParameters": [
        {
          "isReadOnly": true,
          "key": "SourceFileName",
          "value": "Invoice _ 1213123123 _2__signed_signed _1__signed _1_.pdf"
        },
        {
          "isReadOnly": true,
          "key": "SourceType",
          "value": "VantageUI"
        }
      ],
      "documentCount": 1
    },
    {
      "status": "FinishedSuccessfully",
      "pageCount": 2,
      "seqId": 36632,
      "transactionId": "7f7cd557-a03e-42e3-a454-e7981e8e9fc0",
      "createTimeUtc": "2023-09-13T09:35:27.48Z",
      "transactionParameters": [
        {
          "isReadOnly": true,
          "key": "App",
          "value": "VantageUI"
        }
      ],
      "fileParameters": [
        {
          "isReadOnly": true,
          "key": "SourceFileName",
          "value": "Invoice _ 1213123123 _2__signed_signed _1__signed.pdf"
        },
        {
          "isReadOnly": true,
          "key": "SourceType",
          "value": "VantageUI"
        }
      ],
      "documentCount": 1
    },
    {
      "status": "FinishedSuccessfully",
      "pageCount": 2,
      "seqId": 36663,
      "transactionId": "c9b3cd4d-d90f-48be-adc2-99985ece4e11",
      "createTimeUtc": "2023-09-13T09:38:29.573Z",
      "transactionParameters": [
        {
          "isReadOnly": true,
          "key": "App",
          "value": "VantageUI"
        }
      ],
      "fileParameters": [
        {
          "isReadOnly": true,
          "key": "SourceFileName",
          "value": "Invoice _ 1213123123 _2__signed_signed _1__signed.pdf"
        },
        {
          "isReadOnly": true,
          "key": "SourceType",
          "value": "VantageUI"
        }
      ],
      "documentCount": 1
    }
  ],
  "totalItemCount": 5
}