curl --request POST \
--url https://app.supercycle.com/api/v1/products/{productId}/calendar_method \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "enabled",
"customRestockDurationCount": 123,
"optionsAttributes": [
{
"id": 123,
"name": "<string>",
"durationCount": 123,
"priceCents": 123,
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"_destroy": true
}
]
}
'{
"id": 123,
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"options": [
{
"id": 123,
"name": "<string>",
"durationCount": 123,
"priceCents": 123,
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"customRestockDurationCount": 123
}Creates or updates a calendar method for a product.
curl --request POST \
--url https://app.supercycle.com/api/v1/products/{productId}/calendar_method \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "enabled",
"customRestockDurationCount": 123,
"optionsAttributes": [
{
"id": 123,
"name": "<string>",
"durationCount": 123,
"priceCents": 123,
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"_destroy": true
}
]
}
'{
"id": 123,
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"options": [
{
"id": 123,
"name": "<string>",
"durationCount": 123,
"priceCents": 123,
"variantApplicationType": "<string>",
"marketApplicationType": "<string>",
"conditionApplicationType": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"customRestockDurationCount": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Was this page helpful?