Plan Administration API Code Samples
Selection of code samples that demonstrate the use of the Plan Administration 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 Administration" in API Reference.
Partially update a subplan
Use this sample request to consolidate an existing subplan.
curl --location --request PATCH 'https://{vanity_name}.api.visier.io/v1alpha/planning/data/plans/26096e86-4f8b-403e-9f05-aad2da09c7c1/scenarios/44b3be0b-f404-44ee-aa2c-5f54a830cbf4' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"actionType": "Consolidate",
"consolidateActionPayload": {
"includedSubPlans": ["74432834-6465-4d63-bd41-d953d45e1f45", "d4acda51-c612-4dc3-9dd3-40916c0109f3", "203578ee-fd5c-42c6-b37e-5c74f844e95c"],
"autoRollup": true
}
}'
The response returns whether the subplans were successfully consolidated.

{
"actionResults": [
{
"planId": "74432834-6465-4d63-bd41-d953d45e1f45",
"success": true
},
{
"planId": "d4acda51-c612-4dc3-9dd3-40916c0109f3",
"success": true
},
{
"planId": "203578ee-fd5c-42c6-b37e-5c74f844e95c",
"error": {
"rci": "RCIP991008",
"message": "The operation Consolidate failed because the plan 203578ee-fd5c-42c6-b37e-5c74f844e95c is not in the expected state. The plan needs to be either submitted or submitted with conflict."
}
}
]
}
Use this sample request to submit an existing subplan.
curl --location --request PATCH 'https://{vanity_name}.api.visier.io/v1alpha/planning/data/plans/93668189-8734-4cd8-b340-e9bb9f4a38f0/scenarios/44b3be0b-f404-44ee-aa2c-5f54a830cbf4' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"actionType": "Submit",
"submitActionPayload": {
"comment": "by postman"
}
}'
The response returns whether the subplan was successfully submitted.

{
"actionResults": [
{
"planId": "93668189-8734-4cd8-b340-e9bb9f4a38f0",
"success": true
}
]
}
Use this sample request to reopen an existing subplan.
curl --location --request PATCH 'https://{vanity_name}.api.visier.io/v1alpha/planning/data/plans/74432834-6465-4d63-bd41-d953d45e1f45/scenarios/44b3be0b-f404-44ee-aa2c-5f54a830cbf4' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"actionType": "Reopen",
"reopenActionPayload": {
"dueDate": "1752624000000",
"assignee": "john@jupiter.com"
}
}'
The response returns whether the subplan was successfully reopened.

{
"actionResults": [
{
"planId": "74432834-6465-4d63-bd41-d953d45e1f45",
"success": true
}
]
}
Use this sample request to start collaboration.
curl --location --request PATCH 'https://{vanity_name}.api.visier.io/v1alpha/planning/data/plans/93668189-8734-4cd8-b340-e9bb9f4a38f0/scenarios/44b3be0b-f404-44ee-aa2c-5f54a830cbf4' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"actionType": "StartCollaboration",
"startCollaborationActionPayload": {
"startDate": 1756849468112,
"dueDate": 1758059068112
}
}'
The response returns whether collaboration was successfully started.

{
"actionResults": [
{
"planId": "93668189-8734-4cd8-b340-e9bb9f4a38f0",
"success": true
}
]
}
Use this sample request to end collaboration.
curl --location --request PATCH 'https://{vanity_name}.api.visier.io/v1alpha/planning/data/plans/93668189-8734-4cd8-b340-e9bb9f4a38f0/scenarios/44b3be0b-f404-44ee-aa2c-5f54a830cbf4' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
"actionType": "EndCollaboration",
"endCollaborationActionPayload": {
"actionWhenUnconsolidatedPlansExists": "Ignore"
}
}'
The response returns whether collaboration was successfully ended.

{
"actionResults": [
{
"planId": "93668189-8734-4cd8-b340-e9bb9f4a38f0",
"success": true
}
]
}