cancel
Showing results for 
Search instead for 
Did you mean: 

Issue when setting both Default Billing and Default Shipping addresses Admin API

Issue when setting both Default Billing and Default Shipping addresses Admin API

Hi,

 

When i tried to update an user getting an error see the below response.

 
    The field Name value is invalid. Set the correct value and try again
 
        field Name default billing

I google and i found one of the forum 

It was working before upgrade on version 2.4.3 but now is not working on version 2.4.7

My current version is 2.4.7x. Please help me out 



1 REPLY 1

Re: Issue when setting both Default Billing and Default Shipping addresses Admin API

Hello @prasadvarac2c7 

 

This typically happens when the field value you're submitting for the Name attribute is either malformed, missing, or in an unexpected format.

Ensure that firstname and lastname are set properly.

There’s no direct Name field; it’s typically split into firstname and lastname fields.

 

Update the Customer’s Address with Correct Data via API

PUT /V1/customers/{customerId}/addresses/{addressId}
{
    "firstname": "Jame",
    "lastname": "T",
    "street": ["1234 Test St"],
    "city": City Name",
    "region": "California",
    "postcode": "90004",
    "country_id": "US",
    "telephone": "1234567",
    "default_billing": true
}

street is an array and must be in the correct format.

default_billing is set to true to mark the address as the default billing address.

 

​Hope it helps ! 

If you find our reply helpful, please give us kudos.

 

A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.

 

WebDesk Solution Support Team

Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

 

 

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9