POST
/v1/postbatchesCreate a Postbatch
A Postbatch starts in DRAFT with a published template version, the finish and the destination; the product follows from the template. Upload the CSV next.
Scope
postbatches.writeIdempotent with a keyHeaders
Idempotency-Keystringmax length 255Up to 255 characters, scoped to the organisation and the endpoint, kept for 24 hours: a repeat with the same body replays the stored response with Idempotent-Replayed: true (API-004).
Body
namestringrequiredmin length 2max length 120campaignIdstringmin length 1max length 80advertisingCategorystring or nulltemplateVersionIdstringrequiredmin length 1max length 40finishstringrequiredmin length 1max length 40postKindenumADVERTISING_CUSTOMERSADVERTISING_NON_CUSTOMERSNO_ADVERTISINGdestinationstringrequiredmin length 2max length 2Returns
21 fields of the 201 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
201Success
401Authentication required or API key invalid
403Permission or scope missing, organisation suspended
409A request with this Idempotency-Key is still in progress (idempotency_in_progress)
422Validation failed
429Rate limited for this API key and class; wait Retry-After seconds
otherError (RFC 9457 problem details)