Create a job preset
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/job-presets/v1-job-preset-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/
Saves a job preset, a ready-made job: a name, an optional note, the service lines (service), the tasks (pipeline), the people on the job (assigned_users) and files (mockup, production_file). It goes to the end of the list.
Each service line names a service, one of its options and where it goes on the product. Each task names the task preset it follows and who does it. Files are uploaded first with "Upload a file", then attached here by the upload's id; give a new service line a tmpid- id to link a file to it in the same request. Everything is checked against your team first; if anything doesn't match, nothing is saved.
Returns the new preset.
Business rules
- Everything is checked against your team before anything is saved, and the whole save is one transaction: one refusal saves nothing.
- A new line, task or person, and any reference you change, must be live: a service, saved location and task preset that aren't deleted, and people who are active members of your team. An
updateline that keeps a deleted service, location or task preset, or a person who has left, still saves. - A service
optionthe service doesn't have still saves, but the preset readsis_valid: false. - Top-level
assigned_userssets the people on the job itself: sent, it replaces them ([]removes everyone); left out, they stay. On a taskupdateline,assigned_usersworks the same way; a taskcreateline without it has nobody. - Files: a
createrow attaches a file you uploaded with "Upload a file" and not yet attached anywhere; a mockup must be an image.updateanddeleterows act only on this preset's own files; one that is already gone is skipped.
Side effects
- Attaching an upload moves it onto the preset: it is no longer a free upload.
- Team members who have YoPrint open see the new preset 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.
assigned_usersarray of objectsThe people on the job itself. Each must be an active member of your team.
Fields of each item (1)
A team member's id, from
GET /v1/api/store/{team_slug}/setting/user.
mockuparray of objectsMockup images. A
createrow must be an image file.Fields of each item (6)
Send
create: it attaches a file you uploaded with "Upload a file" (POST /v1/api/store/{team_slug}/async_upload). A new preset has no files toupdateordeleteyet.- One of:
"create","update","delete"
- One of:
For
create, the upload'sid. Forupdateanddelete, the file'sidfrom the preset'smockuplist.job_servicestring | arrayThe service line, or a list of them, this file belongs to: a line's
id, or thetmpid-id of a line created in the same request. Ids that are not lines of this preset are ignored. When sent, it replaces the file's links;[]removes them.namestringThe file's display name. Left out, it keeps its name.
positionintegerFor
update: where the file sorts among the preset's mockups. Acreaterow always goes last.show_in_pdfbooleanWhether the mockup shows on PDFs. Jobs made from the preset keep the setting.
notestring | nullpipelinearray of objectsFields of each item (6)
Required, but every task is created on a new preset whatever you send. Send
create.- One of:
"create","update","delete"
- One of:
assigned_usersarray of objectsWho the task is assigned to; without it, nobody. Each must be an active member of your team.
Fields of each item (1)
A team member's id, from
GET /v1/api/store/{team_slug}/setting/user.
namestringThe task's name.
notestring | nullpipeline_idstringThe task preset this task follows, from
GET /v1/api/store/{team_slug}/setting/pipeline. Required unlessactionisdelete. A new task, or one that changes it, needs a task preset that isn't deleted.positioninteger- Minimum -2147483648
- Maximum 2147483647
production_filearray of objectsProduction files, of any type.
Fields of each item (6)
Send
create: it attaches a file you uploaded with "Upload a file" (POST /v1/api/store/{team_slug}/async_upload). A new preset has no files toupdateordeleteyet.- One of:
"create","update","delete"
- One of:
For
create, the upload'sid. Forupdateanddelete, the file'sidfrom the preset'sproduction_filelist.job_servicestring | arrayThe service line, or a list of them, this file belongs to: a line's
id, or thetmpid-id of a line created in the same request. Ids that are not lines of this preset are ignored. When sent, it replaces the file's links;[]removes them.namestringThe file's display name. Left out, it keeps its name.
positionintegerFor
update: where the file sorts among the preset's production files. Acreaterow always goes last.show_in_pdfbooleanSaved on the file and copied to jobs made from the preset.
servicearray of objectsFields of each item (8)
Required, but every line is created on a new preset whatever you send. Send
create.- One of:
"create","update","delete"
- One of:
customer_notestring | nullA note the customer sees. Jobs made from the preset get it on their service.
idstringOptional: a temporary id that starts with
tmpid-(such astmpid-1), so a file row in the same request can name this line injob_service.locationobjectWhere the service goes on the product. Required unless
actionisdelete.Child fields (3)
database: one of your saved service locations, byid(fromGET /v1/api/store/{team_slug}/service_location).custom: a one-off location, byname.- One of:
"database","custom"
- One of:
idstringRequired when
typeisdatabase. A new or changed location must not be deleted. Ignored forcustom.namestringRequired when
typeiscustom.
notestring | nullA production note for this service.
optionstringOne of the service's options (a column of its price table). Required unless
actionisdelete. Any value saves, but one the service doesn't have marks the presetis_valid: false.positionintegerOrder of the service lines. Required unless
actionisdelete.- Minimum -2147483648
- Maximum 2147483647
service_idstringThe decoration service ID. Required unless
actionisdelete. The service must be active (not deleted). Services are not listed directly on the public API; copyservice_idfrom an existing job preset (List job presets) or from a job's services.
Response
200Successful response.
Child fields (12)
The people on the job itself. Jobs made from the preset get the ones still on your team.
Fields of each item (4)
Their profile picture, or null.
True when the person was deleted or is no longer on your team. They stay listed until someone takes them off; jobs made from the preset leave them out.
False when a service, saved location, or task preset it uses was deleted, or a service option no longer exists.
Mockup images, in their order.
Fields of each item (19)
- One of:
"mockup","production_file"
- One of:
When the file record was made: the upload time, or for a duplicated preset, when it was copied.
The file's id: use it in
updateanddeletefile rows.The preset the file belongs to.
The ids of this preset's service lines the file belongs to. A job made from the preset links its copy to the matching new services.
The display name.
Where the file sorts, lowest first.
Preview image links
small,mediumandlarge(250, 800 and 1200 px), or null when there is no preview.Null when it was never set.
Bytes.
Always null on a preset's files.
Where to download the file.
A signed link to view the file. It expires: read it fresh, and don't store it.
dimensionsobject | nullPixel size of an image, read from its header; null for other files and for images uploaded before the size was recorded.
preview_statestringready: the preview links work.processing: an image over 10 MB whose stored preview a worker is still making (seconds); read the file again, or in the web app wait formedia.preview_state_changedon the team channel.too_large: an image over 120 megapixels; it never gets a preview.failed: the worker gave up.none: not an image.- One of:
"ready","processing","too_large","failed","none"
- One of:
True when the preset needs review (shown as "Needs review" in the web app):
is_validis false (a service, service option, saved location, or task preset was deleted)- A team member assigned to one of its tasks was deleted or left the team (assignees on the job itself do not trigger review)
A preset that needs review still saves. Creating a job from it omits missing tasks and removed teammates.
The tasks.
Fields of each item (11)
assigned_usersarray of objects- Same fields as
data.assigned_users.
- Same fields as
idstringis_validbooleannamestring | nullnotestring | nullpipelineobject | nullThe task preset it follows, as
GET /v1/api/store/{team_slug}/setting/pipeline/{hash_id}returns it:id,label,color,version,enable,trashed, and itsstatuses(deleted ones included).Child fields (7)
colorstringenablebooleanidstringlabelstringstatusesarray of objectsFields of each item (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.
trashedbooleanversioninteger
pipeline_colorstring | nullThe task preset's color.
pipeline_idstringpipeline_namestring | nullThe task preset's name.
positioninteger0 when none was sent.
trashedbooleanTrue when its task preset was deleted.
Sort order within the preset list, lowest first. A decimal string, such as
"1.0000000000000000"; parse it as a decimal.Production files, in their order.
- Same fields as
data.mockup.
- Same fields as
The service lines.
Fields of each item (11)
versioninteger- Always
1
- Always
customer_notestring | nullidstringlocationobjecttype,display_nameandtrashed(true when a saved location was deleted), plusidfor a saved location ornamefor a custom one.notestring | nulloptionstring | nullpositionintegerreview_reasonstring | nullWhy the line needs review: its service was deleted, the service no longer has this option, or its saved location was deleted. Null when the line is fine.
- One of:
"service_removed","option_removed","location_removed"
- One of:
service_idstringservice_namestring | nullvalidbooleanFalse when
review_reasonis set.
When the preset was last edited ("Last edited" in the web app). Every save changes it, even one that changes only its lines; reordering presets doesn't.
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.- When
- A
createfile row names no upload of your team, or anupdateordeletefile row names a file that isn't this preset's.error.codeis null. - Fix
- Use the upload's
id, or a fileidfrom the preset.
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
nameis missing (create), a line or file row has noaction, a file row has noid, or a service line missesservice_id,option,location.typeorposition(validation_failed).- Fix
- Send every required field; see the schema.
- When
- A service, location, task preset or person is not your team's, or is deleted where a live one is needed; or a file row names a file that isn't a free upload, or a mockup that isn't an image.
error.codejob_validation_error, with a message such as "Service not found!", "Assigned User not found!", "Please upload this file before adding it to a job preset." or "Mockups must be image files." - Fix
- Use ids from your own team's lists, and upload files first.
Related
- POSTUpload a file
/v1/ api/ store/ {team_slug}/ async_upload - PATCHTouch a job preset
/v1/ api/ store/ {team_slug}/ setting/ job_preset/ {hash_id} - POSTDuplicate a job preset
/v1/ api/ store/ {team_slug}/ setting/ job_preset/ {hash_id}/ duplicate - GETList task presets
/v1/ api/ store/ {team_slug}/ setting/ pipeline
