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;








5















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?










share|improve this question






























    5















    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?










    share|improve this question


























      5












      5








      5


      3






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 5 '16 at 9:28









      Alex Paliarush

      11.1k23851




      11.1k23851










      asked Jan 5 '16 at 6:48









      nr5nr5

      2801416




      2801416




















          3 Answers
          3






          active

          oldest

          votes


















          6














          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.






          share|improve this answer

























          • In Magento 2.3, I tried PUT and it works like a charm!

            – Rizwan Dhuka
            Mar 7 at 14:13


















          5














          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)





          share|improve this answer
































            0














            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?






            share|improve this answer








            New contributor




            y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















            • 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











            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
            );



            );













            draft saved

            draft discarded


















            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









            6














            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.






            share|improve this answer

























            • In Magento 2.3, I tried PUT and it works like a charm!

              – Rizwan Dhuka
              Mar 7 at 14:13















            6














            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.






            share|improve this answer

























            • In Magento 2.3, I tried PUT and it works like a charm!

              – Rizwan Dhuka
              Mar 7 at 14:13













            6












            6








            6







            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.






            share|improve this answer















            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.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            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

















            • 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













            5














            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)





            share|improve this answer





























              5














              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)





              share|improve this answer



























                5












                5








                5







                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)





                share|improve this answer















                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)






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 6 '16 at 9:22

























                answered Jan 5 '16 at 9:26









                Alex PaliarushAlex Paliarush

                11.1k23851




                11.1k23851





















                    0














                    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?






                    share|improve this answer








                    New contributor




                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.




















                    • 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















                    0














                    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?






                    share|improve this answer








                    New contributor




                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.




















                    • 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













                    0












                    0








                    0







                    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?






                    share|improve this answer








                    New contributor




                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.










                    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?







                    share|improve this answer








                    New contributor




                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.









                    share|improve this answer



                    share|improve this answer






                    New contributor




                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.









                    answered May 2 at 17:45









                    y2alex007y2alex007

                    1




                    1




                    New contributor




                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.





                    New contributor





                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.






                    y2alex007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.












                    • 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





                    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

















                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?