Create

You can either create a single item by passing your item in a json format, or you can create multiple records with a single service call by passing an array.

Single Item

To create a new item of your type, you have to execute the following code snippet:

var object = { "Author" : "Sample value" };

$.ajax({
    type: "POST",
    url: 'http://api.everlive.com/v1/your-api-key-here/Books',
    headers: { "Authorization" : "Bearer your-access-token-here" },
    contentType: "application/json",
    data: JSON.stringify(object),
    success: function(data) {
        alert(JSON.stringify(data));
    },
    error: function(error) {
        alert(JSON.stringify(error));
    }
})
Request:
    POST http://api.everlive.com/v1/your-api-key-here/Books
Headers:
    Authorization  Bearer your-access-token-here
Content-Type:
    application/json
Payload - raw:
    { "Author" : "Sample value" }
Response:
    Status: 201 Created
Content-Type:
    application/json

After creating your item, the server will return the ID of the created item along with its Creation date.

Multiple Items

To create multiple items of your type with a single operation, you have to execute the following code snippet:

var multiple = [{ "Author": "Sample Text" }, { "Author": "Second Sample Text" }];

$.ajax({
    type: "POST",
    url: 'http://api.everlive.com/v1/your-api-key-here/Books',
    headers: { "Authorization": "Bearer your-access-token-here" },
    contentType: "application/json",
    data: JSON.stringify(multiple),
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
})
Request:
    POST http://api.everlive.com/v1/your-api-key-here/Books
Header:
    Authorization  Bearer your-access-token-here
Payload - raw:
    [{ "Author": "Sample Text" },
     { "Author" : "Second Sample Text" }]
Response:
    Status: 201 Created
Content-Type:
    application/json