Get Customer Default Billing address by Webapi in Magento using Endpoint /V1/customers/:customerId/billingAddress
Replace :customerId with an Original customer ID to fetch the Billing address of the Customer.
Action: GET
URL: <Host_Url>/rest/default/V1/customers/:customerId/billingAddress
HEADER: Authorization:Bearer <ADMIN_TOKEN>
Get Admin Token, Generate Admin Token to add in the header.
Request Payload: NULL
Response:
{ "id": 20, "customer_id": 15, "region": { "region_code": "FL", "region": "Florida", "region_id": 18 }, "region_id": 18, "country_id": "US", "street": [ "Ear Guru Street" ], "company": "Samsuns", "telephone": "49628-79787", "postcode": "70707", "city": "Ervin", "firstname": "John", "lastname": "Huges", "default_shipping": true, "default_billing": true }
If the Customer has a Default billing address, the Result will be their default address as an array.
You can also Get the Customer Default Billing address by REST Webapi V1/customers/:customerId/billing address Magento.