Get Document

The Get Document API retrieves metadata and content of the document with ID (document_id), which is being processed in the transaction with ID (transaction_id). The document is a fundamental resource in the OneSpan platform domain model (see Document model).

Syntax

GET /api/transaction/(uuid: transaction_id)/document/(String: document_id)/pdf

Examples

Example request

  1. GET /api/transaction/dcaad720-d1e9-47ba-a76b-a6370ef0373b/document/ee02adab-4946-4fae-884f-d8990aaf776a/pdf HTTP/1.1
  2. Host: onespan.com
  3. Accept: application/json, text/javascript

Example response

  1. HTTP/1.1 200 OK
  2. Vary: Accept
  3. Content-Type: application/json; charset=UTF-8

The response body will contain the requested document.

Headers

The following headers are included in the request and response, respectively:

Request headers

  • Accept: The response content type depends on the Accept header
  • Authorization: The OAuth/JWT token to authenticate

Response Headers

Status codes

Status codes lists the status codes.

Status codes
Status code Name Description
200 OK

No error.

400 Bad Request The transaction data are invalid.
401 Unauthorized Invalid token.
403 Forbidden The token does not grant transaction creation rights.
500 Internal Server Error Server or application error.