Introduction

The API allows you to import and send mobile-calendar data.

Available API

The API offers the following features:

pagePrices and restrictions

Base URL address

For importing data

https://api.mobile-calendar.com/get/

For sending data

https://api.mobile-calendar.com/post/

Each functionality has a different endpoint. HTTPS is required for all connections.

Security

We only allow secure HTTPS encrypted connections. In the absence of HTTPS, you will get a 401 Unauthorized error.

{
    "status" : "error", 
    "erros" : "We only accept secure https connections"
}

Requests and response formats

We receive and send reqests in JSON format.

What is JSON?

A lightweight computer data exchange format. JSON is a text format that is based on a subset of the language JavaScript. The MIME type for JSON isapplication/json.

Data in JSON format is in pairs "name" : "value" and are separated by commas. The braces contain objects and the square brackets contain arrays.

Response from mobile-calendar server

Each request returns a response in JSON format as below.

{
    "status" : "success" | "error",
    "data" : object  | array | string
    "errors" : string | array
}

Error handling

If the request is not in JSON format, you will get the HTTP 400 Bad Request error code. An example of an response:

{
    "status": "error",
    "errors": "400 Bad request"
}

HTTP header codes

200 OK

It means that, the request and response were correct.

Attention! A 200 OK reply does not always mean success.

It can take the value of success | errror. Success means a correct answer, while error indicates that something is wrong. The error message can be found in the errors field.

400 Bad Request

This error indicates an invalid requestformat. Valid format must be a JSON.

401 Unauthorized

Brak nagłówka Authorization lub nieprawidłowe dane logowania powodują ten błąd.

404 Not found

The error means we provided an invalid endpoint URL.

500 Internal server error

This is an error that is the fault of the server. Means there is a code bug in the API.

Please contact the site administrator: info@mobile-calendar.com

Last updated