Anuranjan Posted January 20, 2014 Report Posted January 20, 2014 I have created a package which pricing id is 1. I want to add this service under the client id 1. Below is my code: $api = new BlestaApi($url, $user, $key); $data= array('vars'=>array('pricing_id'=>1,'client_id'=>1,'qty'=>1)); $response = $api->post("Services", "add", $data); print_r($response->response()); var_dump($response->errors()); second last line output blank. last line output bool(false). This code was working for me before flushing database. I flushed old data because of testing records. Please let me know what I am doing incorrect. Thanks in advance! -Anuranjan Quote
Tyson Posted January 20, 2014 Report Posted January 20, 2014 What do you mean you 'flushed' the database? Obviously, if you have removed the client, pricing, package, or associated module data, a service could fail to add. If no errors exist, check your API credentials. You may also check the raw response from the request var_dump($response->raw()); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.