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.
Object | Attributes |
---|---|
A product object | The attributes you specify for a product object are the attributes you specify when creating a product. |
A plan object | The attributes you specify for a product object are the attributes you specify when creating a plan. |
A subscriber object | The attributes you specify for a product object are the attributes you specify when creating a subscriber. |
An offering object | The attributes you specify for an offering object are the attributes you specify when building an offering. |
📄️ Import a dataset
Import a dataset
📄️ List import jobs
Retrieves a list of all import jobs.
📄️ Get import
Retrieves the import job for the specified ID.