---
title: "Records a release, whose files become the current download, or a note on a software product."
---

> 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 › product

`POST /v1/stores/{store}/products/{product}/activity`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `product:write`

## Path parameters

- `store` (`recordSoftwareEvent.path.store`; string, required) — The store's id.
- `product` (`recordSoftwareEvent.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1

## Header parameters

- `Idempotency-Key` (`recordSoftwareEvent.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._

Any of:

- `object`
- `object`

## Example request

```json
{
  "body": "string",
  "files": [
    {
      "id": "string"
    }
  ],
  "tier": {
    "id": "string"
  },
  "type": "release",
  "version": "string",
  "notify": true
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/activity' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "body": "string",
  "files": [
    {
      "id": "string"
    }
  ],
  "tier": {
    "id": "string"
  },
  "type": "release",
  "version": "string",
  "notify": true
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/activity';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    body: 'string',
    files: [{id: 'string'}],
    tier: {id: 'string'},
    type: 'release',
    version: 'string',
    notify: true
  })
};

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>/products/<product>/activity"

payload = {
    "body": "string",
    "files": [{ "id": "string" }],
    "tier": { "id": "string" },
    "type": "release",
    "version": "string",
    "notify": True
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 201

Records a release, whose files become the current download, or a note on a software product.

#### Example

```json
{
  "id": "string",
  "product_id": "string",
  "type": "string",
  "version": "string",
  "body": "string",
  "current": true,
  "files": [
    {
      "attachment_id": "string",
      "asset_id": "string",
      "tier": {
        "id": "string"
      },
      "name": "string",
      "ext": "string",
      "mime": "string",
      "bytes": 0,
      "description": "string"
    }
  ],
  "tier": {
    "id": "string"
  },
  "push": "string",
  "push_reason": "string",
  "notified": 0,
  "occurred_at": "string",
  "created_at": "string",
  "updated_at": "string"
}
```

- `id` (`recordSoftwareEvent.response.201.id`; string, required)
- `product_id` (`recordSoftwareEvent.response.201.product_id`; string, required)
- `type` (`recordSoftwareEvent.response.201.type`; string, required) — `release` or `note`.
- `version` (`recordSoftwareEvent.response.201.version`; any of, required) — A release's version; null for a note.
  - any of: `string`, `null`
- `body` (`recordSoftwareEvent.response.201.body`; any of, required) — The release notes or the note, as plain text.
  - any of: `string`, `null`
- `current` (`recordSoftwareEvent.response.201.current`; boolean, required) — Whether it is the product's current download: its newest release that ships files.
- `files` (`recordSoftwareEvent.response.201.files`; array<object>, required)
  - `attachment_id` (`recordSoftwareEvent.response.201.files.attachment_id`; string, required)
  - `asset_id` (`recordSoftwareEvent.response.201.files.asset_id`; string, required)
  - `tier` (`recordSoftwareEvent.response.201.files.tier`; any of, required) — The lowest tier that downloads the file, by its own gate; null for every tier.
    - any of: `object`, `null`
  - `name` (`recordSoftwareEvent.response.201.files.name`; string, required)
  - `ext` (`recordSoftwareEvent.response.201.files.ext`; any of, required)
    - any of: `string`, `null`
  - `mime` (`recordSoftwareEvent.response.201.files.mime`; any of, required)
    - any of: `string`, `null`
  - `bytes` (`recordSoftwareEvent.response.201.files.bytes`; number, required)
  - `description` (`recordSoftwareEvent.response.201.files.description`; any of, required) — The file's description, as its download shows it to holders; null for none.
    - any of: `string`, `null`
- `tier` (`recordSoftwareEvent.response.201.tier`; any of, required) — The lowest tier whose holders download its files, while every file is gated to it; null for every tier.
  - any of: `object`, `null`
- `push` (`recordSoftwareEvent.response.201.push`; string, required) — Its push: `none` never asked, `pending` owed, `sent` to its holders, or `dropped` for good (its files failed, or a newer release came first).
- `push_reason` (`recordSoftwareEvent.response.201.push_reason`; any of, required) — Why a dropped push was dropped: `superseded`, `files` (failed or never finished), `removed` (they left the release), `unavailable` (the product wasn't open) or `failed`; null otherwise.
  - any of: `string`, `null`
- `notified` (`recordSoftwareEvent.response.201.notified`; number, required) — How many holders its push reached so far.
- `occurred_at` (`recordSoftwareEvent.response.201.occurred_at`; any of, required)
  - any of: `string`, `null`
- `created_at` (`recordSoftwareEvent.response.201.created_at`; any of, required)
  - any of: `string`, `null`
- `updated_at` (`recordSoftwareEvent.response.201.updated_at`; any of, required)
  - any of: `string`, `null`

### 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` (`recordSoftwareEvent.response.default.type`; string, required)
  - format `uri`
- `title` (`recordSoftwareEvent.response.default.title`; string, required)
- `status` (`recordSoftwareEvent.response.default.status`; integer, required)
- `detail` (`recordSoftwareEvent.response.default.detail`; string, required)
- `code` (`recordSoftwareEvent.response.default.code`; string, optional)
- `context` (`recordSoftwareEvent.response.default.context`; object, optional)
- `reached_core` (`recordSoftwareEvent.response.default.reached_core`; boolean, optional)
- `core_answer` (`recordSoftwareEvent.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/record-software-event/index.md
