NAV Navbar
shell python 2185632825 javascript

Introduction

Welcome to the Invoice App API! You can use our API to send each sales records to our database, inorder to send it to the invoice app users.

We have language bindings in python, php and node! You can view code example in dark area to the right,and you can switch the programming language of the examples with the tabs in the top right.

Authentication

Our api services follow OAuth2.0. Each vendor/merchant pos should have following credentials in hand before sending data to our servers.

HTTP Request

POST /api.invoiz.ae/oauth/access_token

Body Parameters

Parameter Description
username email address of the vendor/merchant
password password address of the vendor/merchant
grant_type password
client_id client ID to be send by admin or through subscription
client_secret client secret to be send by admin or through subcription

To authorize, use the code below:-


curl -X POST \
  /api.invoiz.ae/oauth/access_token \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -H 'my-sample-header: Lorem ipsum dolor sit amet' \
  -H 'postman-token: 35f884b2-3834-5eef-810c-863aa1c678f7' \
  -F grant_type=password \
  -F 'username=ryinvoiz+STASHIONERY@gmail.com' \
  -F password=123456789 \
  -F client_id=id8 \
  -F client_secret=secret8


import requests

url = "/api.invoiz.ae/oauth/access_token"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"grant_type\"\r\n\r\npassword\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"username\"\r\n\r\nryinvoiz+STASHIONERY@gmail.com\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n123456789\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"client_id\"\r\n\r\nid8\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"client_secret\"\r\n\r\nsecret8\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'my-sample-header': "Lorem ipsum dolor sit amet",
    'cache-control': "no-cache",
    'postman-token': "7c8d44a6-7a9f-7c59-a55e-be336e5a059e"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

<?php
$request = new HttpRequest();
$request->setUrl('/api.invoiz.ae/oauth/access_token');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'postman-token' => '1549775a-5089-4041-170d-cdbc8b8ed451',
  'cache-control' => 'no-cache',
  'my-sample-header' => 'Lorem ipsum dolor sit amet',
  'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
));

