/v1/postbatches/{id}/approveApprove a Postbatch
Pins the template version, locks the quote in a price snapshot, checks the balance or the credit for the whole quote and answers 202 with the Postbatch APPROVING; a job then moves every valid item to READY with its reservation for the next planned run or a later planned run of the product group (targetRunId), a thousand at a time, with its progress in `approval` (done of total). The Postbatch becomes APPROVED when every item is released; when the balance runs out halfway it returns to VALIDATED (or PENDING_APPROVAL) with `approval.state` refused, the released items kept, and approving again goes on. Approving an APPROVING Postbatch answers it as it is, or starts a failed approval again. Items that need attention are skipped only with skipInvalid.
postbatches.approvePath parameters
idstringrequiredBody
targetRunIdstringmin length 1max length 40skipInvalidbooleandefault falseReturns
21 fields of the 202 answer
idstringrequirednamestringrequiredcampaignIdstring or nullrequiredadvertisingCategorystring or nullrequiredstatusenumrequiredDRAFTIMPORTINGVALIDATEDPENDING_APPROVALAPPROVINGAPPROVEDSCHEDULED_FOR_RUNIN_PRODUCTIONCOMPLETEDCANCELLEDtemplateIdstringrequiredtemplateVersionIdstringrequiredproductobjectrequired4 fields
idstringrequiredspecificationIdstringrequiredfinishstringrequireddestinationstringrequiredpostKindenumrequiredADVERTISING_CUSTOMERSADVERTISING_NON_CUSTOMERSNO_ADVERTISINGcountsobjectrequiredimportIdstring or nullrequiredapprovedAtdate-time or nullrequiredtargetRunIdstring or nullrequiredpriceSnapshotIdstring or nullrequireditemCountAtApprovalinteger or nullrequiredapprovalobject or nullrequired9 fields
stateenumrequiredworkingfailedrefuseddonedoneintegerrequiredtotalintegerrequiredskippedintegerrequiredrunsarray of stringrequiredcodestring or nullrequirederrorstring or nullrequiredstartedAtdate-timerequiredfinishedAtdate-time or nullrequiredbulkActionobject or nullrequired7 fields
kindenumrequiredcancelskip_attentionstateenumrequiredworkingfaileddonedoneintegerrequiredtotalintegerrequirederrorstring or nullrequiredstartedAtdate-timerequiredfinishedAtdate-time or nullrequiredcancelledAtdate-time or nullrequiredcompletedAtdate-time or nullrequiredcreatedAtdate-timerequiredupdatedAtdate-timerequired