Update delivery price for a subscription contract
Updates the fixed delivery price for all future orders in a subscription contract. This allows manual override of calculated shipping rates with a custom delivery fee.
Key Features:
- Sets a fixed delivery price regardless of shipping calculations
- Overrides any dynamic shipping rates from carriers
- Applies to all future orders immediately
- Can set to 0 for free delivery
- Automatically handles invalid discount codes
- Tracks price changes in activity log
How Delivery Pricing Works:
- Calculated Rates: Default behavior uses carrier rates and rules
- Manual Override: This endpoint sets a fixed price
- Precedence: The price you set stays only while the contract’s Use Custom Delivery Price option is on. Otherwise the next automatic shipping price sync, such as the refresh before a recurring order, can replace it. Turn the option on with
PUT /api/external/v2/subscription-contracts-update-delivery-price-overrideandallowDeliveryPriceOverride=true - Currency: Always in shop’s base currency
Common Use Cases:
- Free Shipping Promotions: Set to 0.00
- Flat Rate Shipping: Fixed price regardless of location
- VIP Customer Rates: Special shipping prices
- Subscription Perks: Reduced delivery fees
- Price Corrections: Fix shipping calculation errors
- Regional Adjustments: Custom rates for specific areas
Impact on Orders:
- Next order uses new delivery price, unless an automatic shipping price sync replaces it first (see Precedence)
- All future recurring orders affected
- Existing orders keep original pricing
- Customer sees updated total immediately
- While Use Custom Delivery Price is on, address changes keep the price, except one that switches the delivery type while the “Recalculate shipping price when delivery method changes” setting is on
Price Validation:
- Must be a valid decimal number
- Can be 0 for free shipping
- A price increase can be rejected with
400and the errorKeymanual_delivery_price_cap_exceededwhen it goes over the store’s delivery price limit - Negative values typically rejected by Shopify
- Currency precision respected (e.g., 2 decimals for USD)
Side Effects:
- Invalid discount codes automatically removed
- Activity log created with old/new prices
- No customer email notification sent
- Shipping tax recalculated if applicable
- Total order value updated
Reverting to Calculated Rates:
Turn Use Custom Delivery Price off with PUT /api/external/v2/subscription-contracts-update-delivery-price-override and allowDeliveryPriceOverride=false. The delivery price is then recalculated from your Shopify shipping rates in the background, unless automatic shipping price calculation is turned off in your shop settings. If Shopify returns no rate for the subscription’s delivery method, the price stays as it is and the activity log says why. Updating the delivery method doesn’t revert the price: it turns Use Custom Delivery Price on, except when it applies a live quote on a market-driven shop.
Important Notes:
- Price includes all delivery charges (shipping + handling)
- Does not affect delivery method or speed
- Consider customer communication for increases
- May affect subscription profitability
- Some payment methods may decline on total changes
Authentication: Requires valid X-API-Key header
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price';
const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_bodyQuery Parameters
Response
Successfully updated delivery price and returned the updated subscription contract
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price';
const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-price")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body