/
CopyGet Document

CopyGet Document

Introduction

To obtain the payload of a specific document, the Thinksurance Public API V1, denoted as "the API," offers a specialised endpoint. This endpoint allows consumers to retrieve a document by its identifier (hash) and acquire its complete payload as a base64-encoded data.

Endpoint

To access the specific document, consumers must initiate an HTTP GET request to the /api/ipn/documents/{:documentId} endpoint. The documentId parameter represents an unique identifier of the document in question. As essential components of the JSON payload within the body of the request, consumers are required to include the bToken (functioning as the broker identifier).

Action name

get document

HTTP path

/api/ipn/documents/{:documentId}

  • documentId - an unique identifier of the requested document.

HTTP method

GET

Attributes of the HTTP request

HTTP Request Header

HTTP Request Header

Authorization

string

required

A security token provided from Authentication endpoint.
Required to provide as a Bearer Token (in format: “Bearer {{token}}“).

X-Broker-Token

string

required

An unique identifier of the broker.

Attributes of the HTTP response

Success response

Success response

Base64 encoded content of the document.

Failed response

error

string

required

It contains a reason for the failed request.

Examples

This section shows examples of different HTTP requests and responses associated with the endpoint /api/ipn/documents/{:docuementId}.

HTTP Request

# HTTP GET # https://ipn.dev.thinksurance.de/api/ipn/documents/<some ID> # # HTTP headers # 'Accept': 'application/json' # 'Authorization': 'Bearer <some long string value>' # 'X-Broker-Token': '<some hash>' #

Successful HTTP Response

# HTTP 200 status code # 'Content-Type': 'text/pdf' # Base64 encoded payload

Failed HTTP Response

# HTTP 200 status code # 'Content-Type': 'application/json' { "error": "API User is not existing or deactivated." }

 

Related content

V1 Get Document
More like this
V2 Download documents and submit Error message
V2 Download documents and submit Error message
More like this
V1.1 Get Account Token
V1.1 Get Account Token
More like this
V1.1 Get Products
V1.1 Get Products
More like this
V1.1 Get IP Notifications by Inquiry
V1.1 Get IP Notifications by Inquiry
Read with this
V1.1 Get Inquiry Information
V1.1 Get Inquiry Information
More like this