Exporting Plan Item Event History

You can retrieve timeline history information on all plan items for a specific plan using the AchieveIt REST API. The data is returned as a JSON object and includes all updates (Progress Updates, Metric Updates, and Comments) that are made to a plan or plan item. You can retrieve this information for the full plan, or for specific plan items.

Request Specification

Endpoint URL

Make an HTTP POST request to one of the following endpoints:

 https://api.achieveit.com/exports/events/plans
 https://api.achieveit.com/exports/events/plan-items

Authorization Header

Include your API key as part of an authorization header. The API key must be associated with a user that has Plan-level admin access to all the plans you want to view.

Authorization: API-KEY <YOUR_API_KEY>

Parameters

The API has a set of required parameters that must be provided in the post in order to retrieve the correct information. The maximum number of activities that can be return per API request is 2000. Please review the "Paging and Fetching More Data" section to learn how to page through larger data sets.

Parameter Options

Parameter Type Default Description
start datetime Min value datetime The starting date and time you want to retrieve information from
end datetime Current datetime The ending date and time you want to retrieve information from
sortDirection string desc Either asc (ascending) or desc (descending).
ids string array n/a

For the /plans API, this parameter is optional and will default to the plans the API User has access to. You can optionally provide one or more Plan IDs.

For the /plan-items API, this parameter is required and must contain one or more Plan Item IDs.

Example Request

JSON object using cURL in Bash:

// Bash
curl -X POST "https://api.achieveit.com/events/plans" \
  -H "Authorization: API-KEY 12004478285f4f4eb21cd25e62ba5eb7" \
  -H "Content-Type: application/json" \
  -d '{
    "start": "2026-06-30",
    "end": "2026-06-30",
    "sortDirection": "asc",
    "ids": ["b93c6913-8ff8-4b77-3633-08de10d6989c"]
  }'

 

JSON object using PowerShell in Bash:

// PowerShell
# Define JSON payload
$json = @'
{
  "start": "2026-06-30",
  "end": "2026-06-30",
  "sortDirection": "asc",
  "ids": ["b93c6913-8ff8-4b77-3633-08de10d6989c"]
}
'@

# Send POST request
Invoke-RestMethod `
  -Uri "https://api.achieveit.com/events/plans" `
  -Method Post `
  -Headers @{ "Authorization" = "API-KEY 12004478285f4f4eb21cd25e62ba5eb7" } `
  -Body $json `
  -ContentType "application/json"

 


Response

Response Codes

The API returns one of the following HTTP status codes

Code Notes
200 OK Exporting the records was successful, and the content of the response includes the requested history details for each plan or plan item.
401 Unauthorized The user associated with the specified API key does not have access to the requested plans or plan items.

Example Response

If successful, the response body will be a JSON object that has two major properties:

  • events: An array of plan/plan item timeline history.

  • nextPageKey: If more records exist for your request, this value will be populated. See the "Paging and Fetch More Data" section below for more details.

{
  "events": [
    {
      "planItemId": "5e169ff7-c431-4601-7984-08de26ca9af7",
      "planItemName": "important goals",
      "changeType": "Modified",
      "changedAt": "2026-08-20T18:28:11.345077Z",
      "actor": {
          "id": "9ee85a65-5f4a-4a1d-9194-da7503bec1af",
          "name": "AchieveIt User",
          "email": "achieveit@email.com"
      },
      "previousValue": {
          "due": null,
          "start": null
      },
      "newValue": {
          "due": "2026-08-31T00:00:00Z",
          "start": "2026-08-01T00:00:00Z"
      }
    }
  ],
  "nextPageKey": "2026-06-30T00:00:00.0000000Z|c10f0ddd-8286-e118-fcc5-a5552741095a
}

 


Paging and Fetching More Data

Certain requests will return data sets that are larger than the 2000 item page size. In these instances, you will need to make multiple requests in order to get the full data set. You will know if your request contains more data if the response returns a value in the nextPageKey property. You can then use this value as a query parameter to fetch the next page of results.

Query Parameter

All parameter data should remain the same based on the initial request you made. The only difference is that you will need to include a query parameter passing the nextPageKey that you received from the previous request.

Query Parameter Options

Parameter Type Default Description
nextPageKey string n/a This value is used as a query parameter to fetch the next page of results. The response will only contain the nextPageKey if more than 2000 records existing for your query.

Example Request

JSON object using cURL in Bash:

// Bash
curl -X POST "https://api.achieveit.com/events/plans?nextPageKey=''" \
  -H "Authorization: API-KEY 12004478285f4f4eb21cd25e62ba5eb7" \
  -H "Content-Type: application/json" \
  -d '{
    "start": "2026-06-30",
    "end": "2026-06-30",
    "ids": ["b93c6913-8ff8-4b77-3633-08de10d6989c"]
  }'

 

JSON object using PowerShell in Bash:

// PowerShell
# Define JSON payload
$json = @'
{
  "start": "2026-06-30",
  "end": "2026-06-30",
  "ids": ["b93c6913-8ff8-4b77-3633-08de10d6989c"]
}
'@

# Send POST request
Invoke-RestMethod `
  -Uri "https://api.achieveit.com/events/plans?nextPageKey=''" `
  -Method Post `
  -Headers @{ "Authorization" = "API-KEY 12004478285f4f4eb21cd25e62ba5eb7" } `
  -Body $json `
  -ContentType "application/json"

 


Exporting Plan Details

The above export APIs focus on returning information about the timeline history. However, you may want to see a more detailed export of the entire plan or plan item. In this case, AchieveIt offers two export APIs that will return full detailed information about a plan.