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 subplans

Use this sample request to patch existing subplans in bulk.

Copy
cURL sample request: Consolidate and reopen subplans in bulk
curl --location --request PATCH 'https://{vanity_name}.api.visier.i/v1alpha/planning/data/plans' \
-H 'apikey: {api_key}' \
-H 'Cookie: VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
-d '{
    "plans": [
        {
            "planId": "26096e86-4f8b-403e-9f05-aad2da09c7c1",
            "actionType": "Consolidate",
            "consolidateActionPayload": {
                "autoRollup": true,
                "includedSubPlans": ["74432834-6465-4d63-bd41-d953d45e1f45", "d4acda51-c612-4dc3-9dd3-40916c0109f3", "203578ee-fd5c-42c6-b37e-5c74f844e95c"]
            }
        },
        {
            "planId": "d4acda51-c612-4dc3-9dd3-40916c0109f3",
            "actionType": "Reopen",
            "reopenActionPayload": {
                "dueDate": "1752624000000",
                "assignee": "john@jupiter.com"
            }
        }
    ]
}'

The response returns whether the subplans were successfully updated.

Partially update a subplan

Use this sample request to consolidate an existing subplan.

Copy
cURL sample request: Consolidate subplans into the main plan
curl --location --request PATCH 'https://{vanity_name}.api.visier.io/v1alpha/planning/data/plans/26096e86-4f8b-403e-9f05-aad2da09c7c1' \
-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.

Use this sample request to reopen an existing subplan.

Copy
cURL sample request: Reopen subplan 74432834-6465-4d63-bd41-d953d45e1f45
curl --location --request PATCH 'https://{vanity_name}.api.visier.io/v1alpha/planning/data/plans/74432834-6465-4d63-bd41-d953d45e1f45' \
-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.