---
title: "Runs one bulk-capable change over many rows in one transaction, answering each item's outcome."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › store

`POST /v1/stores/{store}/bulk`

## Authentication

- `bearer`, http, header `Authorization`

## Path parameters

- `store` (`bulk.path.store`; string, required) — The store's id.

## Header parameters

- `Idempotency-Key` (`bulk.header.Idempotency-Key`; string, optional) — Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.
  - minLength 1; maxLength 255; pattern `^[\x21-\x7E]+$`

## Request body

_Required._

One of:

- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`
- `object`

## Example request

```json
{
  "accessor": "publishProduct",
  "items": [
    {
      "property1": true,
      "property2": true,
      "product": {
        "id": "string"
      },
      "full": true,
      "at": "string"
    }
  ]
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/bulk' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accessor": "publishProduct",
  "items": [
    {
      "property1": true,
      "property2": true,
      "product": {
        "id": "string"
      },
      "full": true,
      "at": "string"
    }
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/bulk';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    accessor: 'publishProduct',
    items: [
      {
        property1: true,
        property2: true,
        product: {id: 'string'},
        full: true,
        at: 'string'
      }
    ]
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/bulk"

payload = {
    "accessor": "publishProduct",
    "items": [
        {
            "property1": True,
            "property2": True,
            "product": { "id": "string" },
            "full": True,
            "at": "string"
        }
    ]
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Runs one bulk-capable change over many rows in one transaction, answering each item's outcome.

#### Example

```json
{
  "results": [
    {
      "outcome": "done"
    }
  ]
}
```

- `results` (`bulk.response.200.results`; array<any of>, required)
  - any of: `object`, `object`

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`bulk.response.default.type`; string, required)
  - format `uri`
- `title` (`bulk.response.default.title`; string, required)
- `status` (`bulk.response.default.status`; integer, required)
- `detail` (`bulk.response.default.detail`; string, required)
- `code` (`bulk.response.default.code`; string, optional)
- `context` (`bulk.response.default.context`; object, optional)
- `reached_core` (`bulk.response.default.reached_core`; boolean, optional)
- `core_answer` (`bulk.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/bulk/index.md
