API Developer Guide
How can we help?
Full Site Search

Using cURL to access HTTP API

You can test most GET method APIs easily by entering API endpoint URLs in your browser. For example, you can try the following URL to access customer account information on the Ragic demo:


https://www.ragic.com/demo/sales/1?api

Note that you may need to modify www to na3, ap5, or eu2 in your URL based on your Ragic account URL.

But it's not as easy to create POST method requests on your browser, so we recommend a tool called cURL for you to create all types of HTTP requests you want to test our API. Our document will also be using cURL commands as samples API calls, but you can also use any tool that you're familiar with to create HTTP requests and parse responses.

You can download cURL for your platform at http://curl.haxx.se/download.html , and you can also read its full documentation at http://curl.haxx.se/docs/manpage.html . But don't worry, we'll tell you about the necessary usages of cURL as we explain the Ragic HTTP API.

After you have downloaded cURL, you can use the following command to access the same endpoint we described above, and you should see the same output as you would in a browser.


curl https://www.ragic.com/demo/sales/1?api

Please note that when using CURL, -d does not encode the content as URL string. If your string content has characters like % or & please use the option --data-urlencode instead of -d.

Top of Page Table of Contents

Start Ragic for Free

Sign up with Google