API Documentation - Version 0.3.0
Get document
Returns a document.
A document has an attribute content that holds the raw content, e.g the PDF or the image. For performance reasons the document is returned without its content by default.
To get the document including its content pass parameter with_content=true with the URL. The content is return as a base64 encoded string. To get the content only use Get document content
GET /api/claims/:claim_id/documents/:id
Parameter
Name | Type | Required | Description |
---|---|---|---|
claim_id | ID | Yes | The claim ID to which the documents are to be delivered, e.g. C42RT8. |
id | ID | Yes | The ID of the document, e.g. XG8U3E |
with_content | boolean | No | If true is passed the document is return including ts content. The content is a base64 encoded string. |
Example of request:
curl -s -H "CS-API-KEY: <your key>" -H "Content-Type: application/json" https://www.claims-online.de/api/claims/C42RT8/documents/XG8U3E
curl -s -H "CS-API-KEY: <your key>" -H "Content-Type: application/json" https://www.claims-online.de/api/claims/C42RT8/documents/XG8U3E?with_content=true
Example of response:
{
"data":{
"id":"XG8U3E",
"type":"documents",
"attributes":{
"claim_id":"C42RT8",
"filename":"ming-vase.jpg",
"content_type":"image/jpeg",
"size":999,
"title":"Photo damage ming vase",
"description":"The image resolution is not optimal, but the damage is easy to see."
},
"links":{
"self":
"https://www.claims-online.de/api/_claims/C42RT8/documents/XG8U3E",
"content":"https://www.claims-online.de/api/_claims/C42RT8/documents/XG8U3E/content"
}
}
}