Tasks - Approvals API

List all approvals of a task

List all approvals of the task with a specific ID:

GET /tasks/:id/approvals

Response

Status: 200 OK
[
  {
    "approver": {
      "id": 390,
      "name": "Mark Camillo",
      "account": {
        "id": "wna",
        "name": "Widget North America"
      }
    },
    "attachment": {
      "name": "change-1709-summary-for-mark-camillo.pdf",
      "uri": "https://itrp.s3.amazonaws.com/attachments/change-1709-summary-for-mark-camillo.pdf?AWSAccessKeyId=TN5W...DR3Q&Signature=VY2t...GnT&Expires=1409976714",
      "size": 27649
    },
    "created_at": "2014-09-04T23:04:16-05:00",
    "id": 84,
    "planned_effort": 2,
    "status": "assigned",
    "updated_at": "2014-09-04T23:04:16-05:00",
    "account": {
      "id": "wna",
      "name": "Widget North America"
    }
  },
  {
    "approver": {
      "id": 5,
      "name": "Howard Tanner"
    },
    "attachment": {
      "name": "change-1709-summary-for-howard-tanner.pdf",
      "uri": "https://itrp.s3.amazonaws.com/attachments/task_approvals/change-1709-summary-for-howard-tanner.pdf?AWSAccessKeyId=TDRH...EO3P&Signature=WW6z...FkU&Expires=1409976714",
      "size": 26984
    },
    "created_at": "2014-09-04T23:04:16-05:00",
    "id": 85,
    "planned_effort": 2,
    "status": "approved",
    "updated_at": "2014-09-04T23:04:42-05:00"
  },
  "..."
]

The response contains these fields by default.

Add an approval to a task

Add an approval to a task with a specific ID.

POST /tasks/:id/approvals

When creating a new approval for a task these fields are available.

Response

Status: 200 OK
{
  "approver": {
    "id": 390,
    "name": "Mark Camillo",
    "account": {
      "id": "wna",
      "name": "Widget North America"
    }
  },
  "attachment": {
    "name": "change-1709-summary-for-mark-camillo.pdf",
    "uri": "https://itrp.s3.amazonaws.com/attachments/change-1709-summary-for-mark-camillo.pdf?AWSAccessKeyId=TN5W...DR3Q&Signature=VY2t...GnT&Expires=1409976714",
    "size": 27649
  },
  "created_at": "2014-09-04T23:04:16-05:00",
  "id": 84,
  "planned_effort": 2,
  "status": "assigned",
  "updated_at": "2014-09-04T23:04:16-05:00",
  "account": {
    "id": "wna",
    "name": "Widget North America"
  }
}

Update an approval of a task

Update an approval of a task with a specific ID.

PATCH /tasks/:id/approvals/:approval_id

When updating an existing approval for a task these fields are available.

Response

Status: 200 OK
{
  "status": "registered",
  "...": "..."
}

Remove an approval from a task

Remove an approval with a specific ID from a task with a specific ID.

DELETE /tasks/:id/approvals/:approval_id

Response

Status: 204 No Content

Remove all approvals from a task

Remove all approval from a task with a specific ID.

DELETE /tasks/:id/approvals/

Response

Status: 204 No Content

Fields

approver_id
Required reference to Person — The ID of the person who is selected as the approver for the approval.
attachment
Readonly link to Change Summary — The hyperlink to the Change Summary PDF file that was generated for the approver when the approval was last set to the status assigned.
created_at
Readonly datetime — The date and time at which the approval was created.
id
Readonly integer — The unique ID of the approval.
planned_effort
Optional integer — The Planned effort field is used to specify how much time the approver is expected to spend working on the task.
status
Readonly enum — The status of the approval. Valid values are:
  • registered
  • assigned
  • rejected
  • approved
  • canceled
updated_at
Readonly datetime — The date and time of the last update of the approval. If the approval has had no updates it contains the created_at value.