quick broad question. Does the REST API in Magento 2 still accept XML input? According to the introduction, it does. But further on in the documentation, there is no mention. I have been able to receive XML Formatted data (product) but I have not been able to submit any new products.

If this is still possible, is there any documentation I have overlooked?

  • Could you share your request XML and code ? Jan 29, 2018 at 21:10

1 Answer 1


Yes, the REST API supports payloads in XML format, but it turns out they need to be specially wrapped in magento_api tags. The content-type will also need to be set to application/xml. Here's an example on how to create a customer:

            <city>New York</city>
               <region>New York</region>
               <element>125 Oak Ave</element>
      <email>[email protected]</email>

Note that array data members will need their own tags, like the element tags in the example above.

Apologies for this miss in documentation, and we will work on adding this info to the topic!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.