Fold several steps into one text
const url = 'https://beta-api.plune.ai/v1/settings/steps/merge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ids":["6f1c2b3a-0000-4000-8000-0000000000f1"],"into":"Open the order and choose “Refund”."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/settings/steps/merge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ids": [ "6f1c2b3a-0000-4000-8000-0000000000f1" ], "into": "Open the order and choose “Refund”." }'Every live case carrying any step in ids has that action rewritten to into — the same per-case write as a rename, one transaction, one audit entry per case (D10). into need not exist yet: an existing row of that text is the survivor and keeps its note; else the first of ids is renamed in place. The other rows go with their links. An unknown id is a 404 before anything is written.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
The steps that go. Their carriers are rewritten to into.
The text every carrier ends up with. An existing step of that text is the survivor; else the first of ids is renamed in place and keeps its description.
Example
{ "ids": [ "6f1c2b3a-0000-4000-8000-0000000000f1" ], "into": "Open the order and choose “Refund”."}Responses
Section titled “ Responses ”The surviving step and how many cases were rewritten
object
One row of the Steps Database: the text of an action as manual cases carry it, with how many live cases carry it. Rows are written on every save of a manual case — each * line under ## Steps becomes one — and by hand here.
object
The action, trimmed. Unique within the project, case-sensitively.
A note for the author — what the step means, how to do it. Absent when there is none.
Live cases carrying the step. 0 for a step made by hand that no case uses yet, or orphaned by an edit.
Cases whose steps were rewritten — each got a version bump and an audit entry.
On a rename only: true when the new text already existed, so the step was folded into that row and step.id is the survivor’s, not the one patched.
Example
{ "step": { "id": "6f1c2b3a-0000-4000-8000-0000000000f3", "step": "Open the order and choose “Refund”.", "count": 1 }, "affected": 0}Invalid body
object
Example generated
{ "error": "example"}No / invalid token or session
One of ids is not a step of yours
object
Example generated
{ "error": "example"}Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over