Skip to main content

Import a dataset

POST 

/subscriptions/imports

Import a dataset

Request

Query Parameters

    filter string

Body

    external_ref ExternalRef (string)

    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.

    import_file binaryrequired

    The JSONL file you want to upload.

Responses

Success. The import was started.

Schema
    data Import
    id UUID (string)

    The unique identifier.

    type SubscriptionImportType (string)required

    Possible values: [subscription_import]

    attributes ImportAttributesrequired
    external_ref ExternalRef (string)

    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.

    status stringrequired

    Possible values: [pending, started, success, failed]

    The status of job.

    • 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.
    meta ImportMetarequired
    owner stringrequired

    The owner of a resource, either store or organization.

    timestamps Timestampsrequired
    updated_at stringrequired

    The date and time a resource was updated.

    created_at stringrequired

    The date and time a resource was created.

    started_at string

    The date and time a job is started.

    finished_at string

    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
    subscription_product integerrequired

    The total number of products uploaded.

    subscription_plan integerrequired

    The total number of plans uploaded.

    subscription_subscriber integerrequired

    The total number of subscribers uploaded.

    subscription_offering integerrequired

    The total number of offerings uploaded.

    subscription integerrequired

    The total number of subscriptions uploaded.

    imported required
    subscription_product integerrequired

    The total number of products imported.

    subscription_plan integerrequired

    The total number of plans imported.

    subscription_subscriber integerrequired

    The total number of subscribers imported.

    subscription_offering integerrequired

    The total number of offerings imported.

    subscription integerrequired

    The total number of subscriptions imported.

Loading...