SDK Installation
NuGet
To add the NuGet package to a .NET project:Locally
To add a reference to a local instance of the SDK in a .NET project:SDK Example Usage
Example
Authentication
Per-Client Security Schemes
This SDK supports the following security scheme globally:Name | Type | Scheme |
---|---|---|
ApiKeyAuth | http | HTTP Bearer |
ApiKeyAuth
parameter must be set when initializing the SDK client instance. For example:
Available Resources and Operations
The available API operations and SDK implementation examples can be found within our API Reference documentationPagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the returned response object will have aNext
method that can be called to pull down the next group of results. If the
return value of Next
is null
, then there are no more pages to be fetched.
Here’s an example of one such pagination call:
Error Handling
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception. By default, an API error will raise aABBYY.DocumentAI.Schemas.Errors.APIException
exception, which has the following properties:
Property | Type | Description |
---|---|---|
Message | string | The error message |
Request | HttpRequestMessage | The HTTP request |
Response | HttpResponseMessage | The HTTP response |
ListAsync
method throws the following exceptions:
Error Type | Status Code | Content Type |
---|---|---|
ABBYY.DocumentAI.Schemas.Errors.BadRequestError | 400 | application/json |
ABBYY.DocumentAI.Schemas.Errors.UnauthorizedError | 401 | application/json |
ABBYY.DocumentAI.Schemas.Errors.TooManyRequestsError | 429 | application/json |
ABBYY.DocumentAI.Schemas.Errors.InternalServerError | 500 | application/json |
ABBYY.DocumentAI.Schemas.Errors.APIException | 4XX, 5XX | */* |