Required Customer Data

Topic summary

A developer is encountering a 400 error when attempting to create customers via the Shopify REST API. The error message indicates ‘Required parameter missing or invalid’ for the customer object.

Issue Details:

  • The API consistently returns a 400 status code
  • Error: {'errors': {'customer': 'Required parameter missing or invalid'}}
  • Developer has attempted modifying and removing various parameters without success

Code Context:

  • The provided code snippet appears corrupted or reversed, making it difficult to identify the exact implementation
  • The method appears to involve creating a Shopify customer object and attempting to save it

Current Status:
The issue remains unresolved with no responses yet. The developer needs guidance on which specific customer fields are required by the API or help debugging their request payload.

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

I have a problem when uploading customers from the REST API, when I create a customer, the API returns 400 with the message {‘errors’: {‘customer’: ‘Required parameter missing or invalid’}}.

But I have tried modifying all parameters and deleting the most possible.

The code I use to create the customer is the following:

def create_customer(self, data: dict):
    customer = shopify.Customer()
    for key, value in data.items():
        setattr(customer, key, value)
    try:
        customer.save()
        return customer.id
.....