POST
/v1/postbatches/{id}/cancelCancel a Postbatch
Allowed in DRAFT, IMPORTING, VALIDATED, PENDING_APPROVAL and APPROVED (and APPROVING after a failed approval): answers 202 with the Postbatch; a job cancels the open items a thousand at a time with their reservations released, its progress in `bulkAction` (done of total), and then the Postbatch is CANCELLED with postbatch.cancelled. Items already in production stay. Asking again while the job works answers it as it is; after a failed job it starts again; a CANCELLED Postbatch answers invalid_postbatch_transition.
Scope
postbatches.writePath parameters
idstringrequiredReturns
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-timerequiredResponses
202Success
401Authentication required or API key invalid
403Permission or scope missing, organisation suspended
404Not found
429Rate limited for this API key and class; wait Retry-After seconds
otherError (RFC 9457 problem details)