TomaszMnemonic Posted March 21, 2022 Share Posted March 21, 2022 Hi all, I would like use PUT to updating a few combinations in one request. For test i used Postman application. My url is like a below. PUT https://testonexxx.sellision.dev/api/combinations/ and my xml request <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <combinations> <combination> <id>2903</id> <id_product>86</id_product> <ean13>5903587031052</ean13> <isbn></isbn> <price>3.3300</price> <weight>0.000000</weight> <minimal_quantity>1</minimal_quantity> <default_on>1</default_on> <available_date>0000-00-00</available_date> </combination> <combination> <id>2904</id> <id_product>86</id_product> <ean13>5903587031045</ean13> <isbn></isbn> <price>2.2200</price> <weight>0.000000</weight> <minimal_quantity>1</minimal_quantity> <default_on>1</default_on> <available_date>0000-00-00</available_date> </combination> </combinations> </prestashop> When i send the request with xml data then i've got error : id is required when modifying a resource Is exist any way to solve this problem directly in url/request in Postman? Tomasz Link to comment Share on other sites More sharing options...
Karolek Posted February 27, 2023 Share Posted February 27, 2023 Remove <combinations></combinations> so then you will have: <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <combination> <id>2903</id> <id_product>86</id_product> <ean13>5903587031052</ean13> <isbn></isbn> <price>3.3300</price> <weight>0.000000</weight> <minimal_quantity>1</minimal_quantity> <default_on>1</default_on> <available_date>0000-00-00</available_date> </combination> <combination> <id>2904</id> <id_product>86</id_product> <ean13>5903587031045</ean13> <isbn></isbn> <price>2.2200</price> <weight>0.000000</weight> <minimal_quantity>1</minimal_quantity> <default_on>1</default_on> <available_date>0000-00-00</available_date> </combination> </prestashop> 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now