$request->setBody('------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="grant_type"

password
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="username"

ryinvoiz+STASHIONERY@gmail.com
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="password"

123456789
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="client_id"

id8
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="client_secret"

secret8
------WebKitFormBoundary7MA4YWxkTrZu0gW--');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

var request = require("request");

var options = { method: 'POST',
  url: '/api.invoiz.ae/oauth/access_token',
  headers: 
   { 'postman-token': '02dcbf75-d23f-4968-ac33-5532c8f72163',
     'cache-control': 'no-cache',
     'my-sample-header': 'Lorem ipsum dolor sit amet',
     'content-type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' },
  formData: 
   { grant_type: 'password',
     username: 'ryinvoiz+STASHIONERY@gmail.com',
     password: '123456789',
     client_id: 'id8',
     client_secret: 'secret8' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

The above command returns JSON structured like this:

{
    "access_token": "mYWmXwN5idjshvwSzbwHmWIdEPo3ueaO64E2v5wp",
    "token_type": "Bearer",
    "expires_in": 3600,
    "refresh_token": "cKu3B6GUN0yofNREACKNAva4W1vVvBaCAOBnNYeM"
}

Sales

Send sales Data

HTTP Request

POST : /api.invoiz.ae/sale/create

Description

All clients using the api must send the json data to our servers for all sales related data inorder to send it to app users. Please refer to the sample code on the right side of the screen.


curl -X POST \
  /api.invoiz.ae/sale/create \
  -H 'Authorization: Bearer XPMDLNJSzw24FTJdia4VrAuUms6xhkIm4skHEjDH' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: be720ffe-2259-41b9-bdb3-529553f34e14' \
  -d '{
    "payload" : {
    "created_at": "2018-07-30 10:45:47",
    "customer": {
        "balance": "0.00000",
        "company_name": null,
        "contact_first_name": "harminder",
        "contact_last_name": null,
        "created_at": "2018-07-30 10:45:36",
        "custom_field_1": null,
        "custom_field_2": null,
        "custom_field_3": null,
        "custom_field_4": null,
        "customer_code": "harminder-GKAH",
        "customer_group_id": "06bd64da-d87a-11e8-f71b-8d94d30d34de",
        "date_of_birth": null,
        "deleted_at": null,
        "do_not_email": true,
        "email": "sharminder14@gmail.com",
        "enable_loyalty": false,
        "fax": null,
        "first_name": "harminder",
        "id": "06bd64da-d8d6-11e8-f71b-93e5b151d45b",
        "last_name": null,
        "loyalty_balance": "0.00000",
        "mobile": "9599273976",
        "note": null,
        "phone": null,
        "points": 0,
        "sex": null,
        "updated_at": "2018-07-30 10:45:47",
        "year_to_date": "49.90000"
    },
    "customer_id": "06bd64da-d8d6-11e8-f71b-93e5b151d45b",
    "deleted_at": null,
    "id": "55700008-26c6-85ff-11e8-93e599dc091c",
    "invoice_number": "11",
    "note": "",
    "register_id": "06bd64da-d87a-11e8-f71b-8d94d319633f",
    "register_sale_payments": [{
        "amount": 49.9,
        "id": "55700008-26c6-85ff-11e8-93e5b4d42e12",
        "payment_date": "2018-07-30T10:45:42Z",
        "payment_type": {
            "has_native_support": false,
            "id": "1",
            "name": "Cash"
        },
        "payment_type_id": 1,
        "retailer_payment_type": {
            "config": null,
            "id": "06bd64da-d87a-11e8-f71b-8d94d319d0e6",
            "name": "Cash",
            "payment_type_id": "1"
        },
        "retailer_payment_type_id": "06bd64da-d87a-11e8-f71b-8d94d319d0e6"
    }],
    "register_sale_products": [{
        "product_name" : "No man",
        "product_description" : "Lorem ipsum",
        "return_policy" : "no return applied",
        "warranty_period" : 1,
        "discount": "0.00000",
        "id": "55700008-26c6-85ff-11e8-93e59fc1484e",
        "loyalty_value": "0.00000",
        "price": "49.90000",
        "price_set": false,
        "price_total": "49.90000",
        "product_id": "06bd64da-d8d6-11e8-f71b-8d94d39a3347",
        "quantity": 1,
        "tax": "0.00000",
        "tax_id": "06bd64da-d87a-11e8-f71b-8d94d30fda2a",
        "tax_total": "0.00000"
    }],
    "sale_date": "2018-07-30T10:45:42Z",
    "short_code": "hi3ylo",
    "source": "USER",
    "source_id": null,
    "status": "CLOSED",
    "taxes": [{
        "id": "d3108062-8d94-11e8-b71b-06bd64dad87a",
        "name": "No Tax",
        "rate": "0.00000",
        "tax": 0
    }],
    "totals": {
        "total_loyalty": "0.00000",
        "total_payment": "49.90000",
        "total_price": "49.90000",
        "total_tax": "0.00000",
        "total_to_pay": "0.00000"
    },
    "updated_at": "2018-07-30T10:45:47+00:00",
    "user": {
        "created_at": "2018-07-22 09:51:37",
        "display_name": "RKRElectronika",
        "email": "ryinvoiz+rkrelectronika@gmail.com",
        "id": "06bd64da-d87a-11e8-f71b-8d94d31a9353",
        "name": "ryinvoiz+rkrelectronika@gmail.com",
        "target_daily": null,
        "target_monthly": null,
        "target_weekly": null,
        "updated_at": "2018-07-25 12:17:05"
    },
    "user_id": "06bd64da-d87a-11e8-f71b-8d94d31a9353",
    "version": 7802662903
}
}'

<?php

$request = new HttpRequest();
$request->setUrl('/api.invoiz.ae/sale/create');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Postman-Token' => '265e3287-14af-4b4a-82e4-870b8c8c175a',
  'Cache-Control' => 'no-cache',
  'Authorization' => 'Bearer XPMDLNJSzw24FTJdia4VrAuUms6xhkIm4skHEjDH',
  'Content-Type' => 'application/json'
));

$request->setBody('{
    "payload" : {
    "created_at": "2018-07-30 10:45:47",
    "customer": {
        "balance": "0.00000",
        "company_name": null,
        "contact_first_name": "harminder",
        "contact_last_name": null,
        "created_at": "2018-07-30 10:45:36",
        "custom_field_1": null,
        "custom_field_2": null,
        "custom_field_3": null,
        "custom_field_4": null,
        "customer_code": "harminder-GKAH",
        "customer_group_id": "06bd64da-d87a-11e8-f71b-8d94d30d34de",
        "date_of_birth": null,
        "deleted_at": null,
        "do_not_email": true,
        "email": "sharminder14@gmail.com",
        "enable_loyalty": false,
        "fax": null,
        "first_name": "harminder",
        "id": "06bd64da-d8d6-11e8-f71b-93e5b151d45b",
        "last_name": null,
        "loyalty_balance": "0.00000",
        "mobile": "9599273976",
        "note": null,
        "phone": null,
        "points": 0,
        "sex": null,
        "updated_at": "2018-07-30 10:45:47",
        "year_to_date": "49.90000"
    },
    "customer_id": "06bd64da-d8d6-11e8-f71b-93e5b151d45b",
    "deleted_at": null,
    "id": "55700008-26c6-85ff-11e8-93e599dc091c",
    "invoice_number": "11",
    "note": "",
    "register_id": "06bd64da-d87a-11e8-f71b-8d94d319633f",
    "register_sale_payments": [{
        "amount": 49.9,
        "id": "55700008-26c6-85ff-11e8-93e5b4d42e12",
        "payment_date": "2018-07-30T10:45:42Z",
        "payment_type": {
            "has_native_support": false,
            "id": "1",
            "name": "Cash"
        },
        "payment_type_id": 1,
        "retailer_payment_type": {
            "config": null,
            "id": "06bd64da-d87a-11e8-f71b-8d94d319d0e6",
            "name": "Cash",
            "payment_type_id": "1"
        },
        "retailer_payment_type_id": "06bd64da-d87a-11e8-f71b-8d94d319d0e6"
    }],
    "register_sale_products": [{
        "product_name" : "No man",
        "product_description" : "Lorem ipsum",
        "return_policy" : "no return applied",
        "warranty_period" : 1,
        "discount": "0.00000",
        "id": "55700008-26c6-85ff-11e8-93e59fc1484e",
        "loyalty_value": "0.00000",
        "price": "49.90000",
        "price_set": false,
        "price_total": "49.90000",
        "product_id": "06bd64da-d8d6-11e8-f71b-8d94d39a3347",
        "quantity": 1,
        "tax": "0.00000",
        "tax_id": "06bd64da-d87a-11e8-f71b-8d94d30fda2a",
        "tax_total": "0.00000"
    }],
    "sale_date": "2018-07-30T10:45:42Z",
    "short_code": "hi3ylo",
    "source": "USER",
    "source_id": null,
    "status": "CLOSED",
    "taxes": [{
        "id": "d3108062-8d94-11e8-b71b-06bd64dad87a",
        "name": "No Tax",
        "rate": "0.00000",
        "tax": 0
    }],
    "totals": {
        "total_loyalty": "0.00000",
        "total_payment": "49.90000",
        "total_price": "49.90000",
        "total_tax": "0.00000",
        "total_to_pay": "0.00000"
    },
    "updated_at": "2018-07-30T10:45:47+00:00",
    "user": {
        "created_at": "2018-07-22 09:51:37",
        "display_name": "RKRElectronika",
        "email": "ryinvoiz+rkrelectronika@gmail.com",
        "id": "06bd64da-d87a-11e8-f71b-8d94d31a9353",
        "name": "ryinvoiz+rkrelectronika@gmail.com",
        "target_daily": null,
        "target_monthly": null,
        "target_weekly": null,
        "updated_at": "2018-07-25 12:17:05"
    },
    "user_id": "06bd64da-d87a-11e8-f71b-8d94d31a9353",
    "version": 7802662903
}
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

var request = require("request");

var options = { method: 'POST',
  url: '/api.invoiz.ae/sale/create',
  headers: 
   { 'Postman-Token': 'd53870f8-e170-4dc0-bca8-4adeb3df7997',
     'Cache-Control': 'no-cache',
     Authorization: 'Bearer XPMDLNJSzw24FTJdia4VrAuUms6xhkIm4skHEjDH',
     'Content-Type': 'application/json' },
  body: 
   { payload: 
      { created_at: '2018-07-30 10:45:47',
        customer: 
         { balance: '0.00000',
           company_name: null,
           contact_first_name: 'harminder',
           contact_last_name: null,
           created_at: '2018-07-30 10:45:36',
           custom_field_1: null,
           custom_field_2: null,
           custom_field_3: null,
           custom_field_4: null,
           customer_code: 'harminder-GKAH',
           customer_group_id: '06bd64da-d87a-11e8-f71b-8d94d30d34de',
           date_of_birth: null,
           deleted_at: null,
           do_not_email: true,
           email: 'sharminder14@gmail.com',
           enable_loyalty: false,
           fax: null,
           first_name: 'harminder',
           id: '06bd64da-d8d6-11e8-f71b-93e5b151d45b',
           last_name: null,
           loyalty_balance: '0.00000',
           mobile: '9599273976',
           note: null,
           phone: null,
           points: 0,
           sex: null,
           updated_at: '2018-07-30 10:45:47',
           year_to_date: '49.90000' },
        customer_id: '06bd64da-d8d6-11e8-f71b-93e5b151d45b',
        deleted_at: null,
        id: '55700008-26c6-85ff-11e8-93e599dc091c',
        invoice_number: '11',
        note: '',
        register_id: '06bd64da-d87a-11e8-f71b-8d94d319633f',
        register_sale_payments: 
         [ { amount: 49.9,
             id: '55700008-26c6-85ff-11e8-93e5b4d42e12',
             payment_date: '2018-07-30T10:45:42Z',
             payment_type: { has_native_support: false, id: '1', name: 'Cash' },
             payment_type_id: 1,
             retailer_payment_type: 
              { config: null,
                id: '06bd64da-d87a-11e8-f71b-8d94d319d0e6',
                name: 'Cash',
                payment_type_id: '1' },
             retailer_payment_type_id: '06bd64da-d87a-11e8-f71b-8d94d319d0e6' } ],
        register_sale_products: 
         [ { product_name: 'No man',
             product_description: 'Lorem ipsum',
             return_policy: 'no return applied',
             warranty_period: 1,
             discount: '0.00000',
             id: '55700008-26c6-85ff-11e8-93e59fc1484e',
             loyalty_value: '0.00000',
             price: '49.90000',
             price_set: false,
             price_total: '49.90000',
             product_id: '06bd64da-d8d6-11e8-f71b-8d94d39a3347',
             quantity: 1,
             tax: '0.00000',
             tax_id: '06bd64da-d87a-11e8-f71b-8d94d30fda2a',
             tax_total: '0.00000' } ],
        sale_date: '2018-07-30T10:45:42Z',
        short_code: 'hi3ylo',
        source: 'USER',
        source_id: null,
        status: 'CLOSED',
        taxes: 
         [ { id: 'd3108062-8d94-11e8-b71b-06bd64dad87a',
             name: 'No Tax',
             rate: '0.00000',
             tax: 0 } ],
        totals: 
         { total_loyalty: '0.00000',
           total_payment: '49.90000',
           total_price: '49.90000',
           total_tax: '0.00000',
           total_to_pay: '0.00000' },
        updated_at: '2018-07-30T10:45:47+00:00',
        user: 
         { created_at: '2018-07-22 09:51:37',
           display_name: 'RKRElectronika',
           email: 'ryinvoiz+rkrelectronika@gmail.com',
           id: '06bd64da-d87a-11e8-f71b-8d94d31a9353',
           name: 'ryinvoiz+rkrelectronika@gmail.com',
           target_daily: null,
           target_monthly: null,
           target_weekly: null,
           updated_at: '2018-07-25 12:17:05' },
        user_id: '06bd64da-d87a-11e8-f71b-8d94d31a9353',
        version: 7802662903 } },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

import requests

url = "/api.invoiz.ae/sale/create"

payload = "{\n\t\"payload\" : {\n\t\"created_at\": \"2018-07-30 10:45:47\",\n\t\"customer\": {\n\t\t\"balance\": \"0.00000\",\n\t\t\"company_name\": null,\n\t\t\"contact_first_name\": \"harminder\",\n\t\t\"contact_last_name\": null,\n\t\t\"created_at\": \"2018-07-30 10:45:36\",\n\t\t\"custom_field_1\": null,\n\t\t\"custom_field_2\": null,\n\t\t\"custom_field_3\": null,\n\t\t\"custom_field_4\": null,\n\t\t\"customer_code\": \"harminder-GKAH\",\n\t\t\"customer_group_id\": \"06bd64da-d87a-11e8-f71b-8d94d30d34de\",\n\t\t\"date_of_birth\": null,\n\t\t\"deleted_at\": null,\n\t\t\"do_not_email\": true,\n\t\t\"email\": \"sharminder14@gmail.com\",\n\t\t\"enable_loyalty\": false,\n\t\t\"fax\": null,\n\t\t\"first_name\": \"harminder\",\n\t\t\"id\": \"06bd64da-d8d6-11e8-f71b-93e5b151d45b\",\n\t\t\"last_name\": null,\n\t\t\"loyalty_balance\": \"0.00000\",\n\t\t\"mobile\": \"9599273976\",\n\t\t\"note\": null,\n\t\t\"phone\": null,\n\t\t\"points\": 0,\n\t\t\"sex\": null,\n\t\t\"updated_at\": \"2018-07-30 10:45:47\",\n\t\t\"year_to_date\": \"49.90000\"\n\t},\n\t\"customer_id\": \"06bd64da-d8d6-11e8-f71b-93e5b151d45b\",\n\t\"deleted_at\": null,\n\t\"id\": \"55700008-26c6-85ff-11e8-93e599dc091c\",\n\t\"invoice_number\": \"11\",\n\t\"note\": \"\",\n\t\"register_id\": \"06bd64da-d87a-11e8-f71b-8d94d319633f\",\n\t\"register_sale_payments\": [{\n\t\t\"amount\": 49.9,\n\t\t\"id\": \"55700008-26c6-85ff-11e8-93e5b4d42e12\",\n\t\t\"payment_date\": \"2018-07-30T10:45:42Z\",\n\t\t\"payment_type\": {\n\t\t\t\"has_native_support\": false,\n\t\t\t\"id\": \"1\",\n\t\t\t\"name\": \"Cash\"\n\t\t},\n\t\t\"payment_type_id\": 1,\n\t\t\"retailer_payment_type\": {\n\t\t\t\"config\": null,\n\t\t\t\"id\": \"06bd64da-d87a-11e8-f71b-8d94d319d0e6\",\n\t\t\t\"name\": \"Cash\",\n\t\t\t\"payment_type_id\": \"1\"\n\t\t},\n\t\t\"retailer_payment_type_id\": \"06bd64da-d87a-11e8-f71b-8d94d319d0e6\"\n\t}],\n\t\"register_sale_products\": [{\n\t\t\"product_name\" : \"No man\",\n\t\t\"product_description\" : \"Lorem ipsum\",\n\t\t\"return_policy\" : \"no return applied\",\n\t\t\"warranty_period\" : 1,\n\t\t\"discount\": \"0.00000\",\n\t\t\"id\": \"55700008-26c6-85ff-11e8-93e59fc1484e\",\n\t\t\"loyalty_value\": \"0.00000\",\n\t\t\"price\": \"49.90000\",\n\t\t\"price_set\": false,\n\t\t\"price_total\": \"49.90000\",\n\t\t\"product_id\": \"06bd64da-d8d6-11e8-f71b-8d94d39a3347\",\n\t\t\"quantity\": 1,\n\t\t\"tax\": \"0.00000\",\n\t\t\"tax_id\": \"06bd64da-d87a-11e8-f71b-8d94d30fda2a\",\n\t\t\"tax_total\": \"0.00000\"\n\t}],\n\t\"sale_date\": \"2018-07-30T10:45:42Z\",\n\t\"short_code\": \"hi3ylo\",\n\t\"source\": \"USER\",\n\t\"source_id\": null,\n\t\"status\": \"CLOSED\",\n\t\"taxes\": [{\n\t\t\"id\": \"d3108062-8d94-11e8-b71b-06bd64dad87a\",\n\t\t\"name\": \"No Tax\",\n\t\t\"rate\": \"0.00000\",\n\t\t\"tax\": 0\n\t}],\n\t\"totals\": {\n\t\t\"total_loyalty\": \"0.00000\",\n\t\t\"total_payment\": \"49.90000\",\n\t\t\"total_price\": \"49.90000\",\n\t\t\"total_tax\": \"0.00000\",\n\t\t\"total_to_pay\": \"0.00000\"\n\t},\n\t\"updated_at\": \"2018-07-30T10:45:47+00:00\",\n\t\"user\": {\n\t\t\"created_at\": \"2018-07-22 09:51:37\",\n\t\t\"display_name\": \"RKRElectronika\",\n\t\t\"email\": \"ryinvoiz+rkrelectronika@gmail.com\",\n\t\t\"id\": \"06bd64da-d87a-11e8-f71b-8d94d31a9353\",\n\t\t\"name\": \"ryinvoiz+rkrelectronika@gmail.com\",\n\t\t\"target_daily\": null,\n\t\t\"target_monthly\": null,\n\t\t\"target_weekly\": null,\n\t\t\"updated_at\": \"2018-07-25 12:17:05\"\n\t},\n\t\"user_id\": \"06bd64da-d87a-11e8-f71b-8d94d31a9353\",\n\t\"version\": 7802662903\n}\n}"
headers = {
    'Content-Type': "application/json",
    'Authorization': "Bearer XPMDLNJSzw24FTJdia4VrAuUms6xhkIm4skHEjDH",
    'Cache-Control': "no-cache",
    'Postman-Token': "fd12be16-ebe3-49ba-909f-50429c4d5463"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns JSON structured like this:

{
    "code": 200,
    "message": "The supplied JSON validates against the schema"
}

Our api follow the following json schema :-

{
  "$id": "/invoice.com/invoice.json",
  "type": "object",
  "definitions": {},
  "$schema": "/json-schema.org/draft-07/schema#",
  "properties": {
    "created_at": {
      "$id": "/properties/created_at",
      "type": "string",
      "title": "The Created_at Schema ",
      "default": "",
      "examples": [
        "2018-07-06 11:28:59"
      ]
    },
    "customer": {
      "$id": "/properties/customer",
      "type": "object",
      "properties": {
        "balance": {
          "$id": "/properties/customer/properties/balance",
          "type": "string",
          "title": "The Balance Schema ",
          "default": "",
          "examples": [
            "0.00000"
          ]
        },
        "company_name": {
          "$id": "/properties/customer/properties/company_name",
          "type": "null",
          "title": "The Company_name Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "contact_first_name": {
          "$id": "/properties/customer/properties/contact_first_name",
          "type": "string",
          "title": "The Contact_first_name Schema ",
          "default": "",
          "examples": [
            "ryan"
          ]
        },
        "contact_last_name": {
          "$id": "/properties/customer/properties/contact_last_name",
          "type": "string",
          "title": "The Contact_last_name Schema ",
          "default": "",
          "examples": [
            "r"
          ]
        },
        "created_at": {
          "$id": "/properties/customer/properties/created_at",
          "type": "string",
          "title": "The Created_at Schema ",
          "default": "",
          "examples": [
            "2018-06-22 04:03:34"
          ]
        },
        "custom_field_1": {
          "$id": "/properties/customer/properties/custom_field_1",
          "type": "null",
          "title": "The Custom_field_1 Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "custom_field_2": {
          "$id": "/properties/customer/properties/custom_field_2",
          "type": "null",
          "title": "The Custom_field_2 Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "custom_field_3": {
          "$id": "/properties/customer/properties/custom_field_3",
          "type": "null",
          "title": "The Custom_field_3 Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "custom_field_4": {
          "$id": "/properties/customer/properties/custom_field_4",
          "type": "null",
          "title": "The Custom_field_4 Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "customer_code": {
          "$id": "/properties/customer/properties/customer_code",
          "type": "string",
          "title": "The Customer_code Schema ",
          "default": "",
          "examples": [
            "ryan-UPVD"
          ]
        },
        "customer_group_id": {
          "$id": "/properties/customer/properties/customer_group_id",
          "type": "string",
          "title": "The Customer_group_id Schema ",
          "default": "",
          "examples": [
            "06bd64da-d87a-11e8-f71b-705a7abe1bbd"
          ]
        },
        "date_of_birth": {
          "$id": "/properties/customer/properties/date_of_birth",
          "type": "null",
          "title": "The Date_of_birth Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "deleted_at": {
          "$id": "/properties/customer/properties/deleted_at",
          "type": "null",
          "title": "The Deleted_at Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "do_not_email": {
          "$id": "/properties/customer/properties/do_not_email",
          "type": "boolean",
          "title": "The Do_not_email Schema ",
          "default": false,
          "examples": [
            true
          ]
        },
        "email": {
          "$id": "/properties/customer/properties/email",
          "type": "string",
          "title": "The Email Schema ",
          "default": "",
          "examples": [
            "rkr245@gmail.com"
          ]
        },
        "enable_loyalty": {
          "$id": "/properties/customer/properties/enable_loyalty",
          "type": "boolean",
          "title": "The Enable_loyalty Schema ",
          "default": false,
          "examples": [
            false
          ]
        },
        "fax": {
          "$id": "/properties/customer/properties/fax",
          "type": "null",
          "title": "The Fax Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "first_name": {
          "$id": "/properties/customer/properties/first_name",
          "type": "string",
          "title": "The First_name Schema ",
          "default": "",
          "examples": [
            "ryan"
          ]
        },
        "id": {
          "$id": "/properties/customer/properties/id",
          "type": "string",
          "title": "The Id Schema ",
          "default": "",
          "examples": [
            "06bd64da-d8c0-11e8-f71b-75d13bce9dd6"
          ]
        },
        "last_name": {
          "$id": "/properties/customer/properties/last_name",
          "type": "string",
          "title": "The Last_name Schema ",
          "default": "",
          "examples": [
            "r"
          ]
        },
        "loyalty_balance": {
          "$id": "/properties/customer/properties/loyalty_balance",
          "type": "string",
          "title": "The Loyalty_balance Schema ",
          "default": "",
          "examples": [
            "0.00000"
          ]
        },
        "mobile": {
          "$id": "/properties/customer/properties/mobile",
          "type": "null",
          "title": "The Mobile Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "note": {
          "$id": "/properties/customer/properties/note",
          "type": "null",
          "title": "The Note Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "phone": {
          "$id": "/properties/customer/properties/phone",
          "type": "null",
          "title": "The Phone Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "points": {
          "$id": "/properties/customer/properties/points",
          "type": "integer",
          "title": "The Points Schema ",
          "default": 0,
          "examples": [
            0
          ]
        },
        "sex": {
          "$id": "/properties/customer/properties/sex",
          "type": "null",
          "title": "The Sex Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "updated_at": {
          "$id": "/properties/customer/properties/updated_at",
          "type": "string",
          "title": "The Updated_at Schema ",
          "default": "",
          "examples": [
            "2018-07-06 11:28:59"
          ]
        },
        "year_to_date": {
          "$id": "/properties/customer/properties/year_to_date",
          "type": "string",
          "title": "The Year_to_date Schema ",
          "default": "",
          "examples": [
            "83.00000"
          ]
        }
      }
    },
    "customer_id": {
      "$id": "/properties/customer_id",
      "type": "string",
      "title": "The Customer_id Schema ",
      "default": "",
      "examples": [
        "06bd64da-d8c0-11e8-f71b-75d13bce9dd6"
      ]
    },
    "deleted_at": {
      "$id": "/properties/deleted_at",
      "type": "null",
      "title": "The Deleted_at Schema ",
      "default": null,
      "examples": [
        null
      ]
    },
    "id": {
      "$id": "/properties/id",
      "type": "string",
      "title": "The Id Schema ",
      "default": "",
      "examples": [
        "59299b65-c7fc-a932-11e8-810fb8cc612b"
      ]
    },
    "invoice_number": {
      "$id": "/properties/invoice_number",
      "type": "string",
      "title": "The Invoice_number Schema ",
      "default": "",
      "examples": [
        "47"
      ]
    },
    "note": {
      "$id": "/properties/note",
      "type": "string",
      "title": "The Note Schema ",
      "default": "",
      "examples": [
        ""
      ]
    },
    "register_id": {
      "$id": "/properties/register_id",
      "type": "string",
      "title": "The Register_id Schema ",
      "default": "",
      "examples": [
        "06bd64da-d87a-11e8-f71b-705a7ac8a7fc"
      ]
    },
    "register_sale_payments": {
      "$id": "/properties/register_sale_payments",
      "type": "array",
      "items": {
        "$id": "/properties/register_sale_payments/items",
        "type": "object",
        "properties": {
          "amount": {
            "$id": "/properties/register_sale_payments/items/properties/amount",
            "type": "number",
            "title": "The Amount Schema ",
            "default": 0.0,
            "examples": [
              33.5
            ]
          },
          "id": {
            "$id": "/properties/register_sale_payments/items/properties/id",
            "type": "string",
            "title": "The Id Schema ",
            "default": "",
            "examples": [
              "59299b65-c7fc-a932-11e8-810fc39dd9c5"
            ]
          },
          "payment_date": {
            "$id": "/properties/register_sale_payments/items/properties/payment_date",
            "type": "string",
            "title": "The Payment_date Schema ",
            "default": "",
            "examples": [
              "2018-07-06T11:28:54Z"
            ]
          },
          "payment_type": {
            "$id": "/properties/register_sale_payments/items/properties/payment_type",
            "type": "object",
            "properties": {
              "has_native_support": {
                "$id": "/properties/register_sale_payments/items/properties/payment_type/properties/has_native_support",
                "type": "boolean",
                "title": "The Has_native_support Schema ",
                "default": false,
                "examples": [
                  false
                ]
              },
              "id": {
                "$id": "/properties/register_sale_payments/items/properties/payment_type/properties/id",
                "type": "string",
                "title": "The Id Schema ",
                "default": "",
                "examples": [
                  "1"
                ]
              },
              "name": {
                "$id": "/properties/register_sale_payments/items/properties/payment_type/properties/name",
                "type": "string",
                "title": "The Name Schema ",
                "default": "",
                "examples": [
                  "Cash"
                ]
              }
            }
          },
          "payment_type_id": {
            "$id": "/properties/register_sale_payments/items/properties/payment_type_id",
            "type": "integer",
            "title": "The Payment_type_id Schema ",
            "default": 0,
            "examples": [
              1
            ]
          },
          "retailer_payment_type": {
            "$id": "/properties/register_sale_payments/items/properties/retailer_payment_type",
            "type": "object",
            "properties": {
              "config": {
                "$id": "/properties/register_sale_payments/items/properties/retailer_payment_type/properties/config",
                "type": "null",
                "title": "The Config Schema ",
                "default": null,
                "examples": [
                  null
                ]
              },
              "id": {
                "$id": "/properties/register_sale_payments/items/properties/retailer_payment_type/properties/id",
                "type": "string",
                "title": "The Id Schema ",
                "default": "",
                "examples": [
                  "06bd64da-d87a-11e8-f71b-705a7ac97618"
                ]
              },
              "name": {
                "$id": "/properties/register_sale_payments/items/properties/retailer_payment_type/properties/name",
                "type": "string",
                "title": "The Name Schema ",
                "default": "",
                "examples": [
                  "Cash"
                ]
              },
              "payment_type_id": {
                "$id": "/properties/register_sale_payments/items/properties/retailer_payment_type/properties/payment_type_id",
                "type": "string",
                "title": "The Payment_type_id Schema ",
                "default": "",
                "examples": [
                  "1"
                ]
              }
            }
          },
          "retailer_payment_type_id": {
            "$id": "/properties/register_sale_payments/items/properties/retailer_payment_type_id",
            "type": "string",
            "title": "The Retailer_payment_type_id Schema ",
            "default": "",
            "examples": [
              "06bd64da-d87a-11e8-f71b-705a7ac97618"
            ]
          }
        }
      }
    },
    "register_sale_products": {
      "$id": "/properties/register_sale_products",
      "type": "array",
      "items": {
        "$id": "/properties/register_sale_products/items",
        "type": "object",
        "properties": {
          "discount": {
            "$id": "/properties/register_sale_products/items/properties/discount",
            "type": "string",
            "title": "The Discount Schema ",
            "default": "",
            "examples": [
              "0.00000"
            ]
          },
          "id": {
            "$id": "/properties/register_sale_products/items/properties/id",
            "type": "string",
            "title": "The Id Schema ",
            "default": "",
            "examples": [
              "59299b65-c7fc-a932-11e8-810fba986e9d"
            ]
          },
          "loyalty_value": {
            "$id": "/properties/register_sale_products/items/properties/loyalty_value",
            "type": "string",
            "title": "The Loyalty_value Schema ",
            "default": "",
            "examples": [
              "0.00000"
            ]
          },
          "price": {
            "$id": "/properties/register_sale_products/items/properties/price",
            "type": "string",
            "title": "The Price Schema ",
            "default": "",
            "examples": [
              "5.50000"
            ]
          },
          "price_set": {
            "$id": "/properties/register_sale_products/items/properties/price_set",
            "type": "boolean",
            "title": "The Price_set Schema ",
            "default": false,
            "examples": [
              false
            ]
          },
          "price_total": {
            "$id": "/properties/register_sale_products/items/properties/price_total",
            "type": "string",
            "title": "The Price_total Schema ",
            "default": "",
            "examples": [
              "5.50000"
            ]
          },
          "product_id": {
            "$id": "/properties/register_sale_products/items/properties/product_id",
            "type": "string",
            "title": "The Product_id Schema ",
            "default": "",
            "examples": [
              "06bd64da-d8c0-11e8-f71b-705a7aed409c"
            ]
          },
          "quantity": {
            "$id": "/properties/register_sale_products/items/properties/quantity",
            "type": "integer",
            "title": "The Quantity Schema ",
            "default": 0,
            "examples": [
              1
            ]
          },
          "tax": {
            "$id": "/properties/register_sale_products/items/properties/tax",
            "type": "string",
            "title": "The Tax Schema ",
            "default": "",
            "examples": [
              "0.00000"
            ]
          },
          "tax_id": {
            "$id": "/properties/register_sale_products/items/properties/tax_id",
            "type": "string",
            "title": "The Tax_id Schema ",
            "default": "",
            "examples": [
              "06bd64da-d87a-11e8-f71b-705a7ac08c8c"
            ]
          },
          "tax_total": {
            "$id": "/properties/register_sale_products/items/properties/tax_total",
            "type": "string",
            "title": "The Tax_total Schema ",
            "default": "",
            "examples": [
              "0.00000"
            ]
          }
        }
      }
    },
    "sale_date": {
      "$id": "/properties/sale_date",
      "type": "string",
      "title": "The Sale_date Schema ",
      "default": "",
      "examples": [
        "2018-07-06T11:28:54Z"
      ]
    },
    "short_code": {
      "$id": "/properties/short_code",
      "type": "string",
      "title": "The Short_code Schema ",
      "default": "",
      "examples": [
        "ky744b"
      ]
    },
    "source": {
      "$id": "/properties/source",
      "type": "string",
      "title": "The Source Schema ",
      "default": "",
      "examples": [
        "USER"
      ]
    },
    "source_id": {
      "$id": "/properties/source_id",
      "type": "null",
      "title": "The Source_id Schema ",
      "default": null,
      "examples": [
        null
      ]
    },
    "status": {
      "$id": "/properties/status",
      "type": "string",
      "title": "The Status Schema ",
      "default": "",
      "examples": [
        "CLOSED"
      ]
    },
    "taxes": {
      "$id": "/properties/taxes",
      "type": "array",
      "items": {
        "$id": "/properties/taxes/items",
        "type": "object",
        "properties": {
          "id": {
            "$id": "/properties/taxes/items/properties/id",
            "type": "string",
            "title": "The Id Schema ",
            "default": "",
            "examples": [
              "7ac102fd-705a-11e8-b71b-06bd64dad87a"
            ]
          },
          "name": {
            "$id": "/properties/taxes/items/properties/name",
            "type": "string",
            "title": "The Name Schema ",
            "default": "",
            "examples": [
              "No Tax"
            ]
          },
          "rate": {
            "$id": "/properties/taxes/items/properties/rate",
            "type": "string",
            "title": "The Rate Schema ",
            "default": "",
            "examples": [
              "0.00000"
            ]
          },
          "tax": {
            "$id": "/properties/taxes/items/properties/tax",
            "type": "integer",
            "title": "The Tax Schema ",
            "default": 0,
            "examples": [
              0
            ]
          }
        }
      }
    },
    "totals": {
      "$id": "/properties/totals",
      "type": "object",
      "properties": {
        "total_loyalty": {
          "$id": "/properties/totals/properties/total_loyalty",
          "type": "string",
          "title": "The Total_loyalty Schema ",
          "default": "",
          "examples": [
            "0.00000"
          ]
        },
        "total_payment": {
          "$id": "/properties/totals/properties/total_payment",
          "type": "string",
          "title": "The Total_payment Schema ",
          "default": "",
          "examples": [
            "33.50000"
          ]
        },
        "total_price": {
          "$id": "/properties/totals/properties/total_price",
          "type": "string",
          "title": "The Total_price Schema ",
          "default": "",
          "examples": [
            "33.50000"
          ]
        },
        "total_tax": {
          "$id": "/properties/totals/properties/total_tax",
          "type": "string",
          "title": "The Total_tax Schema ",
          "default": "",
          "examples": [
            "0.00000"
          ]
        },
        "total_to_pay": {
          "$id": "/properties/totals/properties/total_to_pay",
          "type": "string",
          "title": "The Total_to_pay Schema ",
          "default": "",
          "examples": [
            "0.00000"
          ]
        }
      }
    },
    "updated_at": {
      "$id": "/properties/updated_at",
      "type": "string",
      "title": "The Updated_at Schema ",
      "default": "",
      "examples": [
        "2018-07-06T11:28:59+00:00"
      ]
    },
    "user": {
      "$id": "/properties/user",
      "type": "object",
      "properties": {
        "created_at": {
          "$id": "/properties/user/properties/created_at",
          "type": "string",
          "title": "The Created_at Schema ",
          "default": "",
          "examples": [
            "2018-06-15 05:10:54"
          ]
        },
        "display_name": {
          "$id": "/properties/user/properties/display_name",
          "type": "string",
          "title": "The Display_name Schema ",
          "default": "",
          "examples": [
            "Loveofchicken"
          ]
        },
        "email": {
          "$id": "/properties/user/properties/email",
          "type": "string",
          "title": "The Email Schema ",
          "default": "",
          "examples": [
            "ryinvoiz+loveofchiken@gmail.com"
          ]
        },
        "id": {
          "$id": "/properties/user/properties/id",
          "type": "string",
          "title": "The Id Schema ",
          "default": "",
          "examples": [
            "06bd64da-d87a-11e8-f71b-705a7aca13b0"
          ]
        },
        "name": {
          "$id": "/properties/user/properties/name",
          "type": "string",
          "title": "The Name Schema ",
          "default": "",
          "examples": [
            "ryinvoiz+loveofchiken@gmail.com"
          ]
        },
        "target_daily": {
          "$id": "/properties/user/properties/target_daily",
          "type": "null",
          "title": "The Target_daily Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "target_monthly": {
          "$id": "/properties/user/properties/target_monthly",
          "type": "null",
          "title": "The Target_monthly Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "target_weekly": {
          "$id": "/properties/user/properties/target_weekly",
          "type": "null",
          "title": "The Target_weekly Schema ",
          "default": null,
          "examples": [
            null
          ]
        },
        "updated_at": {
          "$id": "/properties/user/properties/updated_at",
          "type": "string",
          "title": "The Updated_at Schema ",
          "default": "",
          "examples": [
            "2018-07-06 11:27:16"
          ]
        }
      }
    },
    "green_coupon_code" : {
      "type": "string",
      "title": "The green coupon code by admin",
      "default": "",
      "examples": [
        "CID123DU12"
      ]
    },
    "user_id": {
      "$id": "/properties/user_id",
      "type": "string",
      "title": "The User_id Schema ",
      "default": "",
      "examples": [
        "06bd64da-d87a-11e8-f71b-705a7aca13b0"
      ]
    },
    "version": {
      "$id": "/properties/version",
      "type": "integer",
      "title": "The Version Schema ",
      "default": 0,
      "examples": [
        7577540727
      ]
    }
  }
}


Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.