Integrate WooCommerce to PromoSoftware Rest API

You have some syntax errors in your example code. Line endings should be ; Im sure you are aware. Your array declaration is missing the trailing ). Also using this library the format is appended to the url so this will fail, leave the format empty. This API only returns json anyway.

This should get you going:

add_action('woocommerce_thankyou', 'send_order_to_ext'); 
function wdm_send_order_to_ext(  ){
$api = new RestClient(array(
'base_url' => "http://api.promosoftware.co.uk/v2/youraccount/yourapikey", 
'format' => ""
));
    $addArray=array();
    $addArray['ContactFirstName'] = 'Dave';
    $addArray['ContactLastName']='Davison';
    $addArray['ContactEmail']='[email protected]';
    $addArray['ContactSalutation']='Davo';
    $addArray['CompanyId']=12;
    $result=$api->post('contact',$addArray);
    json_decode($result->response);//returnsstdClassobject
    json_decode($result->response,true);//returnsassocarray
    var_dump($result);
}

Would advise not publishing your private API key also

Hope this helps.

error code: 523