Skip to content

Change several subscriptions

POST
/api/v1/subscriptions/bulk
curl --request POST \
--url http://127.0.0.1:8484/api/v1/subscriptions/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "action": "update", "addTags": [ "example" ], "categoryId": "example", "dryRun": true, "ids": [ "example" ], "paymentMethodId": "example", "removeTags": [ "example" ] }'

Changes several subscriptions in one step, all or none: set the category or payment method, add or remove tags (action update), or pause, resume, cancel or delete them. Call it first with dryRun to show what changes for each. The auditIds it returns can all be passed to undo to revert the whole change.

Media typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
action
string
Allowed values: update pause resume cancel_at_period_end cancel_now delete
addTags
Array<string> | null
categoryId
string
dryRun
boolean
ids
required
Array<string> | null
>= 1 items <= 500 items
paymentMethodId
string
removeTags
Array<string> | null

OK

Media typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
auditIds
required
Array<string> | null
changed
required
integer format: int64
dryRun
boolean
items
required
Array<object> | null
object
changes
required
Array<object> | null
object
field
required
string
Allowed values: category paymentMethod tags status deleted
from
required
string
to
required
string
id
required
string
name
required
string

Example

{
"$schema": "https://example.com/api/schemas/BulkResult.json",
"items": [
{
"changes": [
{
"field": "category"
}
]
}
]
}

Error

Media typeapplication/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "https://example.com/api/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}