New API available - faster and more powerful!

Check it out!
Perfect Gym api
Deprecated - API v1 will be switched off on 01.07.2022. Please upgrade to API v2

User documents

Document is a summary representation of single user document stored in Perfect Gym.

Document properties

Document is described by the following properties

Name Type Description
id long Unique identifier of document.
timestamp long Timestamp. Indicates when resource was last modified.
name string Document file name.
extension string File extension.
type string Document type.
Possible values:
  • Invoice
  • ContractAgreement
size long File size in bytes.
url string Document url.
isDeleted bool Indicates if resource is deleted.

List user documents alt text

GET Documents/Documents

Returns paginated list of user documents.


Name Type Description
userId long Required. User identifier. Request returns documents assigned to user identified by userId.
timestamp long Timestamp. Request returns user documents with timestamp grater then timestamp, defaults to 0.

Example request

In this example we fetch list of documents assigned to user identified with id = 236

curl -i 
     -X GET 
     -H "Authorization: Bearer  $ACCESS_TOKEN"

Example response

Status: 200 OK
  "elements": [
      "name": "git_pg.txt",
      "extension": ".txt",
      "type": "ContractAgreement",
      "size": 225,
      "url": "",
      "id": 183,
      "timestamp": 692580,
      "isDeleted": false
Perfect Gym api