APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships
- Update custom attributes on subscription line item
External (0.0.1)
Request
Updates an existing line item in a subscription contract, modifying quantity, variant, or price. This endpoint allows comprehensive updates to subscription products.
Line Item Update Process:
- Line Item Identification: Locates line item using GraphQL line ID
- Quantity Update: Changes product quantity for recurring orders
- Variant Change: Can switch to different variant of same product
- Price Override: Optional custom pricing override
- Contract Sync: Updates Shopify subscription contract
- Activity Logging: Records line item modification event
Update Capabilities:
- Quantity Adjustment: Increase or decrease product quantity
- Variant Switching: Change product variant (size, color, flavor, etc.)
- Custom Pricing: Override standard pricing per line item
- Combined Updates: Change multiple properties in single request
Parameters:
- lineId: GraphQL ID of line item to update
- quantity: New quantity (must be positive integer)
- variantId: Product variant ID (can change to different variant)
- price: Custom price override (optional, overrides default pricing)
Price Override:
- Allows custom per-line pricing
- Useful for special pricing arrangements
- Overrides default product pricing
- Price in shop's base currency
Use Cases:
- Customer increases/decreases product quantity
- Switch product variant (e.g., Medium → Large roast)
- Special pricing for VIP customers
- Seasonal variant changes (Summer → Winter flavor)
- Customer portal quantity adjustments
- Wholesale pricing overrides
- Build-a-box quantity modifications
Important Notes:
- Quantity must be positive (use remove-line-item to delete)
- Variant must be valid and available
- Price updates don't affect existing discount percentages
- Changes apply to next billing cycle
Returns: Updated subscription contract object with modified line item
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item?contractId=123456789&api_key=string&quantity=3&variantId=12345678&lineId=gid%3A%2F%2Fshopify%2FSubscriptionLine%2F987654321&price=29.99' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Updates custom attributes (metadata) on a specific subscription line item. Attributes allow storing custom key-value data on individual products in a subscription.
Attribute Update Process:
- Line Item Identification: Locates specific line item using GraphQL line ID
- Attribute Replacement: Replaces existing attributes with new list
- Contract Update: Syncs changes to Shopify subscription contract
- Activity Logging: Records attribute modification event
- Freeze Validation: Ensures subscription isn't frozen before updates
Custom Attributes:
- Key-Value Pairs: Store arbitrary metadata on line items
- Flexible Data: Supports text, numbers, JSON as values
- Per-Item Storage: Each line item has independent attributes
- Order Propagation: Attributes carry forward to generated orders
Attribute Structure:
[
{"key": "gift_message", "value": "Happy Birthday!"},
{"key": "custom_option", "value": "medium_roast"},
{"key": "special_instructions", "value": "Leave at door"}
]Line ID Format:
- GraphQL ID format:
gid://shopify/SubscriptionLine/[ID] - Retrieve from subscription contract details endpoint
- Each line item has unique ID
Use Cases:
- Store gift message customizations per product
- Track product-specific preferences (roast level, flavor, size)
- Custom delivery instructions for specific items
- Personalization options (monogram, engraving text)
- Build-a-box selection metadata
- Product customization workflows
- Integration data synchronization
Important Notes:
- Attributes are replaced, not merged (send all desired attributes)
- Maximum 250 characters per value
- Subscription must not be frozen
- Attributes visible in Shopify admin and order details
Returns: Updated subscription contract object with modified attributes
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
List of custom attributes as key-value pairs
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item-attributes
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item-attributes?contractId=123456789&api_key=string&lineId=gid%3A%2F%2Fshopify%2FSubscriptionLine%2F987654321' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '[
{
"key": "string",
"value": "string"
}
]'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }
Request
Changes the delivery/shipping frequency of a subscription contract. This allows customers to modify how often they receive their subscription orders.
Key Features:
- Flexible Delivery: Change delivery frequency (daily, weekly, monthly, yearly)
- Custom Intervals: Set custom interval counts (e.g., every 2 weeks, every 3 months)
- Independent from Billing: Delivery interval can differ from billing interval
- Immediate Effect: Changes apply to the next delivery cycle
- Activity Logging: All changes are logged for audit trail
Delivery Interval Options:
- DAY: Daily delivery (intervalCount: how many days)
- WEEK: Weekly delivery (intervalCount: how many weeks)
- MONTH: Monthly delivery (intervalCount: how many months)
- YEAR: Yearly delivery (intervalCount: how many years)
Common Examples:
intervalCount=1, interval=MONTH: Deliver monthlyintervalCount=2, interval=WEEK: Deliver every 2 weeksintervalCount=3, interval=MONTH: Deliver quarterlyintervalCount=1, interval=WEEK: Deliver weeklyintervalCount=6, interval=MONTH: Deliver twice a year
Billing vs. Delivery Intervals: These can be different! For example:
- Bill monthly, deliver weekly: Customer pays monthly but receives weekly shipments
- Bill quarterly, deliver monthly: Customer pays every 3 months but receives monthly shipments
- Bill annually, deliver monthly: Customer pays yearly upfront for monthly deliveries
Common Use Cases:
- Customer wants deliveries less frequently (save on shipping)
- Customer wants deliveries more frequently (use products faster)
- Adjust delivery to match consumption rate
- Seasonal frequency changes (more in summer, less in winter)
- Align deliveries with schedule (delivery when home from vacation)
Important Notes:
- Billing Date Unchanged: Only affects delivery schedule, not billing schedule
- Next Delivery Date: System recalculates next delivery date based on new interval
- Order Fulfillment: Each delivery creates a new order at the specified interval
- Prepaid Memberships: Particularly useful for prepaid plans with multiple deliveries
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
- https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-interval
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://membership-admin.appstle.com/api/external/v2/subscription-contracts-update-delivery-interval?contractId=12345&api_key=string&deliveryIntervalCount=1&deliveryInterval=MONTH' \
-H 'X-API-Key: string'{ "get__typename": "string", "id": "string", "createdAt": {}, "updatedAt": {}, "nextBillingDate": {}, "status": "ACTIVE", "deliveryPrice": { "get__typename": "string", "amount": {}, "currencyCode": "USD" }, "lastPaymentStatus": "SUCCEEDED", "billingPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ], "maxCycles": 0, "minCycles": 0 }, "deliveryPolicy": { "get__typename": "string", "interval": "DAY", "intervalCount": 0, "anchors": [ … ] }, "lines": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "customerPaymentMethod": { "get__typename": "string", "id": "string", "instrument": { … }, "revokedAt": {}, "revokedReason": "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" }, "deliveryMethod": { "get__typename": "string", "id": "string", "methodType": "SHIPPING", "serviceCode": "string", "minDeliveryDateTime": {}, "maxDeliveryDateTime": {}, "additionalInformation": { … }, "brandedPromise": { … } }, "originOrder": { "get__typename": "string", "id": "string", "name": "string", "fulfillmentOrders": { … } }, "customer": { "get__typename": "string", "id": "string", "email": "string", "displayName": "string", "firstName": "string", "lastName": "string", "phone": "string" }, "discounts": { "get__typename": "string", "nodes": [ … ], "pageInfo": { … } }, "note": "string", "customAttributes": [ { … } ], "billingAttempts": { "get__typename": "string", "nodes": [ … ] } }