Update one of the signed-in supplier’s blocked times
curl --request PATCH \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"version": 2,
"status": "ACTIVE",
"timezone": "America/Toronto",
"startDate": "2026-07-01",
"endDate": "2026-07-14",
"rrule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR",
"exdates": [],
"allDay": true,
"timeRanges": [
{
"startTime": "12:00",
"endTime": "13:00",
"crossesMidnight": false,
"sortOrder": 0
}
],
"notes": "Holiday"
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}"
payload = {
"version": 2,
"status": "ACTIVE",
"timezone": "America/Toronto",
"startDate": "2026-07-01",
"endDate": "2026-07-14",
"rrule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR",
"exdates": [],
"allDay": True,
"timeRanges": [
{
"startTime": "12:00",
"endTime": "13:00",
"crossesMidnight": False,
"sortOrder": 0
}
],
"notes": "Holiday"
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
version: 2,
status: 'ACTIVE',
timezone: 'America/Toronto',
startDate: '2026-07-01',
endDate: '2026-07-14',
rrule: 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR',
exdates: [],
allDay: true,
timeRanges: [{startTime: '12:00', endTime: '13:00', crossesMidnight: false, sortOrder: 0}],
notes: 'Holiday'
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version' => 2,
'status' => 'ACTIVE',
'timezone' => 'America/Toronto',
'startDate' => '2026-07-01',
'endDate' => '2026-07-14',
'rrule' => 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR',
'exdates' => [
],
'allDay' => true,
'timeRanges' => [
[
'startTime' => '12:00',
'endTime' => '13:00',
'crossesMidnight' => false,
'sortOrder' => 0
]
],
'notes' => 'Holiday'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}"
payload := strings.NewReader("{\n \"version\": 2,\n \"status\": \"ACTIVE\",\n \"timezone\": \"America/Toronto\",\n \"startDate\": \"2026-07-01\",\n \"endDate\": \"2026-07-14\",\n \"rrule\": \"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR\",\n \"exdates\": [],\n \"allDay\": true,\n \"timeRanges\": [\n {\n \"startTime\": \"12:00\",\n \"endTime\": \"13:00\",\n \"crossesMidnight\": false,\n \"sortOrder\": 0\n }\n ],\n \"notes\": \"Holiday\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}")
.header("x-api-key", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 2,\n \"status\": \"ACTIVE\",\n \"timezone\": \"America/Toronto\",\n \"startDate\": \"2026-07-01\",\n \"endDate\": \"2026-07-14\",\n \"rrule\": \"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR\",\n \"exdates\": [],\n \"allDay\": true,\n \"timeRanges\": [\n {\n \"startTime\": \"12:00\",\n \"endTime\": \"13:00\",\n \"crossesMidnight\": false,\n \"sortOrder\": 0\n }\n ],\n \"notes\": \"Holiday\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 2,\n \"status\": \"ACTIVE\",\n \"timezone\": \"America/Toronto\",\n \"startDate\": \"2026-07-01\",\n \"endDate\": \"2026-07-14\",\n \"rrule\": \"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR\",\n \"exdates\": [],\n \"allDay\": true,\n \"timeRanges\": [\n {\n \"startTime\": \"12:00\",\n \"endTime\": \"13:00\",\n \"crossesMidnight\": false,\n \"sortOrder\": 0\n }\n ],\n \"notes\": \"Holiday\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"blockedTimeId": "<string>",
"projectId": "<string>",
"supplierId": "<string>",
"status": "ACTIVE",
"deleted": true,
"timezone": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"rrule": "<string>",
"exdates": [
"<string>"
],
"allDay": true,
"timeRanges": [
{
"startTime": "09:00",
"endTime": "17:00",
"crossesMidnight": false,
"sortOrder": 0,
"dayOfWeek": "MO"
}
],
"version": 1,
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"notes": "<string>",
"deletedAt": "<string>",
"deletedBy": "<string>"
}
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}Supplier plane
Update one of the signed-in supplier’s blocked times
Change any of the blocked time’s fields; send the row’s current version (optimistic concurrency — a stale one is a 409). Requires the API key and the supplier’s user token.
PATCH
/
v1
/
projects
/
{projectId}
/
suppliers
/
me
/
blocked-times
/
{blockedTimeId}
Update one of the signed-in supplier’s blocked times
curl --request PATCH \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"version": 2,
"status": "ACTIVE",
"timezone": "America/Toronto",
"startDate": "2026-07-01",
"endDate": "2026-07-14",
"rrule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR",
"exdates": [],
"allDay": true,
"timeRanges": [
{
"startTime": "12:00",
"endTime": "13:00",
"crossesMidnight": false,
"sortOrder": 0
}
],
"notes": "Holiday"
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}"
payload = {
"version": 2,
"status": "ACTIVE",
"timezone": "America/Toronto",
"startDate": "2026-07-01",
"endDate": "2026-07-14",
"rrule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR",
"exdates": [],
"allDay": True,
"timeRanges": [
{
"startTime": "12:00",
"endTime": "13:00",
"crossesMidnight": False,
"sortOrder": 0
}
],
"notes": "Holiday"
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
version: 2,
status: 'ACTIVE',
timezone: 'America/Toronto',
startDate: '2026-07-01',
endDate: '2026-07-14',
rrule: 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR',
exdates: [],
allDay: true,
timeRanges: [{startTime: '12:00', endTime: '13:00', crossesMidnight: false, sortOrder: 0}],
notes: 'Holiday'
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version' => 2,
'status' => 'ACTIVE',
'timezone' => 'America/Toronto',
'startDate' => '2026-07-01',
'endDate' => '2026-07-14',
'rrule' => 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR',
'exdates' => [
],
'allDay' => true,
'timeRanges' => [
[
'startTime' => '12:00',
'endTime' => '13:00',
'crossesMidnight' => false,
'sortOrder' => 0
]
],
'notes' => 'Holiday'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}"
payload := strings.NewReader("{\n \"version\": 2,\n \"status\": \"ACTIVE\",\n \"timezone\": \"America/Toronto\",\n \"startDate\": \"2026-07-01\",\n \"endDate\": \"2026-07-14\",\n \"rrule\": \"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR\",\n \"exdates\": [],\n \"allDay\": true,\n \"timeRanges\": [\n {\n \"startTime\": \"12:00\",\n \"endTime\": \"13:00\",\n \"crossesMidnight\": false,\n \"sortOrder\": 0\n }\n ],\n \"notes\": \"Holiday\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}")
.header("x-api-key", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version\": 2,\n \"status\": \"ACTIVE\",\n \"timezone\": \"America/Toronto\",\n \"startDate\": \"2026-07-01\",\n \"endDate\": \"2026-07-14\",\n \"rrule\": \"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR\",\n \"exdates\": [],\n \"allDay\": true,\n \"timeRanges\": [\n {\n \"startTime\": \"12:00\",\n \"endTime\": \"13:00\",\n \"crossesMidnight\": false,\n \"sortOrder\": 0\n }\n ],\n \"notes\": \"Holiday\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me/blocked-times/{blockedTimeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": 2,\n \"status\": \"ACTIVE\",\n \"timezone\": \"America/Toronto\",\n \"startDate\": \"2026-07-01\",\n \"endDate\": \"2026-07-14\",\n \"rrule\": \"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR\",\n \"exdates\": [],\n \"allDay\": true,\n \"timeRanges\": [\n {\n \"startTime\": \"12:00\",\n \"endTime\": \"13:00\",\n \"crossesMidnight\": false,\n \"sortOrder\": 0\n }\n ],\n \"notes\": \"Holiday\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"blockedTimeId": "<string>",
"projectId": "<string>",
"supplierId": "<string>",
"status": "ACTIVE",
"deleted": true,
"timezone": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"rrule": "<string>",
"exdates": [
"<string>"
],
"allDay": true,
"timeRanges": [
{
"startTime": "09:00",
"endTime": "17:00",
"crossesMidnight": false,
"sortOrder": 0,
"dayOfWeek": "MO"
}
],
"version": 1,
"createdAt": "<string>",
"updatedAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"notes": "<string>",
"deletedAt": "<string>",
"deletedBy": "<string>"
}
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}{
"code": "NOT_FOUND",
"message": "Booking not found",
"statusCode": 404,
"requestId": "a3f1c2de-9b64-4a2f-8f0e-5c9d1b7a2e10"
}Authorizations
API key minted in the MarketBox dashboard. Scope is restricted to the projects you select at creation time. Every route needs the key's standard API access (*) except POST /v1/projects/{projectId}/events, which needs events:write; a key without * is refused with 403 CAPABILITY_NOT_GRANTED.
Path Parameters
Body
application/json
Fields to update