Configuring a subscription model
How to create a subscription model to set the available subscription frequencies and the subscription strategy for a market
Problem
Solution
Example
1. Create a new subscription model
curl -g -X POST \
'https://yourdomain.commercelayer.io/api/subscription_models' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "subscription_models",
"attributes": {
"name": "US Subscription Model",
"frequencies": [
"hourly",
"30 10 * * *",
"weekly",
"monthly",
"two-month"
]
}
}
}'2. Associate the new subscription model with an existing market
Additional notes
Updating the subscription model
Example
More to read
Last updated