Overview
In this article, you’ll find tutorials addressing frequently asked questions about the PlanRadar API.
Find other tutorials in Open API Overview > API Tutorials.
How to Add an Item to a List?
This guide explains how to add a new item to an existing list using the PlanRadar API. The process consists of three sequential PUT requests: initializing a draft, adding the item, and saving the draft.
All three requests use the same endpoint:
PUT https://www.planradar.com/api/v2/{customer-id}/lists/{list-id}Prerequisites
Before you begin, make sure you have:
Your customer ID
For instructions on how to find your customer ID, please check PlanRadar IDs in Core API Concepts.The list ID
For instructions on how to find your list ID, please check PlanRadar IDs in Core API Concepts.A valid PlanRadar API key
For instructions on how to generate a PlanRadar API key, please check Authentication in Core API Concepts.UUIDs in valid UUID format
UUIDs can be freely generated and must follow the standard UUID format.
Step 1: Initialize a Draft
First, you need to initialize a draft for modifying the list.
Use a temporary UUID (temp-uuid) that will be reused in all following requests.
curl -X PUT 'https://www.planradar.com/api/v2/{customer-id}/lists/{list-id}' \
-H 'accept: application/vnd.api+json' \
-H 'content-type: application/vnd.api+json' \
-H 'X-PlanRadar-API-Key: {API_KEY}' \
-d '{
"data": {
"attributes": {
"temp-uuid": "c7982fd2-cf0c-4806-a3ef-f87447e80e5e",
"init_draft": true
}
}
}'
Explanation
temp-uuid: A temporary identifier used to track the draft.
init_draft: true: Starts a draft session for list modifications.
Step 2: Add an Item to the Draft
Next, add the new list item.
The uuid of the item can also be freely generated, as long as it is a valid UUID.
curl -X PUT 'https://www.planradar.com/api/v2/{customer-id}/lists/{list-id}' \
-H 'accept: application/vnd.api+json' \
-H 'content-type: application/vnd.api+json' \
-H 'X-PlanRadar-API-Key: {API_KEY}' \
-d '{
"data": {
"attributes": {
"temp-uuid": "c7982fd2-cf0c-4806-a3ef-f87447e80e5e",
"item": {
"name": "API",
"uuid": "c7982fd2-cf0c-4806-a3ef-f87447e80e5d",
"parent-id": null,
"order": 0
}
}
}
}'
Explanation
name: The display name of the list item.
uuid: Unique identifier for the new item.
parent-id: Set to null to create a top-level item.
order: Determines the position of the item within the list.
Step 3: Save the Draft
Finally, save the draft to persist the changes.
curl -X PUT 'https://www.planradar.com/api/v2/{customer-id}/lists/{list-id}' \
-H 'accept: application/vnd.api+json' \
-H 'content-type: application/vnd.api+json' \
-H 'X-PlanRadar-API-Key: {API_KEY}' \
-d '{
"data": {
"attributes": {
"temp-uuid": "c7982fd2-cf0c-4806-a3ef-f87447e80e5e",
"save": true
}
}
}'
Explanation
save: true: Finalizes the draft and applies the changes to the list.
Summary
To add an item to a list:
- Initialize a draft with init_draft.
- Add the item using the same temp-uuid.
- Save the draft to apply the changes.
All three requests must use the same temp-uuid.
Triggering a Flow When a Ticket Is Approved (Using Webhooks)
PlanRadar Connect does not provide a dedicated “When ticket is approved” trigger.
Instead, ticket approval changes are handled via the standard “Ticket Updated” webhook.
Each ticket contains an approval_status attribute. Whenever this attribute changes, the Ticket Updated webhook is triggered and sends the full ticket payload to your configured endpoint.
Your workflow must therefore evaluate the approval_status value and proceed only when it matches the desired approval state.
How It Works
When a ticket is updated, the webhook sends the complete ticket payload, including the approval_status attribute.
Your automation (e.g. PlanRadar Connect flow, custom script, Azure Logic App, etc.) should:
- Listen to the Ticket Updated webhook
- Check the value of approval_status
- Continue only if the value matches your required approval state
Since the webhook is triggered by almost any ticket update, adding proper conditions is essential to prevent unwanted executions.
Approval Status Transitions
The approval_status attribute supports the following transitions:
pending → approvedpending → rejectedpending → approved_with_commentspending → none(approval cancelled)
Your workflow logic should explicitly check for the desired values.
Recommended Trigger Conditions
To reliably trigger an automation only when a ticket is approved, configure your workflow conditions as follows:
Condition 1: Approval Status
Allow execution only if:
approval_status = approved
ORapproval_status = approved_with_comments
Condition 2: Ticket Status
Add an additional safeguard condition:
Ticket status is not Closed
(status-id != "gk")
This prevents the flow from triggering again after the ticket has already been processed.
Recommended Final Action
To avoid duplicate or repeated triggers:
Set the last step of your workflow to change the ticket status to Closed.
This ensures:
The automation runs only once
The ticket is clearly marked as processed
Future updates will not re-trigger the workflow
Best Practices
Always combine
approval_statuschecks with ticket status conditionsAvoid relying solely on webhook triggering (since it fires on most ticket updates)
Close the ticket (or change to a dedicated “Processed” status) at the end of your automation
Test your flow with each approval transition scenario
Summary
Although there is no standalone “When ticket is approved” trigger, you can fully replicate this behavior using:
The Ticket Updated webhook
Conditional logic based on
approval_statusAdditional ticket status safeguards
This approach ensures reliable, efficient, and optimized automation without needing scheduled approval checks.
If you need further assistance setting up your webhook or workflow logic, please contact PlanRadar Support.
Comments
0 comments
Please sign in to leave a comment.