Is there a way to receive more robust information from the Shopify API when an error is returned?
{
"errors": {
"customer": "Required parameter missing or invalid"
}
}
This is completely useless. What is missing? Why is is invalid?
I’m posting to /admin/api/2022-04/customers.json. I’ve confirmed that my JSON body is valid. I’ve tried that the X-Shopify-Access-Token is valid. The X-Request-Id is 8d308c91-53b7-4a20-b270-06f49023f476.
@Pegarm
Will you please share the complete request here (I mean input, request url or may be complete request code)?
I’m using Postman. I’m posting to /admin/api/2022-04/customers.json.
My headers are:
- Content-Type: application/json
- X-Shopify-Access-Token: [redacted]
The body of the request is json. Here’s the data structure:
{
"first_name": "First",
"last_name": "Last",
"email": "email@domain.com",
"phone": "1234567890",
"addresses": [
{
"zip": "33181",
"phone": "1234567890",
"last_name": "Last",
"province_code": "FL",
"first_name": "First",
"company": "Company Name",
"name": "First Last",
"city": "North Miami",
"country": "United States",
"province": "Florida",
"country_name": "United States",
"address1": "123 Main St",
"default": true,
"address2": "",
"country_code": "US"
}
],
"password": "myP@ssword",
"password_confirmation": "myP@ssword"
}