Im creating a simple integration that should post our WooCommerce orders over to the Deep Data seciton via the API (V3)
Here is a simple example of the request Im trying to make.
Im running this script manually for the time being just to get it working. This is the array Im sending as my request using wp_remote_post($url, $request)
Array
(
[key] => KEY
[url] => URL/ecomOrders
[settings] => Array
(
[method] => POST
[timeout] => 5
[redirection] => 5
[httpversion] => 1.0
[user-agent] => WordPress/5.2.1; https://www.XXXX.com
[blocking] => 1
[body] => {"ecomOrder":{JSONORDER}}
[headers] => Array
(
[Api-Token] => KEY
)
)
)
This is (part of) what I get back from my response.
[body] =>
[response] => Array
(
[code] => 403
[message] => Forbidden
)
I have double checked the API key and URL and just a side note, we are already using the same method and script details in a similar reques to add contacts which is working fine.