Update the delivery (shipping) amount for a subscription
PUT
/api/subscriptions/{id}/delivery-amount
const url = 'https://api.usegro.co/api/subscriptions/example/delivery-amount';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"shipping_amount":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.usegro.co/api/subscriptions/example/delivery-amount \ --header 'Content-Type: application/json' \ --data '{ "shipping_amount": 1 }'Sets the per-order delivery amount charged on the subscription. Updates the subscription total and syncs the new delivery price to the Shopify contract. When a free-shipping discount is active the change is stored and takes effect once the discount ends.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
shipping_amount
required
number
Example generated
{ "shipping_amount": 1}Responses
Section titled “Responses”Media typeapplication/json
object
data
required
object
number
required
string
id
required
string
status
required
string
created_at
string
updated_at
string
is_active
required
boolean
account_id
required
string
total
required
number
pause_reason
string
can_cancel
required
boolean
currency_code
required
string
profile_id
required
string
note
string
paused_at
string
discounts
Array<object>
object
id
string
status
string
created_at
string
updated_at
string
is_active
boolean
discount_code
string
title
string
value
number
currency_code
string
shopify_discount_id
string
target_type
string
recurring_cycle_limit
number
applied_at
string
exhausted_at
string
removed_at
string
is_shipping_discount
boolean
discount_label
string
next_billing_date
string
holiday_moved_from_date
string
next_delivery_date
string
delivery_method
object
type
string
shipping_option
local_delivery_option
subtotal
required
number
discount_amount
required
number
delivery_slot_id
string
shipping_amount
required
number
tax_amount
required
number
delivery_instructions
string
delivery_address
object
address1
string
city
string
country
string
country_code
string
zip
string
lines
required
Array<object>
object
shopify_contract_id
number
billing_interval
required
string
billing_interval_count
required
number
last_payment_reminder_sent_at
string
last_payment_reminder_billing_date
string
payment_day_of_week
number
payment_day_of_month
number
next_production_date
string
delivery_slot_valid
required
boolean
cancelled_at
string
cancellation_reason
string
cancellation_reason_id
string
payment_method_brand
string
payment_method_last4
string
current_billing_cycle
required
number
prior_order_count
required
number
shopify_origin_order_id
string
delivery_interval
required
string
delivery_interval_count
required
number
migration_source_ref
string
custom_attributes
object
pause_reason_id
string
last_order
string
can_pause
required
boolean
can_resume
required
boolean
can_reactivate
required
boolean
is_in_dunning
required
boolean
can_retry_payment
required
boolean
payment_reminder_status
required
string
frequency_label
required
string
entity_label
string
current_dunning_episode
string
delivery_method_label
string
delivery_method_option
string
has_shipping_discount
required
boolean
total_revenue
required
number
profile
One of:
string
object
id
string
timezone
string
address1
string
address2
string
city
string
region
string
country
string
country_code
string
postal_code
string
created_at
string
updated_at
string
full_address
string
external_id
string
email
string
full_name
string
first_name
string
last_name
string
phone_number
string
phone_country
string
sms_consent_source
string
sms_consented_at
string
consent_source
string
consented_at
string
shopify_customer_id
string
shopify_customer_tags
Array<string>
properties
object
delivery_day
delivery_slot
entities
One of:
string
Array<object>
object
id
string
name
string
created_at
string
updated_at
string
is_active
boolean
account_id
string
profile_id
string
archived_at
string
image_url
string
wizard_id
string
entity_type
string
attributes
string
Example
{ "data": { "status": "ACTIVE", "discounts": [ { "status": "ACTIVE", "value_type": "PERCENTAGE", "target_type": "ORDER" } ], "delivery_method": { "type": "shipping" }, "payment_reminder_status": "pending", "profile": { "email_status": "subscribed", "sms_status": "subscribed", "sms_opt_in_level": "single_opt_in" } }}