Membership Contracts
Update custom attributes on subscription line item
Updates custom attributes (metadata) on a specific subscription line item. Attributes allow storing custom key-value data on individual products in a subscription.
Full behavior, validation rules, and side effects
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
PUT
Update custom attributes on subscription line item
Documentation Index
Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
Use this file to discover all available pages before exploring further.
Headers
Query Parameters
Subscription contract ID
API Key (Deprecated - Use Header X-API-Key instead)
Subscription line item GraphQL ID
Response
Line item attributes successfully updated
Available options:
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN Available options:
SUCCEEDED, FAILED, $UNKNOWN