v1

latestOpenAPI 3.0.32026-08-0613775357.6 KB
approvals

Create approvals

Approvals are not created or updated directly. Rather, approvable records are submitted or approved through this POST request.

Note: Only administrators and portfolio editors can approve records. API users can only submit records (set status to pending), but not approve them.

post/approvals

Request body

status'pending' | 'approved' required

The desired status change.

updated_atstring date-time

The current updated_at timestamp of the record, required for concurrency checks. This value must exactly match the timestamp from the latest GET response to ensure the record hasn't been modified by another user.

Example request

{
  "approvables": [
    {
      "id": 123,
      "type": "TimeEntry",
      "updated_at": "2016-10-04T15:33:32Z"
    }
  ],
  "status": "pending",
  "updated_at": "2016-10-04T15:33:32Z"
}

Response

The approval requests were successfully processed.

Example response

{
  "paging": {
    "per_page": 100,
    "page": 1,
    "previous": "/api/v1/users?per_page=1000&page=1",
    "self": "/api/v1/users?per_page=1000&page=2",
    "next": "/api/v1/users?per_page=1000&page=3"
  },
  "data": [
    {
      "id": 890,
      "status": "pending",
      "approvable_id": 123,
      "approvable_type": "TimeEntry",
      "submitted_by": 8,
      "submitted_at": "2016-10-13T20:16:40Z"
    }
  ]
}