documentImage

@GET(value = "documents/{id}/image")
abstract suspend fun documentImage(@Path(value = "id") id: String): Response<ResponseBody>

Get an image version of the document. This endpoint allows you to get an image (jpeg) for any type of document(image, pdf, html_email, etc..).
This will be the url that was returned in the imagePreview field in the GET documents details data format endpoint.

Important: This may take up to 20 seconds to return for pdf or email documents when calling for the first time Responses:

  • 200: Success. Successfully returned the jpeg image of the document.

  • 400: Bad Request. This will occur if you omit a required parameter, or if you provide an invalid value for a required parameter.

  • 401: Unauthorized. This will occur if you do not supply an access-token to this endpoint, or if you provide an expired or invalid access token.

  • 403: Forbidden. This will occur if you attempt to use a client token with this endpoint. This endpoint must be used with a user-token.

  • 404: Not Found. The receiptID you have provided is not one of this user's documents.

Return

ResponseBody

Parameters

id

A unique ID that identifies this document in the Sensibill system.