Skip to main content
POST
/
blocked_dates
Create a blocked date
curl --request POST \
  --url https://app.supercycle.com/api/v1/blocked_dates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resourceId": 123,
  "from": "2023-12-25",
  "to": "2023-12-25",
  "description": "<string>"
}
'
{
  "id": 123,
  "from": "2023-12-25",
  "resourceId": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "resource": {
    "id": 123,
    "title": "<string>",
    "formattedId": "<string>",
    "imageUrl": "<string>",
    "shopifyVariantId": 123,
    "shopifyProductId": 123
  },
  "description": "<string>",
  "to": "2023-12-25"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
resourceType
enum<string>
required

Type of resource the blocked dates apply to.

Available options:
Item,
Shopify::Variant,
Shopify::Product
resourceId
integer<int64>
required

Numeric ID of the blocked resource in Supercycle.

from
null | string<date>

First blocked calendar day (inclusive). Omit or null for an open-start block.

to
null | string<date>

Last blocked calendar day (inclusive). Omit or null for an open-ended block.

description
null | string

Optional note describing why the dates are blocked.

Response

Blocked date created successfully

id
integer<int64>
required

Numeric ID of the blocked date.

from
null | string<date>
required

First blocked calendar day (inclusive). Null when the block is open-start.

resourceType
enum<string>
required

Type of resource the blocked dates apply to.

Available options:
Item,
Shopify::Variant,
Shopify::Product
resourceId
integer<int64>
required

Numeric ID of the blocked resource in Supercycle.

createdAt
string<date-time>
required

When the blocked date was created.

updatedAt
string<date-time>
required

When the blocked date was last updated.

resource
object
required
description
null | string

Optional note describing why the dates are blocked.

to
null | string<date>

Last blocked calendar day (inclusive). Null when the block is open-ended.