Plan Events API Code Samples
Selection of code samples that demonstrate the use of the Plan Events API. Copy and edit these code samples to suit your needs.
When using the code samples, remember to replace:
- {vanity_name} with your tenant name
- {api_key} with your API key
- {security_token} with a valid security token
These code samples may not include all available parameters and request body fields for each endpoint. For the endpoint's full request schema, see "Plan Events" in API Reference.
Retrieve planning events
Use this sample request to retrieve planning events with the following attributes:
- Event type:
memberPromoted,autoPromotion, andbulkPromotionDemotionEvent. - Limit: 10
- Created on or after: 2025-04-18
curl --location --request GET 'https://{vanity_name}.api.visier.io/v1/planning/data/events?planId=26096e86-4f8b-403e-9f05-aad2da09c7c1&fromDate=1745000000000&eventTypes=memberPromoted&eventTypes=autoPromotion&eventTypes=bulkPromotionDemotionEvent&limit=10&start=0' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}'
The response returns a list of matching event summaries and the limit used for the request.
{
"events": [{
"eventId": "81db3570-8582-4c6c-9e6b-4849328a94df",
"planId": "26096e86-4f8b-403e-9f05-aad2da09c7c1",
"eventType": "memberPromoted",
"createdDate": "1787607295631",
"user": "john@jupiter.com"
}, {
"eventId": "995bcff7-d675-4148-80d1-d276ec75c492",
"planId": "26096e86-4f8b-403e-9f05-aad2da09c7c1",
"eventType": "memberPromoted",
"createdDate": "1787609738701",
"user": "john@jupiter.com"
}],
"limit": 10
}
Retrieve a planning event
Use this sample request to retrieve the full details of a single memberPromoted event, including the promoted row's member path.
curl --location --request GET 'https://{vanity_name}.api.visier.io/v1/planning/data/events/0181d69b-3c74-4825-ba3b-b9c3c382eeac' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}'
The response returns the event's details, along with the full member path of the promoted row across every plan segment.
{
"eventId": "0181d69b-3c74-4825-ba3b-b9c3c382eeac",
"planId": "9abe7ea6-87c4-48c3-989a-99d1b5ddfb33",
"eventType": "memberPromoted",
"createdDate": "1781740055460",
"user": "john@jupiter.com",
"promotionData": {
"promotedRows": [
{
"memberPath": [
{
"dimensionId": "Organization_Hierarchy",
"levelId": "Level_2",
"memberId": "[Organization_Hierarchy].[6]",
"displayName": "Sales & Mkt",
"namePath": [
"1",
"6"
]
},
{
"dimensionId": "Organization_Hierarchy",
"levelId": "Level_3",
"memberId": "[Organization_Hierarchy].[10]",
"displayName": "Sales Opp",
"namePath": [
"1",
"6",
"10"
]
},
{
"dimensionId": "Organization_Hierarchy",
"levelId": "Level_4",
"memberId": "[Organization_Hierarchy].[231]",
"displayName": "Sales Strategy",
"namePath": [
"1",
"6",
"10",
"231"
]
},
{
"dimensionId": "Location",
"levelId": "Location_2",
"memberId": "[Location].[US].[Colorado]",
"displayName": "Colorado",
"namePath": [
"US",
"Colorado"
]
}
]
}
]
}
}
