<!-- Markdown copy of https://docs.creatorain.com/partner-api/reference/operations/decidepartnercreatorsamples/ -->
# Approve the samples, or ask for a new batch

POST

/locations/{partner\_location\_id}/creator-samples/{batch\_id}/decision

Select code sampleFetchcURL

```js
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);
}
```

```sh
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" }'
```

-   Production (live stores; a live key is issued per partner)
-   Sandbox, for integration testing (test keys, test stores)

`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

-   **[partnerApiKey](/partner-api/reference/#partnerapikey)**

## Parameters

### Path Parameters

**partner\_location\_id**

required

string

<= 200 characters

YOUR id for the store, as you sent it to `POST /locations`.

#### Example

```
store_123
```

**batch\_id**

required

string

#### Example

```
smp_1b4e28ba-2fa1-4d3b-a3f5-ef19b5a7633b
```

The `batch_id` from the samples read or the `location.samples_ready` event.

## Request Bodyrequired

Media typeapplication/json

object

**decision**

required

string

Allowed values: approve new\_batch

**note**

Optional, with new\_batch. What the merchant wants instead.

string

nullable <= 500 characters

### Example

```
prefers Chinese-speaking creators
```

## Responses

### 200

The decision as recorded.

Media typeapplication/json

object

**batch\_id**

string

**batch\_number**

integer

**decision**

string

Allowed values: approve new\_batch

**note**

string

nullable

**decided\_at**

string format: date-time

nullable

**next**

string

Allowed values: recruiting new\_batch\_preparing

#### Example

```json
{
  "decision": "approve",
  "next": "recruiting"
}
```

### 400

`validation_error`. `field` names the offending parameter.

Media typeapplication/json

object

**error**

required

object

**code**

required

The stable value to branch on.

string

Allowed values: unauthorized forbidden\_ip rate\_limited validation\_error location\_already\_exists location\_not\_found location\_terminated reservation\_not\_found conflict internal\_error

**message**

required

A human sentence. Copy, not contract; it may be reworded.

string

**field**

The request field at fault, dotted for a nested one (`plan.term_months`).

string

#### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```

### 401

`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.

Media typeapplication/json

object

**error**

required

object

**code**

required

The stable value to branch on.

string

Allowed values: unauthorized forbidden\_ip rate\_limited validation\_error location\_already\_exists location\_not\_found location\_terminated reservation\_not\_found conflict internal\_error

**message**

required

A human sentence. Copy, not contract; it may be reworded.

string

**field**

The request field at fault, dotted for a nested one (`plan.term_months`).

string

#### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```

### 404

`location_not_found`, or `sample_batch_not_found` when no batch of this store has that id.

Media typeapplication/json

object

**error**

required

object

**code**

required

The stable value to branch on.

string

Allowed values: unauthorized forbidden\_ip rate\_limited validation\_error location\_already\_exists location\_not\_found location\_terminated reservation\_not\_found conflict internal\_error

**message**

required

A human sentence. Copy, not contract; it may be reworded.

string

**field**

The request field at fault, dotted for a nested one (`plan.term_months`).

string

#### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```

### 409

`conflict` (already decided the other way, replaced, or not a sample review store) or `location_terminated`.

Media typeapplication/json

object

**error**

required

object

**code**

required

The stable value to branch on.

string

Allowed values: unauthorized forbidden\_ip rate\_limited validation\_error location\_already\_exists location\_not\_found location\_terminated reservation\_not\_found conflict internal\_error

**message**

required

A human sentence. Copy, not contract; it may be reworded.

string

**field**

The request field at fault, dotted for a nested one (`plan.term_months`).

string

#### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```

### 429

`rate_limited`. Over this key’s requests-per-minute ceiling.

Media typeapplication/json

object

**error**

required

object

**code**

required

The stable value to branch on.

string

Allowed values: unauthorized forbidden\_ip rate\_limited validation\_error location\_already\_exists location\_not\_found location\_terminated reservation\_not\_found conflict internal\_error

**message**

required

A human sentence. Copy, not contract; it may be reworded.

string

**field**

The request field at fault, dotted for a nested one (`plan.term_months`).

string

#### Example

```json
{
  "error": {
    "code": "unauthorized"
  }
}
```
