Skip to main content
GET
/
documents
/
v2
/
rs
/
{documentId}
Get a document by ID
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/documents/v2/rs/{documentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Session-Token: <x-session-token>'
{
  "data": {
    "id": 1,
    "name": "Document Name",
    "origin": {
      "type": "PLAN",
      "id": 123
    },
    "updatedAt": "2024-12-09T14:23:00.000Z",
    "createdAt": "2024-01-15T08:45:00.000Z",
    "actions": {
      "canBeUpdated": true,
      "canBeDeleted": true
    },
    "createdBy": {
      "id": 1,
      "img": "https://www.example.com/image.jpg",
      "firstName": "John",
      "lastName": "Doe"
    },
    "establishmentCell": {
      "establishment": {
        "id": 1,
        "name": "Main site",
        "count": 123
      },
      "cell": {
        "id": 1,
        "name": "Main site",
        "count": 123
      }
    },
    "label": {
      "id": 1,
      "name": "Urgent",
      "color": "#FF5733"
    },
    "presignedUrl": "https://bucket.s3.amazonaws.com/1",
    "technicalInstallations": [
      {
        "id": 1,
        "name": "establishment_informations.installation_ascenseurs",
        "presignedUrl": "https://example.com/presigned-url"
      }
    ],
    "updatableFields": {
      "name": true,
      "labelId": true,
      "mimeType": true,
      "size": true,
      "siteIds": true,
      "technicalInstallationIds": true
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Session-Token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Path Parameters

documentId
integer
required

Unique identifier of the document.

Example:

1

Query Parameters

extend
enum<string>[]

Extend options:

  • "actions-info": Give information about the origin of the document

  • "created-by": Get created about the person who created the document

  • "establishment-cell": Get information about the establishment cell

  • "label": Get label information

  • "presigned-url": Get presigned url of the document

  • "technical-installations": Get information about the technical installations linked to the document

  • "updatable-fields": Get information about the field that can be updated

Available options:
actions-info,
created-by,
establishment-cell,
label,
presigned-url,
technical-installations,
updatable-fields

Response

200 - application/json

Document retrieved successfully

data
object
required