Link Search Menu Expand Document

Getting Started

Requirements

  • You must have a Shopify store.
  • You must have Ongoing Subscriptions installed and have selected the Enterprise level plan.

Authentication

Obtaining your API token

You can create your API token through the Ongoing Subscriptions merchant dashboard.

Ongoing Subscriptions -> Settings -> Api Token -> Create Token

Once you generate your token you must make sure that you copy it. After you close the modal the token will never be able to be retrieved again.

If you lose your token, or as an added security precaution you can rotate your API tokens to invalidate stale tokens.

In the same section where you created your original token, you can select “Rotate Token” to immediately invalidate your existing tokens and create a new one.

Create a sandbox development store

Connecting a development sandbox store is highly recommended before using the Ongoing API on your production environment.

How to create a sandbox store

Base URL

The base url for the api is https://app.ongoingubscriptions.com/api/v1.

Required Headers

All requests to the Rest API should contain the following required header parameters:

  • X-Ongoing-Api-Token

Obtaining your API token

  • X-Ongoing-User-Id

The myshopify domain for a shop.

example-store-name.myshopify.com

Example CURL

curl --location --request GET 'https://app.ongoingsubscriptions.com/api/v1/subscriptions?status=ACTIVE' \
    --header 'X-Ongoing-Api-Token: 178|T6E4Sr0gLp3imrtFfrdow4KebYvkc2k8R7DlTMoJ' \
    --header 'X-Ongoing-User-Id: ongoing-dev.myshopify.com'

Next

Subscriptions