← API Index
/api/client/addsubscription2
Create a new item or assortment subscription
Parameters
| Name |
Description |
Type |
| iid |
item id (>0) or negated assortment box id (<0) |
int |
| amount |
subscription amount |
string |
| unit |
unit |
string |
| rn |
weekly repeat rhythm |
int |
| start |
start date (yyyy-MM-dd) |
string |
| tid |
tour id for delivery |
int |
| value |
nominal value for assortment subscriptions |
string |
| oo-rf |
optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml |
String |
| oo-auth |
optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized. |
int |
Error Responses
| HTTP Status |
Error Code |
Description |
| 409 |
error |
General error creating subscription |
| 403 |
security_error |
Security violation |
| 403 |
not_auth |
User is not authenticated |
Response Types
| Type |
Version |
Description |
| ActionResult |
0 |
Result of a backend action |
| ShopDate |
8 |
A delivery date with order, tour, shipping, and address information |
| Pause |
1 |
A delivery pause period |
| Subscription |
4 |
A standing subscription (item or assortment box) |
| Favourite |
1 |
A shelf favourite (bookmarked item or menu level) |
| AuxDate |
1 |
An auxiliary calendar event or notice |
| DeselectedItem |
1 |
An item preferably excluded from a customer's assortment |
| DeselectedGroup |
1 |
A category preferably excluded from a customer's assortment |
OpenAPI
See addsubscription2.yaml