Subrise Subscriptions Documentation for Shopify
Launch App
  • 🌎User Guides
    • πŸ‘‹Getting started with Subrise Subscriptions
    • 🎞️Dashboard Overview
      • πŸ“ŠReports
    • βš“Subscription Setup
      • πŸ‘ΎCreating your Subscription Plan
      • πŸ“™Managing your Subscription
    • πŸ› οΈSettings
      • Integrations
        • Attentive Integration
        • Shopify Flow
        • Klaviyo Integration
        • Zapier Integration
        • Mailchimp Integration
        • Google Sheets Integration
      • Notifications
      • Tags
      • Webhooks
      • Customer Portal
      • Support
    • ☸️Theme Extension
    • ❔FAQ
  • πŸ’»api-docs
    • πŸŒ„Getting Started
    • πŸ”‘Authentication
    • ♻️Subscriptions
      • 🟒GET
      • 🟠UPDATE
      • πŸ”΄DELETE
    • 🍘Products
    • πŸ“ƒSubscription Plans
    • ☺️Customers
    • πŸͺ΅Fields & Events
Powered by GitBook
On this page

Was this helpful?

  1. api-docs

Subscriptions

PreviousAuthenticationNextGET

Last updated 1 year ago

Was this helpful?

πŸ’»
♻️

Retrieve a subscription contract

get

Fetches a single subscription contract by its ID along with its billing attempts.

Path parameters
contractIdstringRequired

The subscription contract ID

Responses
200
A single subscription contract with billing attempts
application/json
400
Error response if the contract ID is invalid or not found
application/json
get
GET /subscription-contracts/{contractId} HTTP/1.1
Host: localhost:3002
Accept: */*
{
  "data": {
    "id": "text",
    "failedBillingCount": 1,
    "subscriptionTotal": 1,
    "draft": true,
    "createdAt": "text",
    "notification_at": "2025-05-16T14:10:26.417Z",
    "notified": true,
    "billingInterval": "text",
    "billingIntervalCount": 1,
    "maxCycles": 1,
    "isPrepaid": true,
    "minCycles": 1,
    "billingAnchorType": "text",
    "billingAnchorDay": 1,
    "billingAnchorMonth": 1,
    "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": 1,
    "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": 1,
        "taxable": true,
        "handle": "text",
        "variantImage": {
          "url": "text"
        },
        "currentPrice": {
          "amount": "text",
          "currencyCode": "text"
        },
        "lineDiscountedPrice": {
          "amount": "text",
          "currencyCode": "text"
        },
        "requiresShipping": true,
        "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": 1,
              "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": 1,
        "taxable": true,
        "handle": "text",
        "variantImage": {
          "url": "text"
        },
        "currentPrice": {
          "amount": "text",
          "currencyCode": "text"
        },
        "lineDiscountedPrice": {
          "amount": "text",
          "currencyCode": "text"
        },
        "requiresShipping": true,
        "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": 1,
              "computedPrice": {
                "amount": "text",
                "currencyCode": "text"
              }
            }
          ]
        }
      }
    ],
    "deliveryMethod": {
      "shippingOption": {
        "code": "text",
        "description": "text"
      }
    },
    "originOrder": {
      "id": "text",
      "legacyResourceId": "text",
      "name": "text",
      "createdAt": "text",
      "amount": "text"
    }
  },
  "billingAttempts": [
    {
      "id": "text",
      "subscription_contract_id": "text",
      "created_at": "2025-05-16T14:10:26.417Z",
      "status": "text",
      "errorMessage": "text"
    }
  ]
}
  • POSTSearch subscription contracts
  • POSTSearch for subscription contracts
  • GETRetrieve a subscription contract

Search subscription contracts

post

Searches for subscription contracts with various filters, sorting, and pagination.

Query parameters
pageintegerOptionalDefault: 1
limitintegerOptionalDefault: 600
Body
Responses
200
A list of subscription contracts with pagination details.
application/json
400
Invalid request parameters.
application/json
post
POST /subscription-contracts/search HTTP/1.1
Host: localhost:3002
Content-Type: application/json
Accept: */*
Content-Length: 401

