Subscriptions API (v3)
Subscriptions is the VTEX solution for customers to make recurrent purchases at your store on a regular schedule. When customers subscribe, they define what products they want to acquire regularly and at what frequency they want these automatic orders to be created. For more information, see Subscriptions onboarding guide.
Index
Cycles
GETGet cycle detailsGETList cyclesPOSTRetry cycle
Plans
GETList plansGETGet plan details
Reports
Subscriptions
GETGet subscription details by IDPATCHUpdate subscription by IDGETList subscriptionsPOSTCreate subscriptionDELETERemove item from subscriptionPATCHEdit item on subscriptionPOSTAdd item to subscriptionPOSTCalculate the current prices for a subscriptionPOSTCalculate the current prices for the provided subscription templateGETGet conversation messages
Settings
Common parameters
| Parameter name | Description | Type |
|---|---|---|
{{accountName}} |
Name of the VTEX account. Used as part of the URL. | Server variable. |
{{environment}} |
Environment to use. Used as part of the URL. The default value is vtexcommercestable. |
Server variable. |
X-VTEX-API-AppKey |
Unique identifier of the API key. | Authentication header. Must be used together with X-VTEX-API-AppToken. Not necessary when using VtexIdclientAutCookie. |
X-VTEX-API-AppToken |
Secret token of the API key. | Authentication header. Must be used together with X-VTEX-API-AppKey. Not necessary when using VtexIdclientAutCookie. |
VtexIdclientAutCookie |
User token, valid for 24 hours. | Authentication header. Not necessary when using X-VTEX-API-AppKey and X-VTEX-API-AppToken. |
Endpoints
Cycles
| Summary | Method | Path |
|---|---|---|
| Get cycle details | GET | /api/rns/pub/cycles/{cycleId} |
| List cycles | GET | /api/rns/pub/cycles |
| Retry cycle | POST | /api/rns/pub/cycles/{cycleId}/retry |
Plans
| Summary | Method | Path |
|---|---|---|
| List plans | GET | /api/rns/pvt/plans |
| Get plan details | GET | /api/rns/pvt/plans/{id} |
Reports
| Summary | Method | Path |
|---|---|---|
| List report templates | GET | /api/rns/pvt/reports |
| Get report document details | GET | /api/rns/pvt/reports/{reportName}/documents/{documentId} |
| Generate report | POST | /api/rns/pvt/reports/{reportName}/documents |
Subscriptions
| Summary | Method | Path |
|---|---|---|
| Get subscription details by ID | GET | /api/rns/pub/subscriptions/{id} |
| Update subscription by ID | PATCH | /api/rns/pub/subscriptions/{id} |
| List subscriptions | GET | /api/rns/pub/subscriptions |
| Create subscription | POST | /api/rns/pub/subscriptions |
| Remove item from subscription | DELETE | /api/rns/pub/subscriptions/{id}/items/{itemId} |
| Edit item from subscription | PATCH | /api/rns/pub/subscriptions/{id}/items/{itemId} |
| Add item to subscription | POST | /api/rns/pub/subscriptions/{id}/items |
| Calculate the current prices for a subscription | POST | /api/rns/pub/subscriptions/{id}/simulate |
| Calculate the current prices for the provided subscription template | POST | /api/rns/pub/subscriptions/simulate |
| Get conversation messages | GET | /api/rns/pub/subscriptions/{subscriptionId}/conversation-message |
Settings
| Summary | Method | Path |
|---|---|---|
| Get subscriptions settings | GET | /api/rns/settings |
| Edit subscriptions settings | POST | /api/rns/settings |