UPDATE
Last updated
Last updated
Updates the shipping address for a specific subscription contract.
The ID of the subscription contract whose shipping address is to be updated.
The new shipping address to be applied to the subscription.
Successfully updated the shipping address.
const response = await fetch('http://localhost:3002/subscriptions/{contractId}/shipping-address?shop=text&customerId=text', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"address1": "text",
"city": "text",
"country": "text",
"zip": "text"
}),
});
const data = await response.json();
{
"success": false,
"data": {
"id": "text",
"failedBillingCount": 0,
"subscriptionTotal": 0,
"draft": false,
"createdAt": "text",
"notification_at": "2025-01-18T03:43:24.985Z",
"notified": false,
"billingInterval": "text",
"billingIntervalCount": 0,
"maxCycles": 0,
"isPrepaid": false,
"minCycles": 0,
"billingAnchorType": "text",
"billingAnchorDay": 0,
"billingAnchorMonth": 0,
"currencyCode": "text",
"customer": {
"id": "text",
"addresses": [
{
"id": "text",
"address1": "text",
"address2": "text",
"city": "text",
"company": "text",
"country": "text",
"countryCodeV2": "text",
"firstName": "text",
"lastName": "text",
"phone": "text",
"province": "text",
"provinceCode": "text",
"zip": "text"
}
],
"tags": [
"text"
],
"firstName": "text",
"lastName": "text",
"email": "text",
"phone": "text",
"state": "text",
"createdAt": "text",
"imageUrl": "text"
},
"deliveryPrice": 0,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"orderIds": [
"text"
],
"status": "text",
"shop": "text",
"lines": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"addons": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"deliveryMethod": {
"shippingOption": {
"code": "text",
"description": "text"
}
},
"originOrder": {
"id": "text",
"legacyResourceId": "text",
"name": "text",
"createdAt": "text",
"amount": "text"
}
}
}
Updates the next billing date for a specified subscription contract.
The unique identifier of the subscription contract to update.
The new billing date in ISO 8601 format. This date must be in the future.
Successfully updated the next billing date.
const response = await fetch('http://localhost:3002/subscriptions/{contractId}/next-billing-date?shop=text&customerId=text', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({}),
});
const data = await response.json();
{
"success": false,
"data": {
"id": "text",
"failedBillingCount": 0,
"subscriptionTotal": 0,
"draft": false,
"createdAt": "text",
"notification_at": "2025-01-18T03:43:24.985Z",
"notified": false,
"billingInterval": "text",
"billingIntervalCount": 0,
"maxCycles": 0,
"isPrepaid": false,
"minCycles": 0,
"billingAnchorType": "text",
"billingAnchorDay": 0,
"billingAnchorMonth": 0,
"currencyCode": "text",
"customer": {
"id": "text",
"addresses": [
{
"id": "text",
"address1": "text",
"address2": "text",
"city": "text",
"company": "text",
"country": "text",
"countryCodeV2": "text",
"firstName": "text",
"lastName": "text",
"phone": "text",
"province": "text",
"provinceCode": "text",
"zip": "text"
}
],
"tags": [
"text"
],
"firstName": "text",
"lastName": "text",
"email": "text",
"phone": "text",
"state": "text",
"createdAt": "text",
"imageUrl": "text"
},
"deliveryPrice": 0,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"orderIds": [
"text"
],
"status": "text",
"shop": "text",
"lines": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"addons": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"deliveryMethod": {
"shippingOption": {
"code": "text",
"description": "text"
}
},
"originOrder": {
"id": "text",
"legacyResourceId": "text",
"name": "text",
"createdAt": "text",
"amount": "text"
}
}
}
Adds a new line item to an existing subscription contract, allowing for the inclusion of additional products or variants in the subscription.
The ID of the subscription contract to add the line item to.
The ID of the product variant to be added as a new line item.
The selling plan ID associated with this line item, if applicable.
The quantity of the product variant to be added.
The custom price to apply to this line item, if overriding the default.
Custom attributes associated with the line item.
Successfully added the new line item to the subscription contract.
const response = await fetch('http://localhost:3002/subscriptions/{contractId}/add-line-item?shop=text', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"productVariantId": "text",
"quantity": 0
}),
});
const data = await response.json();
{
"success": false,
"data": {
"id": "text",
"failedBillingCount": 0,
"subscriptionTotal": 0,
"draft": false,
"createdAt": "text",
"notification_at": "2025-01-18T03:43:24.985Z",
"notified": false,
"billingInterval": "text",
"billingIntervalCount": 0,
"maxCycles": 0,
"isPrepaid": false,
"minCycles": 0,
"billingAnchorType": "text",
"billingAnchorDay": 0,
"billingAnchorMonth": 0,
"currencyCode": "text",
"customer": {
"id": "text",
"addresses": [
{
"id": "text",
"address1": "text",
"address2": "text",
"city": "text",
"company": "text",
"country": "text",
"countryCodeV2": "text",
"firstName": "text",
"lastName": "text",
"phone": "text",
"province": "text",
"provinceCode": "text",
"zip": "text"
}
],
"tags": [
"text"
],
"firstName": "text",
"lastName": "text",
"email": "text",
"phone": "text",
"state": "text",
"createdAt": "text",
"imageUrl": "text"
},
"deliveryPrice": 0,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"orderIds": [
"text"
],
"status": "text",
"shop": "text",
"lines": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"addons": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"deliveryMethod": {
"shippingOption": {
"code": "text",
"description": "text"
}
},
"originOrder": {
"id": "text",
"legacyResourceId": "text",
"name": "text",
"createdAt": "text",
"amount": "text"
}
}
}
Adds an addon line item to an existing subscription contract, marking it with custom attributes to signify its addon status.
The ID of the subscription contract to which the addon line item will be added.
A flag indicating whether the line item is an addon. If true, custom attributes for addons are automatically applied.
Successfully added the new addon line item to the subscription contract.
const response = await fetch('http://localhost:3002/subscriptions/{contractId}/add-addon-line-item?shop=text', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({}),
});
const data = await response.json();
{
"success": false,
"data": {
"id": "text",
"failedBillingCount": 0,
"subscriptionTotal": 0,
"draft": false,
"createdAt": "text",
"notification_at": "2025-01-18T03:43:24.985Z",
"notified": false,
"billingInterval": "text",
"billingIntervalCount": 0,
"maxCycles": 0,
"isPrepaid": false,
"minCycles": 0,
"billingAnchorType": "text",
"billingAnchorDay": 0,
"billingAnchorMonth": 0,
"currencyCode": "text",
"customer": {
"id": "text",
"addresses": [
{
"id": "text",
"address1": "text",
"address2": "text",
"city": "text",
"company": "text",
"country": "text",
"countryCodeV2": "text",
"firstName": "text",
"lastName": "text",
"phone": "text",
"province": "text",
"provinceCode": "text",
"zip": "text"
}
],
"tags": [
"text"
],
"firstName": "text",
"lastName": "text",
"email": "text",
"phone": "text",
"state": "text",
"createdAt": "text",
"imageUrl": "text"
},
"deliveryPrice": 0,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"orderIds": [
"text"
],
"status": "text",
"shop": "text",
"lines": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"addons": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"deliveryMethod": {
"shippingOption": {
"code": "text",
"description": "text"
}
},
"originOrder": {
"id": "text",
"legacyResourceId": "text",
"name": "text",
"createdAt": "text",
"amount": "text"
}
}
}
Updates the line items of a subscription contract, allowing changes such as modifying quantities, changing product variants, or applying new selling plans.
The unique identifier of the subscription contract to update.
The ID of the product variant to be added or updated in the subscription.
The selling plan associated with the subscription item.
The quantity of the product variant.
Optional custom price to override the default product variant price.
Successfully updated the line items of the subscription contract.
const response = await fetch('http://localhost:3002/subscriptions/{contractId}/line-item?shop=text&customerId=text', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"productVariantId": "text",
"quantity": 0
}),
});
const data = await response.json();
{
"success": false,
"data": {
"id": "text",
"failedBillingCount": 0,
"subscriptionTotal": 0,
"draft": false,
"createdAt": "text",
"notification_at": "2025-01-18T03:43:24.985Z",
"notified": false,
"billingInterval": "text",
"billingIntervalCount": 0,
"maxCycles": 0,
"isPrepaid": false,
"minCycles": 0,
"billingAnchorType": "text",
"billingAnchorDay": 0,
"billingAnchorMonth": 0,
"currencyCode": "text",
"customer": {
"id": "text",
"addresses": [
{
"id": "text",
"address1": "text",
"address2": "text",
"city": "text",
"company": "text",
"country": "text",
"countryCodeV2": "text",
"firstName": "text",
"lastName": "text",
"phone": "text",
"province": "text",
"provinceCode": "text",
"zip": "text"
}
],
"tags": [
"text"
],
"firstName": "text",
"lastName": "text",
"email": "text",
"phone": "text",
"state": "text",
"createdAt": "text",
"imageUrl": "text"
},
"deliveryPrice": 0,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"orderIds": [
"text"
],
"status": "text",
"shop": "text",
"lines": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"addons": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"deliveryMethod": {
"shippingOption": {
"code": "text",
"description": "text"
}
},
"originOrder": {
"id": "text",
"legacyResourceId": "text",
"name": "text",
"createdAt": "text",
"amount": "text"
}
}
}
Allows toggling the pause state of a subscription contract. Setting the pause
query parameter to true
pauses the subscription, while false
unpauses it.
The unique identifier of the subscription contract to be paused or unpaused.
Successfully updated the pause state of the subscription.
const response = await fetch('http://localhost:3002/subscriptions/{contractId}/pause?shop=text&customerId=text&pause=true', {
method: 'PUT',
headers: {},
});
const data = await response.json();
{
"success": false,
"data": {
"id": "text",
"failedBillingCount": 0,
"subscriptionTotal": 0,
"draft": false,
"createdAt": "text",
"notification_at": "2025-01-18T03:43:24.985Z",
"notified": false,
"billingInterval": "text",
"billingIntervalCount": 0,
"maxCycles": 0,
"isPrepaid": false,
"minCycles": 0,
"billingAnchorType": "text",
"billingAnchorDay": 0,
"billingAnchorMonth": 0,
"currencyCode": "text",
"customer": {
"id": "text",
"addresses": [
{
"id": "text",
"address1": "text",
"address2": "text",
"city": "text",
"company": "text",
"country": "text",
"countryCodeV2": "text",
"firstName": "text",
"lastName": "text",
"phone": "text",
"province": "text",
"provinceCode": "text",
"zip": "text"
}
],
"tags": [
"text"
],
"firstName": "text",
"lastName": "text",
"email": "text",
"phone": "text",
"state": "text",
"createdAt": "text",
"imageUrl": "text"
},
"deliveryPrice": 0,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"orderIds": [
"text"
],
"status": "text",
"shop": "text",
"lines": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"addons": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"deliveryMethod": {
"shippingOption": {
"code": "text",
"description": "text"
}
},
"originOrder": {
"id": "text",
"legacyResourceId": "text",
"name": "text",
"createdAt": "text",
"amount": "text"
}
}
}
Removes a specified add-on line item from an existing subscription contract.
The ID of the subscription contract from which the add-on line item will be removed.
The ID of the line item to be removed from the subscription contract.
Successfully removed the add-on line item from the subscription contract.
const response = await fetch('http://localhost:3002/subscriptions/{contractId}/remove-add-on?shop=text&customerId=text', {
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({}),
});
const data = await response.json();
{
"success": false,
"data": {
"id": "text",
"failedBillingCount": 0,
"subscriptionTotal": 0,
"draft": false,
"createdAt": "text",
"notification_at": "2025-01-18T03:43:24.985Z",
"notified": false,
"billingInterval": "text",
"billingIntervalCount": 0,
"maxCycles": 0,
"isPrepaid": false,
"minCycles": 0,
"billingAnchorType": "text",
"billingAnchorDay": 0,
"billingAnchorMonth": 0,
"currencyCode": "text",
"customer": {
"id": "text",
"addresses": [
{
"id": "text",
"address1": "text",
"address2": "text",
"city": "text",
"company": "text",
"country": "text",
"countryCodeV2": "text",
"firstName": "text",
"lastName": "text",
"phone": "text",
"province": "text",
"provinceCode": "text",
"zip": "text"
}
],
"tags": [
"text"
],
"firstName": "text",
"lastName": "text",
"email": "text",
"phone": "text",
"state": "text",
"createdAt": "text",
"imageUrl": "text"
},
"deliveryPrice": 0,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"orderIds": [
"text"
],
"status": "text",
"shop": "text",
"lines": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"addons": [
{
"id": "text",
"sku": "text",
"title": "text",
"productId": "text",
"variantId": "text",
"variantTitle": "text",
"sellingPlanName": "text",
"displayName": "text",
"sellingPlanId": "text",
"quantity": 0,
"taxable": false,
"handle": "text",
"variantImage": {
"url": "text"
},
"currentPrice": {
"amount": "text",
"currencyCode": "text"
},
"lineDiscountedPrice": {
"amount": "text",
"currencyCode": "text"
},
"requiresShipping": false,
"customAttributes": [
{
"key": "text",
"value": "text"
}
],
"discountAllocations": [
{
"amount": {
"amount": "text",
"currencyCode": "text"
},
"discount": "text"
}
],
"pricingPolicy": {
"basePrice": {
"amount": "text",
"currencyCode": "text"
},
"cycleDiscounts": [
{
"adjustmentType": "text",
"adjustmentValue": {
"SellingPlanPricingPolicyPercentageValue": {
"percentage": "text"
}
},
"afterCycle": 0,
"computedPrice": {
"amount": "text",
"currencyCode": "text"
}
}
]
}
}
],
"deliveryMethod": {
"shippingOption": {
"code": "text",
"description": "text"
}
},
"originOrder": {
"id": "text",
"legacyResourceId": "text",
"name": "text",
"createdAt": "text",
"amount": "text"
}
}
}