List import jobs
GET/subscriptions/imports
Retrieves a list of all import jobs.
Request
Query Parameters
Possible values: <= 10000
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the page length store setting is used.
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the page length store setting is used.
Responses
- 200
- 500
Success. A list of import jobs is returned.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- pending - Commerce has received the request but is currently busy processing other requests.
- started - Commerce has started processing the job.
- success - The job has successfully completed.
- failed - The job has failed.
- ]
data Import[]
The unique identifier.
Possible values: [subscription_import
]
attributes ImportAttributesrequired
Possible values: <= 2048 characters
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
Possible values: [pending
, started
, success
, failed
]
The status of job.
meta ImportMetarequired
The owner of a resource, either store
or organization
.
timestamps Timestampsrequired
The date and time a resource was updated.
The date and time a resource was created.
The date and time a job is started.
The date and time a job finished.
records objectrequired
You can track the number of records imported to ensure the completeness, accuracy and integrity of the import. Uploaded shows the number of records ready to be imported into Subscriptions. However, this does not mean they are valid subscription objects, only that they have the correct type and their JSON format is properly formatted. Imported shows the number of records that have been both validated and successfully added to Subscriptions.
uploaded objectrequired
The total number of products uploaded.
The total number of plans uploaded.
The total number of subscribers uploaded.
The total number of offerings uploaded.
The total number of subscriptions uploaded.
imported required
The total number of products imported.
The total number of plans imported.
The total number of subscribers imported.
The total number of offerings imported.
The total number of subscriptions imported.
links object
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"type": "subscription_import",
"attributes": {
"external_ref": "abc123",
"status": "pending"
},
"meta": {
"owner": "store",
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z",
"started_at": "2017-01-10T11:41:19.244842Z",
"finished_at": "2017-01-10T11:41:19.244842Z"
},
"records": {
"uploaded": {
"subscription_product": 50000,
"subscription_plan": 50000,
"subscription_subscriber": 50000,
"subscription_offering": 50000,
"subscription": 50000
},
"imported": {
"subscription_product": 45090,
"subscription_plan": 45090,
"subscription_subscriber": 45090,
"subscription_offering": 45090,
"subscription": 45090
}
}
}
}
],
"links": {}
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500"
}
]
}