Migrate an existing customer base

If you already have customers and domains in your own system or at OpenSRS, you can bring them into Storefront in bulk instead of asking each customer to re-register. Every migrated customer arrives already linked to your own records.

This combines bulk customer creation, your own customer ID (external_user_id), and domain import.

How it works

  1. Create customers in batches of up to 100, setting external_user_id on each record.
  2. Import the domains each customer already holds at OpenSRS.
  3. Assign each imported domain to the right customer.

Set it up

Step 1: Create the customers

Send a POST to /v1/customers with a customers list of 1 to 100 records:

{
  "customers": [
    {
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "[email protected]",
      "username": "janedoe01",
      "external_user_id": "your-internal-id-123"
    }
  ]
}

Each record is processed on its own, so one failure does not stop the rest. The response returns num_succeeded, num_failed, and one result per record in the same order you sent them. Each result includes the new customer_id or an error.

Save the customer_id returned for each record. You need it in Step 3.

Step 2: Import the domains

Send a POST to /v1/domains/import with the list of domain names already under your OpenSRS reseller account:

["example.com", "example.net"]

The call is asynchronous and returns a batch ID right away. Duplicates in your list are collapsed, and importing a domain that is already in Storefront is skipped without an error.

Step 3: Assign domains to customers

Send a POST to /v1/domain/{domain}/push_transfer with the destination customer_id as the request body.

What to know

📘

Failed records are not retried for you

Check success on every result in the bulk response. Fix the records with errors and resubmit only those.

  • The API returns 400 with onboarding incomplete until Storefront setup is finished. Complete initial setup first.
  • Stay within your rate limit of 600 requests per minute. Back off when you receive a 429.
  • Test the full flow in your test environment before running it against production.

Related articles


Did this page help you?