Approve the samples, or ask for a new batch
const url = 'https://data.creatorain.com/partner/v1/locations/store_123/creator-samples/smp_1b4e28ba-2fa1-4d3b-a3f5-ef19b5a7633b/decision';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"decision":"approve","note":"prefers Chinese-speaking creators"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://data.creatorain.com/partner/v1/locations/store_123/creator-samples/smp_1b4e28ba-2fa1-4d3b-a3f5-ef19b5a7633b/decision \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "decision": "approve", "note": "prefers Chinese-speaking creators" }'approve: recruiting starts, and location.recruiting follows when it does.
new_batch: we prepare a new set that never repeats earlier samples, and send
location.samples_ready again when it is ready. After two new batches our CSM calls the
merchant.
The same decision again answers 200 with the same body. The other decision on a batch already decided is 409, as is a decision on a batch that was replaced.
PARTNER KEY ONLY.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”YOUR id for the store, as you sent it to POST /locations.
Example
store_123Example
smp_1b4e28ba-2fa1-4d3b-a3f5-ef19b5a7633bThe batch_id from the samples read or the location.samples_ready event.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Optional, with new_batch. What the merchant wants instead.
Example
prefers Chinese-speaking creatorsResponses
Section titled “Responses”The decision as recorded.
object
Example
{ "decision": "approve", "next": "recruiting"}validation_error. field names the offending parameter.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}unauthorized. A missing, malformed, unknown or revoked key; or an invalid, expired or
wrong-store dashboard token. One answer for every case on purpose: the holder of a bad
credential learns nothing from the difference.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}location_not_found, or sample_batch_not_found when no batch of this store has that id.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}conflict (already decided the other way, replaced, or not a sample review store) or location_terminated.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}rate_limited. Over this key’s requests-per-minute ceiling.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}