How to set it up the Chinavasion API?
In short you would have your backend issue API calls to our system and parse the results. You have description of provided API calls at https://secure.chinavasion.com/myaccount/my_api_keys.php
Can you help me with connecting my website with your website using API?
API is used for programmatically linking two systems. The documentation is intended for developers as it is usable inside programs running on site to exchange data directly (without human intervention).
The documentation describes how to do this, if this is not something with what you are comfortable with and you do not have your own development team (or person) most probably the API integration is not for you at this time. We are continuing work on enhancing our data integration and will in future provide different modules for specific systems. You can view our data feed section which can provide you data in csv and xml format for easier importing into your system.
Is setting up the API a a one time job & can we pay Chinavasion to do it for us?
Setting up API would be one time job, after the usage would be automatic. We are at this moment not able to provide this service.
Does your API work with eBay?
A: As for the eBay integration, current system can be used for gathering information and this can be used for updating your eBay store. However this is not yet straight forward and more enhanced eBay support is coming soon.
Can you provide support on setting up API usage?
Based on the documentation you are able to implement usage of the API in your backend system. The specifics of that depend on the backend system you use. If you have any specific questions, you can contact us directly.
Can API be used from my xyz system? Can you provide an example?
API can be used from any system that can do https post methods. Provided PHP example shows minimal general requirements. You can use it as basic (meta) code for your desired language to build usable API.
Do you have an example of PHP code to connect to your API?
When providing your API key make sure to input the whole and exact key you have in your account.
Here is very simple example of how API can be used to retrieve data in php:
<?php
$API_KEY = '@@@_PUT_API_KEY_HERE_@@@';
$url = "https://secure.chinavasion.com/api/getProductDetails.php";
$data = array(
'key' => $API_KEY,
'currency' => 'USD',
'model_code' => 'CVNZ-9470-Black-2GEN',
);
$content = json_encode($data);
echo "<blockquote>"; var_dump($content); echo "</blockquote>";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
die("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
echo "<blockquote>"; var_dump($response); echo "</blockquote>";
?>
|