Create a subscription model
How to create a subscription model via API
To create a new subscription model, send a POST
request to the /api/subscription_models
endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/subscription_models
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.name |
| Required |
attributes.strategy |
| Optional, default is by_frequency |
attributes.frequencies |
| Required |
attributes.auto_activate |
| Optional, default is 'true' |
attributes.auto_cancel |
| Optional, default is 'false' |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
Example
The following request creates a new subscription model:
Last updated