Chapter 1. Requests/Responses

1.1. Requests
1.2. Responses

1.1. Requests

Each API Request is a simple http GET request of the following type:

API request URL format

http://api.mp3caprice.com/{version}/{method}/{param1}/../{paramN}?api_key={API Key}&sub_account={sub_account}
               
{version}

API version; API is backward compatible

{method}

API methods you are calling; a full methods list can be found in API Methods section

{param}

method's parameters , the number of the parameters can be zero

api_key *

your unique access key to API . This parameter is required in each request to API

sub_account *

optional parameter. Used to separate your requests in activity report.

api_callback *

optional perameter. Aimed to support JSONP. JSONP is script tag injection, passing the response from the server in to a user specified function. How It works you can find here.*

* - Could be passed as Http Header. Name is case sensitive.

Order and number of parameters are critical! Please mind it when creating a request. You should always pass the exact number of parameters which is required by a method; otherwise you will get system errors instead of the expected results. Parameter types are also critical. e.g. string value cannot be passed if method's signature states that type is an integer, etc.

For instructions on how to create an API request as well as for examples for different programming languages refer to API Call Examples section.

Requests made from JavaScript running on your sites must be proxied to avoid same-origin policy conflicts!