curl --request PATCH \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "Ada",
"lastName": "Lovelace",
"phone": "+14165550134",
"addressoneline": "120 Front St W, Toronto, ON M5J 2M2",
"street": "120 Front St W",
"city": "Toronto",
"state": "CA-ON",
"country": "CA",
"postalcode": "M5J 2M2",
"longitude": -79.3832,
"latitude": 43.6532,
"timezone": "America/Toronto",
"bio": "Certified swim instructor with ten years of experience.",
"serviceIds": [
"srv_01k2example"
],
"skillIds": [
"skl_01k2example"
],
"languages": [
"en",
"fr"
]
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me"
payload = {
"firstName": "Ada",
"lastName": "Lovelace",
"phone": "+14165550134",
"addressoneline": "120 Front St W, Toronto, ON M5J 2M2",
"street": "120 Front St W",
"city": "Toronto",
"state": "CA-ON",
"country": "CA",
"postalcode": "M5J 2M2",
"longitude": -79.3832,
"latitude": 43.6532,
"timezone": "America/Toronto",
"bio": "Certified swim instructor with ten years of experience.",
"serviceIds": ["srv_01k2example"],
"skillIds": ["skl_01k2example"],
"languages": ["en", "fr"]
}
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({
firstName: 'Ada',
lastName: 'Lovelace',
phone: '+14165550134',
addressoneline: '120 Front St W, Toronto, ON M5J 2M2',
street: '120 Front St W',
city: 'Toronto',
state: 'CA-ON',
country: 'CA',
postalcode: 'M5J 2M2',
longitude: -79.3832,
latitude: 43.6532,
timezone: 'America/Toronto',
bio: 'Certified swim instructor with ten years of experience.',
serviceIds: ['srv_01k2example'],
skillIds: ['skl_01k2example'],
languages: ['en', 'fr']
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me', 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",
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([
'firstName' => 'Ada',
'lastName' => 'Lovelace',
'phone' => '+14165550134',
'addressoneline' => '120 Front St W, Toronto, ON M5J 2M2',
'street' => '120 Front St W',
'city' => 'Toronto',
'state' => 'CA-ON',
'country' => 'CA',
'postalcode' => 'M5J 2M2',
'longitude' => -79.3832,
'latitude' => 43.6532,
'timezone' => 'America/Toronto',
'bio' => 'Certified swim instructor with ten years of experience.',
'serviceIds' => [
'srv_01k2example'
],
'skillIds' => [
'skl_01k2example'
],
'languages' => [
'en',
'fr'
]
]),
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"
payload := strings.NewReader("{\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"phone\": \"+14165550134\",\n \"addressoneline\": \"120 Front St W, Toronto, ON M5J 2M2\",\n \"street\": \"120 Front St W\",\n \"city\": \"Toronto\",\n \"state\": \"CA-ON\",\n \"country\": \"CA\",\n \"postalcode\": \"M5J 2M2\",\n \"longitude\": -79.3832,\n \"latitude\": 43.6532,\n \"timezone\": \"America/Toronto\",\n \"bio\": \"Certified swim instructor with ten years of experience.\",\n \"serviceIds\": [\n \"srv_01k2example\"\n ],\n \"skillIds\": [\n \"skl_01k2example\"\n ],\n \"languages\": [\n \"en\",\n \"fr\"\n ]\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")
.header("x-api-key", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"phone\": \"+14165550134\",\n \"addressoneline\": \"120 Front St W, Toronto, ON M5J 2M2\",\n \"street\": \"120 Front St W\",\n \"city\": \"Toronto\",\n \"state\": \"CA-ON\",\n \"country\": \"CA\",\n \"postalcode\": \"M5J 2M2\",\n \"longitude\": -79.3832,\n \"latitude\": 43.6532,\n \"timezone\": \"America/Toronto\",\n \"bio\": \"Certified swim instructor with ten years of experience.\",\n \"serviceIds\": [\n \"srv_01k2example\"\n ],\n \"skillIds\": [\n \"skl_01k2example\"\n ],\n \"languages\": [\n \"en\",\n \"fr\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me")
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 \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"phone\": \"+14165550134\",\n \"addressoneline\": \"120 Front St W, Toronto, ON M5J 2M2\",\n \"street\": \"120 Front St W\",\n \"city\": \"Toronto\",\n \"state\": \"CA-ON\",\n \"country\": \"CA\",\n \"postalcode\": \"M5J 2M2\",\n \"longitude\": -79.3832,\n \"latitude\": 43.6532,\n \"timezone\": \"America/Toronto\",\n \"bio\": \"Certified swim instructor with ten years of experience.\",\n \"serviceIds\": [\n \"srv_01k2example\"\n ],\n \"skillIds\": [\n \"skl_01k2example\"\n ],\n \"languages\": [\n \"en\",\n \"fr\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"supplierId": "<string>",
"projectId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"fullName": "<string>",
"email": "<string>",
"languages": [
"<string>"
],
"locales": [
"<string>"
],
"active": true,
"deleted": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"serviceIds": [
"<string>"
],
"skillIds": [
"<string>"
],
"phone": "<string>",
"addressoneline": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postalcode": "<string>",
"longitude": 123,
"latitude": 123,
"timezone": "<string>",
"bio": "<string>",
"maxTravelTime": 123,
"externalId": "<string>",
"externalData": {},
"defaultLocale": "<string>",
"userId": "<string>",
"invitationStatus": "NONE",
"avatar": {
"variantId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"avatarUrl": "<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"
}Update the signed-in supplier’s own profile
Changes the supplier record the user token resolves to, as the MarketBox dashboard does when a supplier edits My Profile, built by the same code. Only the fields in the body schema can be changed; any field left out is unchanged. serviceIds and skillIds replace the whole set when sent. A body naming a field only staff may change — active, email, externalId, externalData, maxTravelTime or defaultLocale — is refused whole with 403 FIELD_NOT_SELF_EDITABLE, whatever its value. Returns the updated profile, in the shape GET /suppliers/me answers. Requires the API key and the supplier’s user token.
curl --request PATCH \
--url https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "Ada",
"lastName": "Lovelace",
"phone": "+14165550134",
"addressoneline": "120 Front St W, Toronto, ON M5J 2M2",
"street": "120 Front St W",
"city": "Toronto",
"state": "CA-ON",
"country": "CA",
"postalcode": "M5J 2M2",
"longitude": -79.3832,
"latitude": 43.6532,
"timezone": "America/Toronto",
"bio": "Certified swim instructor with ten years of experience.",
"serviceIds": [
"srv_01k2example"
],
"skillIds": [
"skl_01k2example"
],
"languages": [
"en",
"fr"
]
}
'import requests
url = "https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me"
payload = {
"firstName": "Ada",
"lastName": "Lovelace",
"phone": "+14165550134",
"addressoneline": "120 Front St W, Toronto, ON M5J 2M2",
"street": "120 Front St W",
"city": "Toronto",
"state": "CA-ON",
"country": "CA",
"postalcode": "M5J 2M2",
"longitude": -79.3832,
"latitude": 43.6532,
"timezone": "America/Toronto",
"bio": "Certified swim instructor with ten years of experience.",
"serviceIds": ["srv_01k2example"],
"skillIds": ["skl_01k2example"],
"languages": ["en", "fr"]
}
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({
firstName: 'Ada',
lastName: 'Lovelace',
phone: '+14165550134',
addressoneline: '120 Front St W, Toronto, ON M5J 2M2',
street: '120 Front St W',
city: 'Toronto',
state: 'CA-ON',
country: 'CA',
postalcode: 'M5J 2M2',
longitude: -79.3832,
latitude: 43.6532,
timezone: 'America/Toronto',
bio: 'Certified swim instructor with ten years of experience.',
serviceIds: ['srv_01k2example'],
skillIds: ['skl_01k2example'],
languages: ['en', 'fr']
})
};
fetch('https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me', 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",
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([
'firstName' => 'Ada',
'lastName' => 'Lovelace',
'phone' => '+14165550134',
'addressoneline' => '120 Front St W, Toronto, ON M5J 2M2',
'street' => '120 Front St W',
'city' => 'Toronto',
'state' => 'CA-ON',
'country' => 'CA',
'postalcode' => 'M5J 2M2',
'longitude' => -79.3832,
'latitude' => 43.6532,
'timezone' => 'America/Toronto',
'bio' => 'Certified swim instructor with ten years of experience.',
'serviceIds' => [
'srv_01k2example'
],
'skillIds' => [
'skl_01k2example'
],
'languages' => [
'en',
'fr'
]
]),
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"
payload := strings.NewReader("{\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"phone\": \"+14165550134\",\n \"addressoneline\": \"120 Front St W, Toronto, ON M5J 2M2\",\n \"street\": \"120 Front St W\",\n \"city\": \"Toronto\",\n \"state\": \"CA-ON\",\n \"country\": \"CA\",\n \"postalcode\": \"M5J 2M2\",\n \"longitude\": -79.3832,\n \"latitude\": 43.6532,\n \"timezone\": \"America/Toronto\",\n \"bio\": \"Certified swim instructor with ten years of experience.\",\n \"serviceIds\": [\n \"srv_01k2example\"\n ],\n \"skillIds\": [\n \"skl_01k2example\"\n ],\n \"languages\": [\n \"en\",\n \"fr\"\n ]\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")
.header("x-api-key", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"phone\": \"+14165550134\",\n \"addressoneline\": \"120 Front St W, Toronto, ON M5J 2M2\",\n \"street\": \"120 Front St W\",\n \"city\": \"Toronto\",\n \"state\": \"CA-ON\",\n \"country\": \"CA\",\n \"postalcode\": \"M5J 2M2\",\n \"longitude\": -79.3832,\n \"latitude\": 43.6532,\n \"timezone\": \"America/Toronto\",\n \"bio\": \"Certified swim instructor with ten years of experience.\",\n \"serviceIds\": [\n \"srv_01k2example\"\n ],\n \"skillIds\": [\n \"skl_01k2example\"\n ],\n \"languages\": [\n \"en\",\n \"fr\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.gomarketbox.com/v1/projects/{projectId}/suppliers/me")
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 \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"phone\": \"+14165550134\",\n \"addressoneline\": \"120 Front St W, Toronto, ON M5J 2M2\",\n \"street\": \"120 Front St W\",\n \"city\": \"Toronto\",\n \"state\": \"CA-ON\",\n \"country\": \"CA\",\n \"postalcode\": \"M5J 2M2\",\n \"longitude\": -79.3832,\n \"latitude\": 43.6532,\n \"timezone\": \"America/Toronto\",\n \"bio\": \"Certified swim instructor with ten years of experience.\",\n \"serviceIds\": [\n \"srv_01k2example\"\n ],\n \"skillIds\": [\n \"skl_01k2example\"\n ],\n \"languages\": [\n \"en\",\n \"fr\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"supplierId": "<string>",
"projectId": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"fullName": "<string>",
"email": "<string>",
"languages": [
"<string>"
],
"locales": [
"<string>"
],
"active": true,
"deleted": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"serviceIds": [
"<string>"
],
"skillIds": [
"<string>"
],
"phone": "<string>",
"addressoneline": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postalcode": "<string>",
"longitude": 123,
"latitude": 123,
"timezone": "<string>",
"bio": "<string>",
"maxTravelTime": 123,
"externalId": "<string>",
"externalData": {},
"defaultLocale": "<string>",
"userId": "<string>",
"invitationStatus": "NONE",
"avatar": {
"variantId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"avatarUrl": "<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
The fields to change