Create a status
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/statuses/v1-status-store.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
POST/
Adds an in-between status (type: in_progress) to one list: sales orders, quotes, jobs, purchase orders, shipments, message threads, or the tasks of a task preset.
Every list already has one starting and one ending status, which you can rename but not add. To move the start or end marker to another status, use "Save a set of status changes" (POST /v1/api/store/{team_slug}/setting/status/sync).
Returns the new status.
Business rules
- Only
type: in_progresssaves.pre_productionpasses validation but fails with 500;startandendare refused with 422. pipeline_idis required whenroleispipeline, and ignored for every other role.- Labels don't have to be unique.
Side effects
- Team members who have YoPrint open see the new status at once.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
Request body
application/json, required.
Must be
in_progress. Other types cannot be created with this operation (to create or changestartorendstatuses, use Save a set of status changes).- Always
"in_progress"
- Always
A hex color with the
#, 3 or 6 digits:#1e88e5.- Matches
^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
- Matches
The name your team sees.
Which status list to add it to:
order: sales ordersquote: quotesjob: jobspurchase_order: purchase ordersshipment: shipmentscustomer_message: message threadspipeline: tasks within a task preset (requirespipeline_id)
- One of:
"order","quote","job","purchase_order","shipment","customer_message","pipeline"
customer_labelstringOptional. What customers see in the customer portal.
pipeline_idstringRequired when
roleispipeline: the ID of the task preset this status belongs to. Ignored for other roles.positionintegerSort order within the list. Defaults to 0.
- Minimum -2147483648
- Maximum 2147483647
More examples (1)
A task status in a task preset
curl -X POST 'https://secure.yoprint.com/v1/api/store/your-team/setting/status' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' \ -H 'X-Yoprint-Decimal-Format: exact-v1' \ -H 'Content-Type: application/json' \ -d '{ "color": "#43a047", "label": "Screens burned", "pipeline_id": "eIOQnV5PP0pp7c", "position": 1, "role": "pipeline", "type": "in_progress" }'Response
200Successful response.
Child fields (9)
What customers see in the customer portal. When none is set:
Pendingforstart,In Progressforin_progressandpre_production,Completedforend.Sort order within the list, lowest first.
Which list the status belongs to:
order: sales ordersquote: quotesjob: jobspurchase_order: purchase ordersshipment: shipmentscustomer_message: message threadspipeline: tasks within a task preset
- One of:
"order","quote","job","purchase_order","shipment","customer_message","pipeline"
True for a deleted status. Only the full list includes deleted ones.
The stage of the status in the workflow:
start(first status in the list),pre_production,in_progress, orend(final status).- One of:
"start","pre_production","in_progress","end"
- One of:
pipeline_idstringThe task preset, for
pipelinestatuses only. Absent for every other role.
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.- When
- Your role lacks Manage Settings. The body is
{"message": "Insufficient Permission"}, without the error envelope. - Fix
- Use the key of a member whose role has Manage Settings, or the owner's.
404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.422The request was refused and changed nothing.
validation_failedlists what to fix inerror.fields; other codes name a business rule, explained inerror.message. A few checks answer with only{"message": "..."}. An operation that calls another service (a payment provider, a carrier, an accounting app) can answerconnect_timeout("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.- When
- A required field is missing,
coloris not a hex color, ortypeorroleis not an allowed value (validation_failed, witherror.fields). - Fix
- Send
label,colorlike#1e88e5,type: in_progressand arolefrom the list.
500A business rule refused the request (see the operation's errors), or something failed inside YoPrint. Refusals use the error envelope with a code such as
action_not_allowed; an unexpected failure answers{"message": "Server Error"}. Repeating a refusal gets the same answer; after an unexpected failure, read the record back before you retry a change.- When
typeispre_production. The body is{"message": "Server Error"}, without the error envelope.- Fix
- Send
type: in_progress. Nothing was saved.
Related
- PATCHUpdate a status without checks
/v1/ api/ store/ {team_slug}/ setting/ status/ {status_reference} - POSTSave a set of status changes
/v1/ api/ store/ {team_slug}/ setting/ status/ {status_reference} - GETList sales order statuses
/v1/ api/ store/ {team_slug}/ setting/ status/ sales_order