{
  "filters": {
    "id": "text",
    "customerId": "text",
    "status": "text",
    "firstName": "text",
    "lastName": "text",
    "email": "text",
    "nextBillingDate": "text",
    "nextBillingDateStart": "text",
    "nextBillingDateEnd": "text",
    "productId": "text",
    "maxCycles": "text",
    "failed": true,
    "createdAt": "text",
    "draft": true,
    "isPrepaid": true,
    "searchQuery": "text",
    "sort": {
      "field": "text",
      "direction": 1
    }
  },
  "searchOrder": {
    "field": "text",
    "direction": 1
  }
}
{
  "data": [
    {
      "id": "text",
      "failedBillingCount": 1,
      "subscriptionTotal": 1,
      "draft": true,
      "createdAt": "text",
      "notification_at": "2025-05-16T14:10:26.417Z",
      "notified": true,
      "billingInterval": "text",
      "billingIntervalCount": 1,
      "maxCycles": 1,
      "isPrepaid": true,
      "minCycles": 1,
      "billingAnchorType": "text",
      "billingAnchorDay": 1,
      "billingAnchorMonth": 1,
      "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": 1,
      "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": 1,
          "taxable": true,
          "handle": "text",
          "variantImage": {
            "url": "text"
          },
          "currentPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "lineDiscountedPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "requiresShipping": true,
          "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": 1,
                "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": 1,
          "taxable": true,
          "handle": "text",
          "variantImage": {
            "url": "text"
          },
          "currentPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "lineDiscountedPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "requiresShipping": true,
          "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": 1,
                "computedPrice": {
                  "amount": "text",
                  "currencyCode": "text"
                }
              }
            ]
          }
        }
      ],
      "deliveryMethod": {
        "shippingOption": {
          "code": "text",
          "description": "text"
        }
      },
      "originOrder": {
        "id": "text",
        "legacyResourceId": "text",
        "name": "text",
        "createdAt": "text",
        "amount": "text"
      }
    }
  ],
  "totalCount": 1,
  "pageCount": 1
}

Search for subscription contracts

post

Searches for subscription contracts based on provided filters, search order, and pagination settings.

Query parameters
pageintegerOptional

Page number for pagination

Default: 1
limitintegerOptional

Number of records per page for pagination

Default: 10
Body
Responses
200
Successfully retrieved list of subscription contracts
application/json
400
Bad request due to invalid input parameters
401
Unauthorized if the API key is missing or invalid
post
POST /subscriptions/customer-contracts HTTP/1.1
Host: localhost:3002
Content-Type: application/json
Accept: */*
Content-Length: 142

{
  "filters": {
    "status": "text",
    "customerId": "text",
    "sort": {
      "field": "text",
      "direction": "text"
    }
  },
  "searchOrder": {
    "field": "text",
    "direction": "text"
  }
}
{
  "data": [
    {
      "id": "text",
      "failedBillingCount": 1,
      "subscriptionTotal": 1,
      "draft": true,
      "createdAt": "text",
      "notification_at": "2025-05-16T14:10:26.417Z",
      "notified": true,
      "billingInterval": "text",
      "billingIntervalCount": 1,
      "maxCycles": 1,
      "isPrepaid": true,
      "minCycles": 1,
      "billingAnchorType": "text",
      "billingAnchorDay": 1,
      "billingAnchorMonth": 1,
      "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": 1,
      "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": 1,
          "taxable": true,
          "handle": "text",
          "variantImage": {
            "url": "text"
          },
          "currentPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "lineDiscountedPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "requiresShipping": true,
          "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": 1,
                "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": 1,
          "taxable": true,
          "handle": "text",
          "variantImage": {
            "url": "text"
          },
          "currentPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "lineDiscountedPrice": {
            "amount": "text",
            "currencyCode": "text"
          },
          "requiresShipping": true,
          "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": 1,
                "computedPrice": {
                  "amount": "text",
                  "currencyCode": "text"
                }
              }
            ]
          }
        }
      ],
      "deliveryMethod": {
        "shippingOption": {
          "code": "text",
          "description": "text"
        }
      },
      "originOrder": {
        "id": "text",
        "legacyResourceId": "text",
        "name": "text",
        "createdAt": "text",
        "amount": "text"
      }
    }
  ],
  "totalCount": 1,
  "pageCount": 1
}