Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To access the specific document, consumers must initiate an HTTP POST 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

POSTGET

Attributes of the HTTP request

HTTP Request Header

Authorization

string

required

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

JSON Body

bToken

X-Broker-Token

string

required

An unique identifier of the broker.

...

HTTP Request

Code Block
languagejson
# HTTP POSTGET
# https://ipn.dev.thinksurance.de/api/ipn/documents/<some ID>
#
# HTTP headers
# 'Content-Type': 'application/json'
# 'Accept': 'application/json'
# 'Authorization': 'Bearer <some long string value>'
# 
{doc
  "bToken": "some encrypted string"
}'X-Broker-Token': '<some hash>'
# 

Successful HTTP Response

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

Failed HTTP Response

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

...