How to add a new address (shipping or billing or another) via Magento 2 REST API?How do I create a shipment via REST API?get customer info based on email address using rest API in Magento 2Magento2: Add a New Customer AddressSpecifying an existing address for a user's billing / shipping?Remove Add New Address and delete buttons on adminhtmlREST API and setting the quotes Billing & Shipping addressesCan i get all customers, along with their address information, using the REST api?How can i Update Add and Delete user address in Application using PUT http://Base URL/rest/V1/customers/me?How to update customer address using custom Api in magento2?Do I need to add shipping address every time whenever I place a new order in Magento 2 REST API?
How to say something covers all the view up to the horizon line?
Antivirus for Ubuntu 18.04
Referring to person by surname, keep or omit "von"?
Dimmer switch not connected to ground
How can I finally understand the confusing modal verb "мочь"?
Python 3 - simple temperature program version 1.3
Is there a reason why Turkey took the Balkan territories of the Ottoman Empire, instead of Greece or another of the Balkan states?
Emergency stop in plain TeX, pdfTeX, XeTeX and LuaTeX?
How to speed up large double sums in a table?
Debian 9 server no sshd in auth.log
GitLab account hacked and repo wiped
Does Thanos's ship land in the middle of the battlefield in "Avengers: Endgame"?
What is monoid homomorphism exactly?
Can an earth elemental drag a tiny creature underground with Earth Glide?
TIP120 Transistor + Solenoid Failing Randomly
Where to draw the line between quantum mechanics theory and its interpretation(s)?
How to deal with employer who keeps me at work after working hours
How long did it take Captain Marvel to travel to Earth?
Why is the blank symbol not considered part of the input alphabet of a Turing machine?
HSA - Continue to Invest?
Is it normal for gliders not to have attitude indicators?
Two denim hijabs
Transistor gain, what if there is not enough current?
Find the area of the smallest rectangle to contain squares of sizes up to n
How to add a new address (shipping or billing or another) via Magento 2 REST API?
How do I create a shipment via REST API?get customer info based on email address using rest API in Magento 2Magento2: Add a New Customer AddressSpecifying an existing address for a user's billing / shipping?Remove Add New Address and delete buttons on adminhtmlREST API and setting the quotes Billing & Shipping addressesCan i get all customers, along with their address information, using the REST api?How can i Update Add and Delete user address in Application using PUT http://Base URL/rest/V1/customers/me?How to update customer address using custom Api in magento2?Do I need to add shipping address every time whenever I place a new order in Magento 2 REST API?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
There are API's available to fetch and delete address of a customer but not create a new one.
GET /V1/customers/addresses/:addressId
GET /V1/customers/me/billingAddress
GET /V1/customers/:customerId/billingAddress
GET /V1/customers/me/shippingAddress
GET /V1/customers/:customerId/shippingAddress
DELETE /V1/addresses/:addressId
POST Api's are not available publicly?
magento2 customer api rest customer-address
add a comment |
There are API's available to fetch and delete address of a customer but not create a new one.
GET /V1/customers/addresses/:addressId
GET /V1/customers/me/billingAddress
GET /V1/customers/:customerId/billingAddress
GET /V1/customers/me/shippingAddress
GET /V1/customers/:customerId/shippingAddress
DELETE /V1/addresses/:addressId
POST Api's are not available publicly?
magento2 customer api rest customer-address
add a comment |
There are API's available to fetch and delete address of a customer but not create a new one.
GET /V1/customers/addresses/:addressId
GET /V1/customers/me/billingAddress
GET /V1/customers/:customerId/billingAddress
GET /V1/customers/me/shippingAddress
GET /V1/customers/:customerId/shippingAddress
DELETE /V1/addresses/:addressId
POST Api's are not available publicly?
magento2 customer api rest customer-address
There are API's available to fetch and delete address of a customer but not create a new one.
GET /V1/customers/addresses/:addressId
GET /V1/customers/me/billingAddress
GET /V1/customers/:customerId/billingAddress
GET /V1/customers/me/shippingAddress
GET /V1/customers/:customerId/shippingAddress
DELETE /V1/addresses/:addressId
POST Api's are not available publicly?
magento2 customer api rest customer-address
magento2 customer api rest customer-address
edited Jan 5 '16 at 9:28
Alex Paliarush
11.1k23851
11.1k23851
asked Jan 5 '16 at 6:48
nr5nr5
2801416
2801416
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
I was having a similar problem and was digging into the AccountManagement class to find the proper payload. I noticed that the createAccount function checks if a customer ID exists and loads the stored data.
By performing a POST /V1/customers/:id
, I was able to add another address with the following payload:
{ "customer":
"email":"testing2@testing.com",
"firstname":"test",
"lastname":"test",
"websiteId": 0,
"addresses": [
"id": 9,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 9",
"Tiny House 9"
],
"city": "City Nine",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 10",
"Tiny House 10"
],
"city": "City Ten",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
]
By post method how did you do this actually when i am trying it is showing me error of missing route did you write webapi.xml code for this route.
In Magento 2.3, I tried PUT and it works like a charm!
– Rizwan Dhuka
Mar 7 at 14:13
add a comment |
It should be possible to add/update customer addresses using customer repository API:
PUT /V1/customers/:id (for admin)
PUT /V1/customers/me (for customer)
add a comment |
I'm using Magento 2.2, PUT and POST both do not work for adding a new address to an existing account. I get the following error:
"A customer with the same email already exists in an associated website"
Is adding an address to an existing Magento customer only supported in version 2.3 and later?
New contributor
UPDATE: I was able to get the endpoint "PUT /V1/customers/:id" to work but an additional field was needed in the "customer" object. After adding an "id" field (Magento customer ID), I am able to add addresses to an already existing customer account.
– y2alex007
May 2 at 22:25
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f95952%2fhow-to-add-a-new-address-shipping-or-billing-or-another-via-magento-2-rest-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
I was having a similar problem and was digging into the AccountManagement class to find the proper payload. I noticed that the createAccount function checks if a customer ID exists and loads the stored data.
By performing a POST /V1/customers/:id
, I was able to add another address with the following payload:
{ "customer":
"email":"testing2@testing.com",
"firstname":"test",
"lastname":"test",
"websiteId": 0,
"addresses": [
"id": 9,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 9",
"Tiny House 9"
],
"city": "City Nine",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 10",
"Tiny House 10"
],
"city": "City Ten",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
]
By post method how did you do this actually when i am trying it is showing me error of missing route did you write webapi.xml code for this route.
In Magento 2.3, I tried PUT and it works like a charm!
– Rizwan Dhuka
Mar 7 at 14:13
add a comment |
I was having a similar problem and was digging into the AccountManagement class to find the proper payload. I noticed that the createAccount function checks if a customer ID exists and loads the stored data.
By performing a POST /V1/customers/:id
, I was able to add another address with the following payload:
{ "customer":
"email":"testing2@testing.com",
"firstname":"test",
"lastname":"test",
"websiteId": 0,
"addresses": [
"id": 9,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 9",
"Tiny House 9"
],
"city": "City Nine",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 10",
"Tiny House 10"
],
"city": "City Ten",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
]
By post method how did you do this actually when i am trying it is showing me error of missing route did you write webapi.xml code for this route.
In Magento 2.3, I tried PUT and it works like a charm!
– Rizwan Dhuka
Mar 7 at 14:13
add a comment |
I was having a similar problem and was digging into the AccountManagement class to find the proper payload. I noticed that the createAccount function checks if a customer ID exists and loads the stored data.
By performing a POST /V1/customers/:id
, I was able to add another address with the following payload:
{ "customer":
"email":"testing2@testing.com",
"firstname":"test",
"lastname":"test",
"websiteId": 0,
"addresses": [
"id": 9,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 9",
"Tiny House 9"
],
"city": "City Nine",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 10",
"Tiny House 10"
],
"city": "City Ten",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
]
By post method how did you do this actually when i am trying it is showing me error of missing route did you write webapi.xml code for this route.
I was having a similar problem and was digging into the AccountManagement class to find the proper payload. I noticed that the createAccount function checks if a customer ID exists and loads the stored data.
By performing a POST /V1/customers/:id
, I was able to add another address with the following payload:
{ "customer":
"email":"testing2@testing.com",
"firstname":"test",
"lastname":"test",
"websiteId": 0,
"addresses": [
"id": 9,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 9",
"Tiny House 9"
],
"city": "City Nine",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
,
"firstname": "test",
"lastname": "test",
"company": "test technology",
"street": [
"Test Street 10",
"Tiny House 10"
],
"city": "City Ten",
"region_id": 12,
"region": "California",
"postcode": "91790",
"country_id": "US",
"telephone": "1234567890"
]
By post method how did you do this actually when i am trying it is showing me error of missing route did you write webapi.xml code for this route.
edited Mar 6 '18 at 8:18
vishal vishal
32
32
answered Jan 8 '16 at 5:04
cdocdo
761
761
In Magento 2.3, I tried PUT and it works like a charm!
– Rizwan Dhuka
Mar 7 at 14:13
add a comment |
In Magento 2.3, I tried PUT and it works like a charm!
– Rizwan Dhuka
Mar 7 at 14:13
In Magento 2.3, I tried PUT and it works like a charm!
– Rizwan Dhuka
Mar 7 at 14:13
In Magento 2.3, I tried PUT and it works like a charm!
– Rizwan Dhuka
Mar 7 at 14:13
add a comment |
It should be possible to add/update customer addresses using customer repository API:
PUT /V1/customers/:id (for admin)
PUT /V1/customers/me (for customer)
add a comment |
It should be possible to add/update customer addresses using customer repository API:
PUT /V1/customers/:id (for admin)
PUT /V1/customers/me (for customer)
add a comment |
It should be possible to add/update customer addresses using customer repository API:
PUT /V1/customers/:id (for admin)
PUT /V1/customers/me (for customer)
It should be possible to add/update customer addresses using customer repository API:
PUT /V1/customers/:id (for admin)
PUT /V1/customers/me (for customer)
edited Jan 6 '16 at 9:22
answered Jan 5 '16 at 9:26
Alex PaliarushAlex Paliarush
11.1k23851
11.1k23851
add a comment |
add a comment |
I'm using Magento 2.2, PUT and POST both do not work for adding a new address to an existing account. I get the following error:
"A customer with the same email already exists in an associated website"
Is adding an address to an existing Magento customer only supported in version 2.3 and later?
New contributor
UPDATE: I was able to get the endpoint "PUT /V1/customers/:id" to work but an additional field was needed in the "customer" object. After adding an "id" field (Magento customer ID), I am able to add addresses to an already existing customer account.
– y2alex007
May 2 at 22:25
add a comment |
I'm using Magento 2.2, PUT and POST both do not work for adding a new address to an existing account. I get the following error:
"A customer with the same email already exists in an associated website"
Is adding an address to an existing Magento customer only supported in version 2.3 and later?
New contributor
UPDATE: I was able to get the endpoint "PUT /V1/customers/:id" to work but an additional field was needed in the "customer" object. After adding an "id" field (Magento customer ID), I am able to add addresses to an already existing customer account.
– y2alex007
May 2 at 22:25
add a comment |
I'm using Magento 2.2, PUT and POST both do not work for adding a new address to an existing account. I get the following error:
"A customer with the same email already exists in an associated website"
Is adding an address to an existing Magento customer only supported in version 2.3 and later?
New contributor
I'm using Magento 2.2, PUT and POST both do not work for adding a new address to an existing account. I get the following error:
"A customer with the same email already exists in an associated website"
Is adding an address to an existing Magento customer only supported in version 2.3 and later?
New contributor
New contributor
answered May 2 at 17:45
y2alex007y2alex007
1
1
New contributor
New contributor
UPDATE: I was able to get the endpoint "PUT /V1/customers/:id" to work but an additional field was needed in the "customer" object. After adding an "id" field (Magento customer ID), I am able to add addresses to an already existing customer account.
– y2alex007
May 2 at 22:25
add a comment |
UPDATE: I was able to get the endpoint "PUT /V1/customers/:id" to work but an additional field was needed in the "customer" object. After adding an "id" field (Magento customer ID), I am able to add addresses to an already existing customer account.
– y2alex007
May 2 at 22:25
UPDATE: I was able to get the endpoint "PUT /V1/customers/:id" to work but an additional field was needed in the "customer" object. After adding an "id" field (Magento customer ID), I am able to add addresses to an already existing customer account.
– y2alex007
May 2 at 22:25
UPDATE: I was able to get the endpoint "PUT /V1/customers/:id" to work but an additional field was needed in the "customer" object. After adding an "id" field (Magento customer ID), I am able to add addresses to an already existing customer account.
– y2alex007
May 2 at 22:25
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f95952%2fhow-to-add-a-new-address-shipping-or-billing-or-another-via-magento-2-rest-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown