SpecialHour
A store's special opening hours, such as holidays.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
GET |
/v1/stores/{storeId}/special-hours |
list |
OK |
PUT |
/v1/stores/{storeId}/special-hours |
update |
No Content |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
special_hours, err := client.SpecialHour(nil).List(map[string]any{"store_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(special_hours)
updated, err := client.SpecialHour(nil).Update(map[string]any{"store_id": "example", "special_hours_entities": []any{}}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
Lua
Construct client as shown in the Lua setup, then call the operations:
local special_hours, err = client:SpecialHour():list({ store_id = "example" })
local updated, err = client:SpecialHour():update({ store_id = "example", special_hours_entities = {} })
PHP
Construct client as shown in the PHP setup, then call the operations:
$special_hours = $client->SpecialHour()->list(["store_id" => "example"]);
$updated = $client->SpecialHour()->update(["store_id" => "example", "special_hours_entities" => []]);
Python
Construct client as shown in the Python setup, then call the operations:
special_hours = client.SpecialHour().list({"store_id": "example"})
updated = client.SpecialHour().update({"store_id": "example", "special_hours_entities": []})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
special_hours = client.SpecialHour.list({ "store_id" => "example" })
updated = client.SpecialHour.update({ "store_id" => "example", "special_hours_entities" => [] })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const special_hours = await client.SpecialHour().list({ store_id: "example" })
const updated = await client.SpecialHour().update({ store_id: "example", special_hours_entities: [] })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
closed |
boolean |
Yes | Indicates if the store is closed (true) or open (false) on this date |
date |
string |
Yes | The date when the store will open or close, formatted as YYYY-MM-DD. |
end_time |
string |
No | Closing time in HH:MM format. |
name |
string |
No | Optional label for the special hours entry (for example |
special_hours_entities |
array |
No | Special Hours Entities |
start_time |
string |
No | Opening time in HH:MM format. |
list
GET /v1/stores/{storeId}/special-hours
Operation ID: GET/v1/stores/{storeId}/special-hours.
Authentication: oauth2 (AccessToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
storeId |
path |
string |
Yes | Store Identifier |
Responses
200: OK
application/json
| Property | Type | Required | Description |
|---|---|---|---|
data |
array of object |
No | |
data[].closed |
boolean |
Yes | Indicates if the store is closed (true) or open (false) on this date |
data[].date |
string |
Yes | The date when the store will open or close, formatted as YYYY-MM-DD. |
data[].end_time |
string |
No | Closing time in HH:MM format. Required when closed is false. |
data[].name |
string |
No | Optional label for the special hours entry (for example "Christmas Day") |
data[].start_time |
string |
No | Opening time in HH:MM format. Required when closed is false. |
400: Bad Request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials. |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource. |
404: Not Found
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 404 Not Found is the status code that indicates a server could not find a client-requested webpage |
429: Too Many Requests
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time |
update
PUT /v1/stores/{storeId}/special-hours
Operation ID: PUT/v1/stores/{storeId}/special-hours.
Authentication: oauth2 (AccessToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
storeId |
path |
string |
Yes | Store Identifier |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
[].closed |
boolean |
Yes | Indicates if the store is closed (true) or open (false) on this date |
[].date |
string |
Yes | The date when the store will open or close, formatted as YYYY-MM-DD. |
[].end_time |
string |
No | Closing time in HH:MM format. Required when closed is false. |
[].name |
string |
No | Optional label for the special hours entry (for example "Christmas Day") |
[].start_time |
string |
No | Opening time in HH:MM format. Required when closed is false. |
Responses
204: No Content
400: Bad Request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 400 Bad Request is the status code that indicates the server cannot or will not process the request due to something that is perceived to be a client error |
401: Unauthorized
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials. |
403: Forbidden
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource. |
404: Not Found
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 404 Not Found is the status code that indicates a server could not find a client-requested webpage |
429: Too Many Requests
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | 429 Too Many Requests is the status code that indicates the client application has surpassed its rate limit, or number of requests they can send in a given period of time |