curl --request PATCH \
--url https://api.bookingshake.io/api/invoices/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"external_ref": "MEWS-2026-0042",
"synced_at": "2026-06-18"
}
}
'import requests
url = "https://api.bookingshake.io/api/invoices/{id}"
payload = { "metadata": {
"external_ref": "MEWS-2026-0042",
"synced_at": "2026-06-18"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {external_ref: 'MEWS-2026-0042', synced_at: '2026-06-18'}})
};
fetch('https://api.bookingshake.io/api/invoices/{id}', 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://api.bookingshake.io/api/invoices/{id}",
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([
'metadata' => [
'external_ref' => 'MEWS-2026-0042',
'synced_at' => '2026-06-18'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.bookingshake.io/api/invoices/{id}"
payload := strings.NewReader("{\n \"metadata\": {\n \"external_ref\": \"MEWS-2026-0042\",\n \"synced_at\": \"2026-06-18\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://api.bookingshake.io/api/invoices/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"external_ref\": \"MEWS-2026-0042\",\n \"synced_at\": \"2026-06-18\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bookingshake.io/api/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"external_ref\": \"MEWS-2026-0042\",\n \"synced_at\": \"2026-06-18\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "success",
"data": {
"id": "file-789",
"number": "FAC-2026-0042",
"type": "balance_invoice",
"type_code": 380,
"status": "ongoing",
"pdf_url": "https://storage.googleapis.com/.../FAC-2026-0042.pdf",
"metadata": {
"external_ref": "MEWS-2026-0042",
"synced_at": "2026-06-18"
}
}
}{
"message": "no updatable fields provided"
}{
"message": "not found"
}{
"message": "field 'status' is immutable; only metadata is editable"
}{
"message": "Rate limit exceeded",
"data": {
"limit": 60,
"window": "60 seconds",
"remaining": 0,
"resetAt": "2025-11-17T14:30:00.000Z",
"retryAfter": 45
}
}{
"message": "error"
}Update an invoice
Update the metadata of an issued invoice - a free-form bag of string key/value pairs for your own integration references (external accounting ID, Mews record, sync state…).
An issued invoice is legally immutable: its amounts, lines, and seller/account/contact snapshots are frozen and cannot be changed here. metadata is the only writable field, and sending any other field returns 422. The merge is per key: metadata: { "ref": "ABC" } upserts the ref key; metadata: { "ref": null } deletes it; omitted keys are left untouched.
This endpoint emits no webhook - there is no invoice.updated event.
curl --request PATCH \
--url https://api.bookingshake.io/api/invoices/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"external_ref": "MEWS-2026-0042",
"synced_at": "2026-06-18"
}
}
'import requests
url = "https://api.bookingshake.io/api/invoices/{id}"
payload = { "metadata": {
"external_ref": "MEWS-2026-0042",
"synced_at": "2026-06-18"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {external_ref: 'MEWS-2026-0042', synced_at: '2026-06-18'}})
};
fetch('https://api.bookingshake.io/api/invoices/{id}', 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://api.bookingshake.io/api/invoices/{id}",
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([
'metadata' => [
'external_ref' => 'MEWS-2026-0042',
'synced_at' => '2026-06-18'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.bookingshake.io/api/invoices/{id}"
payload := strings.NewReader("{\n \"metadata\": {\n \"external_ref\": \"MEWS-2026-0042\",\n \"synced_at\": \"2026-06-18\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://api.bookingshake.io/api/invoices/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"external_ref\": \"MEWS-2026-0042\",\n \"synced_at\": \"2026-06-18\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bookingshake.io/api/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"external_ref\": \"MEWS-2026-0042\",\n \"synced_at\": \"2026-06-18\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "success",
"data": {
"id": "file-789",
"number": "FAC-2026-0042",
"type": "balance_invoice",
"type_code": 380,
"status": "ongoing",
"pdf_url": "https://storage.googleapis.com/.../FAC-2026-0042.pdf",
"metadata": {
"external_ref": "MEWS-2026-0042",
"synced_at": "2026-06-18"
}
}
}{
"message": "no updatable fields provided"
}{
"message": "not found"
}{
"message": "field 'status' is immutable; only metadata is editable"
}{
"message": "Rate limit exceeded",
"data": {
"limit": 60,
"window": "60 seconds",
"remaining": 0,
"resetAt": "2025-11-17T14:30:00.000Z",
"retryAfter": 45
}
}{
"message": "error"
}Authorizations
Path Parameters
Body
The only writable part of an issued invoice. The legal invoice (amounts, lines, snapshots) is immutable; sending any field other than metadata returns 422.
Response
Invoice metadata updated successfully. Returns the full invoice in its post-update state.
