Input/Output formats

Here you can find detailed information on input parameters required by JotURL API methods along with their output formats.

Input requests

Each JotURL API accepts that the parameters are passed through both the GET and POST HTTP methods.

GET example

HTTP query

https://api.joturl.com/a/v1/shorten?login={PUBLIC_KEY}&key={PRIVATE_KEY}&url=https%3A%2F%2Fwww.joturl.com%2F&alias=jot

related HTTP GET headers

GET /a/v1/shorten?login={PUBLIC_KEY}&key={PRIVATE_KEY}&url=https%3A%2F%2Fwww.joturl.com%2F&alias=jot
HTTP/1.1
Host: api.joturl.com
...

Ouput formats

The JotURL API supports Cross Origin Resource Sharing (CORS) requests from any domain.

All JotURL APIs support four return formats: json, jsonp, xml, txt. Note that the txt (text) format may return only limited information. The default output format is format=json that is also used when the parameter format is invalid (e.g., format=jsonp but no callback parameter is specified).

Query examples and related responses:

queryresponse
format=json
{"status": {"code": 200,
    "text": "OK",
    "error": "",
    "rate": 93},
  "result": {DATA}}
format=jsonp&callback=clbfunc
clbfunc({"status": {"code": 200,
    "text": "OK",
    "error": "",
    "rate": 93},
  "result": {DATA}})
                
format=jsonp
{"status": {"code": 500,
    "text": "MISSING callback",
    "error": "",
    "rate": 52},
  "result": []}
                
format=xml
<?xmlversion="1.0"encoding="UTF-8"?><response><status><code>200</code>  
    <text>OK</text>  
    <error></error>  
    <rate>93</rate>  
  </status>  
  <result>{DATA}</result>  
</response>
format=txt
status_code=200status_text=OKstatus_error=status_rate=93result={DATA}
format=plain
{DATA}

Check the HTTP response status for problems with the request, rate limiting, or other errors.

HTTP response headers

For each request the status code is equal to the HTTP response status that can be:

status
codetexterrorexplanation
200OKsuccessful request
403LIMIT EXCEEDEDdetails on the error if availablerate limit exceeded
404NOT FOUNDdetails on the error if availablethe query is well-formed but there is no available response
500INVALID [PARAMETER]details on the error if availableinvalid parameter [PARAMETER] in the request
INVALID METHOD [METHOD]details on the error if availableinvalid method [METHOD]
MISSING [ARGUMENT]details on the error if availablethe required argument [ARGUMENT] is missing in the request
503GENERIC ERRORdetails on the error if availablean unknown/reserved error occurred or the service is temporarily unavailable