Email an approval request to the customer
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/approvals/v1-approvals-send-to-customer.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.
PATCH/
Emails the customer a link to the approval in the customer portal. Use it to send a new approval, or to remind them. A pending approval becomes sent-to-customer; sending again later emails again and leaves the status as it is.
The email goes to the order's message participants who receive email (can_receive_mail true and status all or message), or, if there are none, the order's contact. The subject starts with the sales order or quote number in brackets (with the customer PO number, if any), then "Job - <job name> Artwork Approval Required" for a job approval or "Order Approval Required" for an order approval. It is email only, never SMS. Send no body.
Email limit: if your team makes more than 60 of these calls in a minute, or goes over the daily email limit for its plan, YoPrint blocks email sending for your whole team until YoPrint support lifts the block. Never call this in a loop.
Returns the approval.
Business rules
- The approval must not be completed, and its order must be saved: not a draft, and not an unsaved edit copy.
- Someone on the order must be able to receive email.
- At most 60 calls a minute for your whole team. The 61st call is refused and blocks your team's email sending: from then on this operation, sending order details, payment reminders and approval reminders, and sending message templates are refused with 422 until YoPrint support lifts the block.
Side effects
- Sends an email to the customer, recorded in the order's messages.
- Logs "approval sent" in the order's activity.
- A
pendingapproval becomessent-to-customer; for an order approval, the order's approval status does too. - People with the order open, and the customer's open Customer Portal pages, see the change live. No webhook fires on sending.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The approval's
id, from the approvals list. A hash id; unique keys and document numbers are refused with 404.- Example
Fi0zPeMlwKadEo
- Example
Request body
This operation takes no request body.
Response
200Successful response.
Child fields (26)
approved_bystringcontactwhen a Customer Portal contact completed it (approved_by_contact_id).userwhen a team member completed it. Otherwisecustomer, even before anyone has approved it.- One of:
"contact","user","customer"
- One of:
approved_by_contact_idstring | nullThe contact who completed it in the Customer Portal, when YoPrint knows which contact it was. Null otherwise.
approved_by_userstring | nullThe hash id of the team member who completed it on the customer's behalf, if any.
completedbooleanTrue once the customer finished, whether they approved or asked for changes.
completed_atstring (date-time) | nullcreated_atstring (date-time)customer_last_viewed_contact_idstring | nullThe last contact known to have opened it in the Customer Portal. Null when none is known.
customer_last_viewed_datestring (date-time) | nullidstringitemsarray of objectsJob approvals: each mockup file or design, in order, with its own status and notes.
mediaitems also carry the file's details and expiring links;mockup_designitems carry the design's revision and page previews. An empty list for order approvals.Fields of each item (9)
idstringThe item's id.
media_idstring | nullmediaitems: the file's id.mockup_design_idstring | nullmockup_designitems: the design's id.namestring | nullnotes_from_customerstring | nullnotes_to_customerstring | nullpositionintegerstatusstring- One of:
"pending-approval","approved","need-changes"
- One of:
typestringmedia: an uploaded mockup file.mockup_design: a design made in the mockup designer.- One of:
"media","mockup_design"
- One of:
job_idstring | nullJob approvals only.
job_namestringAn empty string for order approvals.
job_scoped_idstringThe job number, such as
JOB-1001. An empty string for order approvals.mockuparray of objects | nullJob approvals: the uploaded mockup files only (designs are only in
items); an empty list when there are none. Null for order approvals.Fields of each item (11)
created_atstring (date-time)file_namestringidstringThe same id as the matching
mediaitem initems.media_idstringThe file's id.
mime_typestringnamestringnotes_from_customerstring | nullnotes_to_customerstring | nullpositionintegerstatusstring- One of:
"pending-approval","approved","need-changes"
- One of:
urlstringA signed download link. It expires; don't store it.
notes_from_customerstring | nullnotes_to_customerstring | nullorder_external_typestring | nullorder_idstring | nullorder_object_typestring | nullsales_orderorquote.- One of:
"sales_order","quote"
- One of:
order_quotebooleanTrue when the approval is on a quote.
order_scoped_idstringThe order or quote number.
request_bystring | nullA team member's hash id, or null. Approvals created in the web app or through the API are null here: neither records who requested them.
signaturestring | nullThe customer's signature, when they signed.
signed_terms_textstring | nullThe terms the customer agreed to when signing.
statusstringpending: not sent yet.sent-to-customer: emailed.viewed-by-customer: the customer opened it.need-changes: the customer finished and asked for changes ("Review requested").completed: approved.- One of:
"pending","sent-to-customer","viewed-by-customer","need-changes","completed"
- One of:
typestringjob: artwork approval for one job's mockups.order: approval of the whole order.- One of:
"job","order"
- One of:
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.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
- No approval of this team has this id.
- Fix
- Use an
idfrom the approvals list.
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
- Nobody on the order has an email address (
approval_email_no_recipient). - Fix
- Add a contact with an email address to the order, then send again.
- When
- The approval is completed, or the order is still a draft or an unsaved edit copy (
approval_already_completed, "You cannot send completed approval to customer again."). - Fix
- Create a new approval, or save the order first.
- When
- The order came from Shopify (
shopify_approval_workflow_locked). - Fix
- Shopify orders do not use approvals in YoPrint.
- When
- Your team called this more than 60 times in a minute, or its email sending was already blocked (
validation_error, "You are sending too many emails in a short period of time..."). - Fix
- Contact YoPrint support. Space out bulk sends to stay well under 60 a minute.
Notes
- Don't loop this over many approvals quickly: the per-team limit counts every call that reaches it, including ones that then fail with 404 or 422, and going over it blocks your team's email sending until support lifts it.
Related
- GETList approvals
/v1/ api/ store/ {team_slug}/ approvals - DELETEDelete an approval
/v1/ api/ store/ {team_slug}/ approvals/ {hash_id}
