Logo carlschroeter header
Claims Online
Schäden online melden

API Documentation - Version 0.3.0

List documents

Returns documents for a claim. The list is delivered page by page, with 20 entries per page.

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.

GET /api/claims/:claim_id/documents

Parameter

Name Type Required Description
claim_id ID Yes The claim ID to which the documents are to be delivered, e.g. C42RT8.
page integer No The page to deliver (starting with 1)

Example of request:

curl -s -H "CS-API-KEY: <your key>" -H "Content-Type: application/json" https://api-staging.claims-online.de/api/claims/C42RT8/documents

Example of response:


{
  "data": [
    {
      "id": "XG8U3E",
      "type": "documents",
      "attributes": {
        "claim_id": "C42RT8",
        "filename": "ming-vase.jpg",
        "content_type": "image/jpeg",
        "size": 999,
        "title": "Photo with damage",
        "description": "Photo with damage"
      }
    },
    {
      ...
    }
  ]
  "meta": {
    "total": 1,
    "per_page": 20,
    "page": 4,
    "total_pages": 7
  },
  "links": {
    "self": "https://api-staging.claims-online.de/api/_claims/C42RT8/documents?page=4",
    "next": "https://api-staging.claims-online.de/api/_claims/C42RT8/documents?page=5",
    "prev": "https://api-staging.claims-online.de/api/_claims/C42RT8/documents?page=3",
    "first": "https://api-staging.claims-online.de/api/_claims/C42RT8/documents?page=1",
    "last": "https://api-staging.claims-online.de/api/_claims/C42RT8/documents?page=7"
  },
  "links": {
    "self": "https://api-staging.claims-online.de/api/_claims/C42RT8/documents/XG8U3E",
    "content": "https://api-staging.claims-online.de/api/_claims/C42RT8/documents/XG8U3E/content"
  }
}