Skip to main content

Imports

You can import subscription products, plans and subscribers using Subscriptions Import. This is useful if you want to import subscriptions from an external system into Elastic Path Subscriptions.

The API uses a JSONL file. Here is an example of a JSONL file.

When you send an import request, an import job is created. Jobs are processed one at a time. You can continue to send import requests, but those jobs are queued. In other words, Subscriptions looks for any jobs that have a status of PENDING and starts the job with the earliest created date. This process is repeated until all jobs are processed. Use List import jobs to see a list of all import jobs.

A file can include up to 50,000 objects. If you have more than 50,000 objects, then you must create a separate file, and import each file, one at a time.

Characteristics of Subscriptions Import

The Subscriptions Import API has the following characteristics:

  • The Subscriptions Import API reads the entire file and then creates the subscription objects. This means the subscription objects can be in any order in the file.

  • Subscriptions imports are asynchronous and are processed one at a time. You can continue to send import requests, but these are queued.

  • The API works on a "best endeavours" approach. In other words, the API does its best to create the subscription objects based on the file that you provide.

Subscriptions Import File

The following table describes the subscriptions objects, and their attributes, that the import file can include.

ObjectAttributes
A product objectThe attributes you specify for a product object are the attributes you specify when you creating a product.
A plan objectThe attributes you specify for a product object are the attributes you specify when you creating a plan.
A subscriber objectThe attributes you specify for a product object are the attributes you specify when you creating a subscriber.