Creating Customer Account via Admin API

Topic summary

A company planning to migrate to Shopify needs to transfer existing customer accounts while preserving login credentials and custom data fields including personal information, contact details, physical addresses, web addresses, billing information (IBAN), and other custom fields.

Proposed Solution:

  • Use Shopify’s Admin API POST request to /admin/api/2023-07/customers.json endpoint to create customer profiles with basic information (name, email, phone, addresses)
  • Utilize Metafields for storing custom data fields by posting to /admin/api/2023-07/customers/ID/metafields.json endpoint
  • Example metafield structure provided showing how to add custom fields like web addresses with namespace, key, and value parameters

Critical Limitation:
Shopify does not support importing passwords due to security and privacy reasons (passwords are encrypted). Customers would need to reset passwords upon first login to the new site.

Potential Workarounds:

  • Third-party apps like BIAS (bulk-account-invite-sender) could assist with the migration process
  • Multipass feature (Plus plans only) might fit into the migration workflow

Status: The original poster confirmed the approach is now much clearer. The discussion appears resolved with a viable migration path identified, though the password limitation remains a constraint.

Summarized with AI on November 17. AI used: claude-sonnet-4-5-20250929.

HI Mpraski,

Your approach of leveraging Shopify’s Admin API to create customer profiles is correct. You can indeed use a POST request via the /admin/api/2023-07/customers.json endpoint to create a new customer.

Here is an example of the request body:

{
  "customer": {
  "first_name": "Steve",
  "last_name": "Lastnameson",
  "email": "steve.lastnameson@example.com",
  "phone": "+15142546011",
  "verified_email": true,
  "addresses": [
  {
    "address1": "123 Oak St",
    "city": "Ottawa",
    "province": "ON",
    "phone": "555-1212",
    "zip": "123 ABC",
    "last_name": "Lastnameson",
    "first_name": "Mother",
    "country": "CA"
    }
  ]
 }
}

As for custom data fields, Shopify provides the ability to store additional information for resources like products, customers, and orders with Metafields. To add metafields to a customer, you would need to use the POST/admin/api/2023-07/customers/ID/metafields.json endpoint.

Here is an example of how you can create a metafield for a customer:

{
  "metafield": {
  "namespace": "custom_fields",
  "key": "web_address",
  "value": "www.example.com",
  "value_type": "string",
  "owner_resource": "customer",
  "owner_id": 207119551
  }
}

In the above example you’d replace "web_address" and "[www.example.com](http://www.example.com)" with your custom field key and value respectively.

Where you might have an issue however is around migrating passwords - Shopify does not support importing sensitive information such as passwords due to security and privacy reasons. Your customers would need to reset their passwords upon first log in to the new site and possibly re-enter their billing information. There are some apps such as BAIS that could assist with this part.

Hope this helps and best of luck with the migration!

2 Likes