APIs for managing Shopify delivery profiles, shipping rates, zones, and free shipping configuration for subscription memberships
Customer Portal APIs (0.0.1)
Important Note:
The APIs in this document are for reference only and will not work directly in Swagger. To use these APIs, you need to call them from your shop.
The base URL for these APIs is your shop's domain. For example, if your shop domain is https://www.myshop.com/apps, then the full API endpoint will be based on this domain (e.g., https://www.myshop.com/apps/memberships/cp/api/**).
Please ensure the customer is logged in when calling the Customer Portal Proxy API. If the customer is not logged in, the API will return a 401 Unauthorized error.
- https://www.myshop.com/apps/memberships/cp/api/v2/subscription-contracts-add-line-item
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://www.myshop.com/apps/memberships/cp/api/v2/subscription-contracts-add-line-item?contractId=0&shop=string&quantity=0&variantId=string'Request
Updates the status of an existing membership contract (ACTIVE, PAUSED, CANCELLED, or EXPIRED). This is one of the most critical operations for managing membership lifecycles.
Supported Status Values:
- ACTIVE: Membership is active and will process recurring billing
- PAUSED: Membership is temporarily paused, no billing will occur
- CANCELLED: Membership is permanently cancelled, no future billing
- EXPIRED: Membership has expired (typically used when max cycles reached)
Pause Duration:
- When pausing, you can optionally specify
pauseDurationCycleto auto-resume after N cycles - If not specified, membership remains paused until manually reactivated
Business Rules & Validations:
- Customer Portal Restrictions: When called from customer portal, additional validations apply:
- Cannot modify frozen memberships (freeze till min cycle condition)
- Must respect billing cycle limits configured by merchant
- Contract Validation: System validates that the contract belongs to the authenticated shop
- Activity Logging: All status changes are logged with source (merchant portal vs customer portal)
Use Cases:
- Customer wants to pause their membership temporarily
- Merchant needs to cancel a membership due to customer request
- Reactivating a paused membership
- Marking membership as expired when max cycles reached
Authentication: Requires authenticated shop user or customer portal token
- https://www.myshop.com/apps/memberships/cp/api/subscription-contracts-update-status
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://www.myshop.com/apps/memberships/cp/api/subscription-contracts-update-status?contractId=123456789&status=PAUSED&pauseDurationCycle=2'- https://www.myshop.com/apps/memberships/cp/api/subscription-contracts-update-shipping-address
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://www.myshop.com/apps/memberships/cp/api/subscription-contracts-update-shipping-address?contractId=0&shop=string' \
-H 'Content-Type: application/json' \
-d '{
"address1": "string",
"address2": "string",
"city": "string",
"firstName": "string",
"lastName": "string",
"phone": "string",
"province": "string",
"zip": "string",
"country": "string",
"countryCode": "string",
"provinceCode": "string",
"company": "string"
}'