简体   繁体   中英

How to upload xml product feeds using PHP and Amazon SP-API

I need to update the quantity data. I created a feed document and got a response. Now I need to encrypt xml data and upload it. How can I do that? I'm using guzzle 6 to make API requests. I can't find any examples.

you can use Guzzle Http Client to upload the document.

composer require guzzlehttp/guzzle:^7.0

Example Code:

$options = [
    'headers' => ['Content-Type' => 'text/xml; charset=UTF-8'],
    'body' => $content
];

$client = new Client();
$client->request('PUT', $feedURL, $options);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM