curl --request PATCH \
--url https://api.salesbricks.com/api/v2/subscriptions/{subscription_id} \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '{
"starts_at": "2023-12-25",
"contract_length": 2,
"billing_frequency": "MONTHLY",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bricks": [
{
"brick_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"discount": {
"rate": "<string>",
"renews": true
}
}
],
"currency": "USD",
"discount_coupons": [
"<string>"
],
"point_of_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signatory_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auto_renews": true,
"accounts_payable_emails": [
"jsmith@example.com"
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_terms": 499,
"metadata": "<any>",
"custom_order_form_html": "<string>",
"accepted_payment_methods_config": {
"paywall_credit_card": true,
"paywall_check": true,
"paywall_ach": true,
"paywall_wire": true,
"checkout_credit_card": true,
"checkout_ach": true,
"checkout_order_form": true,
"minimum_order_form_tcv": 0,
"paywall_force_autopay": false
}
}'
{
"error": {
"code": "ERR_BAD_REQUEST",
"message": "Bad request — the input payload is malformed, missing required fields, or contains invalid data."
}
}
Updates a subscription for a customer.
curl --request PATCH \
--url https://api.salesbricks.com/api/v2/subscriptions/{subscription_id} \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '{
"starts_at": "2023-12-25",
"contract_length": 2,
"billing_frequency": "MONTHLY",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bricks": [
{
"brick_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"discount": {
"rate": "<string>",
"renews": true
}
}
],
"currency": "USD",
"discount_coupons": [
"<string>"
],
"point_of_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signatory_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auto_renews": true,
"accounts_payable_emails": [
"jsmith@example.com"
],
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_terms": 499,
"metadata": "<any>",
"custom_order_form_html": "<string>",
"accepted_payment_methods_config": {
"paywall_credit_card": true,
"paywall_check": true,
"paywall_ach": true,
"paywall_wire": true,
"checkout_credit_card": true,
"checkout_ach": true,
"checkout_order_form": true,
"minimum_order_form_tcv": 0,
"paywall_force_autopay": false
}
}'
{
"error": {
"code": "ERR_BAD_REQUEST",
"message": "Bad request — the input payload is malformed, missing required fields, or contains invalid data."
}
}
API key for authentication
Subscription update input serializer that comes from previously posted subscription estimate.
The response is of type object
.