Chilkat Online Tools

Unicode C++ / PrestaShop Webservice Product Resource A-Z / 1 - Create manufacturer

Back to Collection Items

void ChilkatSample(void)
    {
    http.put_BasicAuth(true);    http.put_Login(L"{{webservice_key}}");    http.put_Password(L"password");    xml.put_Tag(L"prestashop");    xml.AddAttribute(L"xmlns:xlink",L"http://www.w3.org/1999/xlink");    xml.GetXmlSb(sbRequestBody);
    }

Curl Command

curl -X POST
	-u '{{webservice_key}}:password'
	-d '<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
    <manufacturer>
        <name>ACMEManufacturer</name>
    </manufacturer>
</prestashop>'
https://localhost:8080/api/manufacturers

Postman Collection Item JSON

{
  "name": "1 - Create manufacturer",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<prestashop xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n    <manufacturer>\n        <name>ACMEManufacturer</name>\n    </manufacturer>\n</prestashop>",
      "options": {
        "raw": {
          "language": "xml"
        }
      }
    },
    "url": {
      "raw": "{{webservice_url}}/api/manufacturers",
      "host": [
        "{{webservice_url}}"
      ],
      "path": [
        "api",
        "manufacturers"
      ]
    }
  },
  "response": [
  ]
}