Skip to main content
PATCH
/
v1
/
order_protocol
Update
curl --request PATCH \
  --url https://{defaultHost}/v1/order_protocol \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "order_protocol": {
    "footer": "This is some customer footer text..."
  }
}
'
import requests

url = "https://{defaultHost}/v1/order_protocol"

payload = { "order_protocol": { "footer": "This is some customer footer text..." } }
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({order_protocol: {footer: 'This is some customer footer text...'}})
};

fetch('https://{defaultHost}/v1/order_protocol', 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://{defaultHost}/v1/order_protocol",
  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([
    'order_protocol' => [
        'footer' => 'This is some customer footer text...'
    ]
  ]),
  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://{defaultHost}/v1/order_protocol"

	payload := strings.NewReader("{\n  \"order_protocol\": {\n    \"footer\": \"This is some customer footer text...\"\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://{defaultHost}/v1/order_protocol")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"order_protocol\": {\n    \"footer\": \"This is some customer footer text...\"\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://{defaultHost}/v1/order_protocol")

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  \"order_protocol\": {\n    \"footer\": \"This is some customer footer text...\"\n  }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "bb01910c-7604-450d-8821-23db2f9f8258",
  "object": "order_protocol",
  "capture_geo_address_enabled": false,
  "inherit_customer_enabled": true,
  "footer": "This is some customer footer text...",
  "memo": null,
  "next_sequential_number": 1,
  "number_type": "sequential",
  "number_prefix": null,
  "require_reusable_payment_methods": false,
  "upsells_expire_after_minutes": 30,
  "created_at": 1782485853,
  "updated_at": 1782485853
}

Authorizations

Authorization
string
header
required

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

Body

application/json
order_protocol
object

Response

200 - application/json

Success

id
string | null

The UUID of the specific object.

object
string

A string describing the object type returned.

capture_geo_address_enabled
boolean

Whether or not to reverse-geocode the latitude and longitude captured on checkouts into a geo_address.

inherit_customer_enabled
boolean

Each order has a series of attributes inherited_billing_address, inherited_shipping_address, inherited_tax_identifier, inherited_name, inherited_phone, and inherited_email. If this is enabled, the order will inherit these attributes from the customer when they are not present on the associated checkout. This allows changes to a customers details to be reflected on past orders and statements.

The default footer that is shown on all order statements (i.e. invoices and receipts).

memo
string | null

The default memo that is shown on all order statements (i.e. invoices and receipts).

next_sequential_number
integer

Specified to change the next sequential number to be used. If changed, must be larger than the highest current sequential number.

number_prefix
string | null

The prefix that is added to all order numbers. Must be between 3-12 characters and only include letters.

number_type
string

The type of number to use for orders – one of sequential or token.

require_reusable_payment_methods
boolean
upsells_expire_after_minutes
integer

The number of minutes after an order is paid that upsells will be available for.

created_at
integer | null

Time at which the object was created. Measured in seconds since the Unix epoch.

updated_at
integer | null

Time at which the object was last updated. Measured in seconds since the Unix epoch.