M44 API Reference API Reference
M44 API is fully integrated with the REST API. This allows M44 data to be created, read, updated, and deleted using requests in JSON format and using REST API Authentication methods and standard HTTP verbs which are understood by most HTTP clients.
API Endpoint
https://m44.bitwize.com.lb/app/m44-api/
Contact: m44@bitwize.com.lb
Schemes: http, https
Version: 1.0.0
Authentication
api_key
oauth
orders
The orders API allows you to create, view, update, and delete individual, or a batch, of orders.
Get Orders
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 3,
"next": "/orders/page/3",
"prev": "/orders/page/1"
},
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Orders by page number
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 3,
"next": "/orders/page/3",
"prev": "/orders/page/1"
},
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Orders count
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Orders by Shop
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 3,
"next": "/orders/page/3",
"prev": "/orders/page/1"
},
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Orders Count by Shop
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Orders latest entry
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 3,
"next": "/orders/page/3",
"prev": "/orders/page/1"
},
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Orders after supplied ID
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 3,
"next": "/orders/page/3",
"prev": "/orders/page/1"
},
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Orders after supplied ID by page number
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 3,
"next": "/orders/page/3",
"prev": "/orders/page/1"
},
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get Order By ID
Successful operation
Not Authenticated
Route Not Found
No Record Found
Response Example (200 OK)
{
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Response Example (422 Unprocessable Entity)
{
"result": {
"error": "result with ID: <ID> does not exist"
}
}
products
The products API allows you to create, view, update, and delete individual, or a batch, of products.
Get Products
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000015",
"ID_local": "0",
"code": null,
"barcode": null,
"name": "Titan",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/Titan.jpg",
"category": "Watches",
"stock": "180",
"price": "180000.00",
"unit": "",
"date_created": "2017-07-05 21:35:02",
"date_edited": "---",
"category_id": "1000004"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get products by page number
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000015",
"ID_local": "0",
"code": null,
"barcode": null,
"name": "Titan",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/Titan.jpg",
"category": "Watches",
"stock": "180",
"price": "180000.00",
"unit": "",
"date_created": "2017-07-05 21:35:02",
"date_edited": "---",
"category_id": "1000004"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get products count
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get products by Category
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000015",
"ID_local": "0",
"code": null,
"barcode": null,
"name": "Titan",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/Titan.jpg",
"category": "Watches",
"stock": "180",
"price": "180000.00",
"unit": "",
"date_created": "2017-07-05 21:35:02",
"date_edited": "---",
"category_id": "1000004"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get products Count by Category
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get product By ID
Successful operation
Not Authenticated
Route Not Found
No Record Found
Response Example (200 OK)
{
"result": {
"ID": "1000015",
"ID_local": "0",
"code": null,
"barcode": null,
"name": "Titan",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/Titan.jpg",
"category": "Watches",
"stock": "180",
"price": "180000.00",
"unit": "",
"date_created": "2017-07-05 21:35:02",
"date_edited": "---",
"category_id": "1000004"
}
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Response Example (422 Unprocessable Entity)
{
"result": {
"error": "result with ID: <ID> does not exist"
}
}
categories
The categories API allows you to create, view, update, and delete individual, or a batch, of categories.
Get categories
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000015",
"ID_local": "0",
"code": null,
"parent": "0",
"sort_order": "0",
"name": "Fridges",
"details": null,
"image": "",
"date_created": "2017-07-05 20:39:51",
"date_edited": "2017-07-06 03:04:04",
"structure": "Fridges"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get categories by page number
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000015",
"ID_local": "0",
"code": null,
"parent": "0",
"sort_order": "0",
"name": "Fridges",
"details": null,
"image": "",
"date_created": "2017-07-05 20:39:51",
"date_edited": "2017-07-06 03:04:04",
"structure": "Fridges"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get categories count
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get category By ID
Successful operation
Not Authenticated
Route Not Found
No Record Found
Response Example (200 OK)
{
"result": {
"ID": "1000015",
"ID_local": "0",
"code": null,
"parent": "0",
"sort_order": "0",
"name": "Fridges",
"details": null,
"image": "",
"date_created": "2017-07-05 20:39:51",
"date_edited": "2017-07-06 03:04:04",
"structure": "Fridges"
}
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Response Example (422 Unprocessable Entity)
{
"result": {
"error": "result with ID: <ID> does not exist"
}
}
shops
The shops API allows you to create, view, update, and delete individual, or a batch, of shops.
Get shops
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000014",
"users": "1000002",
"device_id": "1000006",
"name": "Beitech",
"phone": "01231000",
"contact_name": "Frederik",
"contact_phone": "70852146",
"notes": "",
"lat": "33.89045630",
"lng": "35.55518520",
"region": "Beirut",
"type": "Other",
"address": "Baouchriyeh, Lebanon",
"street": null,
"city": null,
"district": null,
"postalCode": null,
"country": "LB",
"last_visit": "0",
"last_visit_by": "0",
"discount": "0.00",
"date_created": "2017-07-21 14:25:40",
"date_edited": "---",
"lastvisit": "---",
"balance": "1400000.00"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get shops by page number
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000014",
"users": "1000002",
"device_id": "1000006",
"name": "Beitech",
"phone": "01231000",
"contact_name": "Frederik",
"contact_phone": "70852146",
"notes": "",
"lat": "33.89045630",
"lng": "35.55518520",
"region": "Beirut",
"type": "Other",
"address": "Baouchriyeh, Lebanon",
"street": null,
"city": null,
"district": null,
"postalCode": null,
"country": "LB",
"last_visit": "0",
"last_visit_by": "0",
"discount": "0.00",
"date_created": "2017-07-21 14:25:40",
"date_edited": "---",
"lastvisit": "---",
"balance": "1400000.00"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get shops count
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get shops by User
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000014",
"users": "1000002",
"device_id": "1000006",
"name": "Beitech",
"phone": "01231000",
"contact_name": "Frederik",
"contact_phone": "70852146",
"notes": "",
"lat": "33.89045630",
"lng": "35.55518520",
"region": "Beirut",
"type": "Other",
"address": "Baouchriyeh, Lebanon",
"street": null,
"city": null,
"district": null,
"postalCode": null,
"country": "LB",
"last_visit": "0",
"last_visit_by": "0",
"discount": "0.00",
"date_created": "2017-07-21 14:25:40",
"date_edited": "---",
"lastvisit": "---",
"balance": "1400000.00"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get shops count by User
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get shop By ID
Successful operation
Not Authenticated
Route Not Found
No Record Found
Response Example (200 OK)
{
"result": {
"ID": "1000014",
"users": "1000002",
"device_id": "1000006",
"name": "Beitech",
"phone": "01231000",
"contact_name": "Frederik",
"contact_phone": "70852146",
"notes": "",
"lat": "33.89045630",
"lng": "35.55518520",
"region": "Beirut",
"type": "Other",
"address": "Baouchriyeh, Lebanon",
"street": null,
"city": null,
"district": null,
"postalCode": null,
"country": "LB",
"last_visit": "0",
"last_visit_by": "0",
"discount": "0.00",
"date_created": "2017-07-21 14:25:40",
"date_edited": "---",
"lastvisit": "---",
"balance": "1400000.00"
}
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Response Example (422 Unprocessable Entity)
{
"result": {
"error": "result with ID: <ID> does not exist"
}
}
visits
The visits API allows you to create, view, update, and delete individual, or a batch, of visits.
Get visits
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000014",
"shop_id": "1000009",
"user_id": "1000000",
"device_id": "1000009",
"interested": "1",
"reason": "",
"notes": "From iphone",
"photos": [
"https://m44.bitwize.com.lb/app/wp-content/uploads/pictures/2017/07/20/597108448cd9b.jpg"
],
"date_created": "2017-07-20 22:45:08",
"date_edited": "---",
"user": "Fadi Badawi",
"date": "July 20, 2017"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get visits by page number
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000014",
"shop_id": "1000009",
"user_id": "1000000",
"device_id": "1000009",
"interested": "1",
"reason": "",
"notes": "From iphone",
"photos": [
"https://m44.bitwize.com.lb/app/wp-content/uploads/pictures/2017/07/20/597108448cd9b.jpg"
],
"date_created": "2017-07-20 22:45:08",
"date_edited": "---",
"user": "Fadi Badawi",
"date": "July 20, 2017"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get visits count
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get visit By ID
Successful operation
Not Authenticated
Route Not Found
No Record Found
Response Example (200 OK)
{
"result": {
"ID": "1000014",
"shop_id": "1000009",
"user_id": "1000000",
"device_id": "1000009",
"interested": "1",
"reason": "",
"notes": "From iphone",
"photos": [
"https://m44.bitwize.com.lb/app/wp-content/uploads/pictures/2017/07/20/597108448cd9b.jpg"
],
"date_created": "2017-07-20 22:45:08",
"date_edited": "---",
"user": "Fadi Badawi",
"date": "July 20, 2017"
}
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Response Example (422 Unprocessable Entity)
{
"result": {
"error": "result with ID: <ID> does not exist"
}
}
offers
The offers API allows you to create, view, update, and delete individual, or a batch, of offers.
Get offers
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000003",
"name": "Sale",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/1-get-1.jpg",
"category": "TVs",
"qty_from": "1",
"qty_to": "10",
"offer": "1",
"date_created": "2017-07-05 22:50:10",
"date_edited": "---",
"category_id": "1000003"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get offers by category ID
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000003",
"name": "Sale",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/1-get-1.jpg",
"category": "TVs",
"qty_from": "1",
"qty_to": "10",
"offer": "1",
"date_created": "2017-07-05 22:50:10",
"date_edited": "---",
"category_id": "1000003"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get offers by page number
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000003",
"name": "Sale",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/1-get-1.jpg",
"category": "TVs",
"qty_from": "1",
"qty_to": "10",
"offer": "1",
"date_created": "2017-07-05 22:50:10",
"date_edited": "---",
"category_id": "1000003"
}
]
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get offers count
Successful operation
Not Authenticated
Route Not Found
Response Example (200 OK)
{
"result": "66"
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Get offer By ID
Successful operation
Not Authenticated
Route Not Found
No Record Found
Response Example (200 OK)
{
"result": {
"ID": "1000003",
"name": "Sale",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/1-get-1.jpg",
"category": "TVs",
"qty_from": "1",
"qty_to": "10",
"offer": "1",
"date_created": "2017-07-05 22:50:10",
"date_edited": "---",
"category_id": "1000003"
}
}
Response Example (400 Bad Request)
{
"code": "400",
"message": "M44 API Key/Secret is invalid"
}
Response Example (404 Not Found)
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}
Response Example (422 Unprocessable Entity)
{
"result": {
"error": "result with ID: <ID> does not exist"
}
}
Schema Definitions
orders: object
Example
{
"pages": {
"total": 3,
"next": "/orders/page/3",
"prev": "/orders/page/1"
},
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
order: object
Example
{
"result": [
{
"ID": "1000020",
"status": "Pending",
"user_id": "1000002",
"device_id": "1000006",
"shop_id": "1000006",
"total_qty": "3",
"total": "750000.00",
"sub_total": "750000.00",
"discount": "0.00",
"balance": "50000.00",
"next_date": "2017-08-01",
"notes": null,
"date_created": "2017-07-25 16:55:10",
"date_edited": "---",
"date": "July 25, 2017",
"user": "Georges Hammam",
"lines": [
{
"ID": "1000051",
"order_id": "1000020",
"product_id": "1000000",
"price": "100000.00",
"qty": "1",
"total": "100000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "LG",
"category_id": "1000006",
"category": "Fridges"
},
{
"ID": "1000053",
"order_id": "1000020",
"product_id": "1000009",
"price": "400000.00",
"qty": "1",
"total": "400000.00",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"offers": [
{
"ID": "1000014",
"order_id": "1000020",
"product_id": "1000009",
"qty": "1",
"date_created": "1500990910",
"date_edited": "0",
"product": "Samsung Curved",
"category_id": "1000003",
"category": "TVs"
}
],
"payments": [
{
"ID": "1000018",
"order_id": "1000020",
"user_id": "1000002",
"device_id": "1000006",
"type": "cash",
"amount": "700000.00",
"photos": [],
"notes": null,
"date_created": "1500990910",
"date_edited": "0",
"user": "Georges Hammam",
"date": "July 25, 2017"
}
]
}
]
}
products: object
Example
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000015",
"ID_local": "0",
"code": null,
"barcode": null,
"name": "Titan",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/Titan.jpg",
"category": "Watches",
"stock": "180",
"price": "180000.00",
"unit": "",
"date_created": "2017-07-05 21:35:02",
"date_edited": "---",
"category_id": "1000004"
}
]
}
product: object
Example
{
"result": {
"ID": "1000015",
"ID_local": "0",
"code": null,
"barcode": null,
"name": "Titan",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/Titan.jpg",
"category": "Watches",
"stock": "180",
"price": "180000.00",
"unit": "",
"date_created": "2017-07-05 21:35:02",
"date_edited": "---",
"category_id": "1000004"
}
}
categories: object
Example
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000015",
"ID_local": "0",
"code": null,
"parent": "0",
"sort_order": "0",
"name": "Fridges",
"details": null,
"image": "",
"date_created": "2017-07-05 20:39:51",
"date_edited": "2017-07-06 03:04:04",
"structure": "Fridges"
}
]
}
category: object
Example
{
"result": {
"ID": "1000015",
"ID_local": "0",
"code": null,
"parent": "0",
"sort_order": "0",
"name": "Fridges",
"details": null,
"image": "",
"date_created": "2017-07-05 20:39:51",
"date_edited": "2017-07-06 03:04:04",
"structure": "Fridges"
}
}
shops: object
Example
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000014",
"users": "1000002",
"device_id": "1000006",
"name": "Beitech",
"phone": "01231000",
"contact_name": "Frederik",
"contact_phone": "70852146",
"notes": "",
"lat": "33.89045630",
"lng": "35.55518520",
"region": "Beirut",
"type": "Other",
"address": "Baouchriyeh, Lebanon",
"street": null,
"city": null,
"district": null,
"postalCode": null,
"country": "LB",
"last_visit": "0",
"last_visit_by": "0",
"discount": "0.00",
"date_created": "2017-07-21 14:25:40",
"date_edited": "---",
"lastvisit": "---",
"balance": "1400000.00"
}
]
}
shop: object
Example
{
"result": {
"ID": "1000014",
"users": "1000002",
"device_id": "1000006",
"name": "Beitech",
"phone": "01231000",
"contact_name": "Frederik",
"contact_phone": "70852146",
"notes": "",
"lat": "33.89045630",
"lng": "35.55518520",
"region": "Beirut",
"type": "Other",
"address": "Baouchriyeh, Lebanon",
"street": null,
"city": null,
"district": null,
"postalCode": null,
"country": "LB",
"last_visit": "0",
"last_visit_by": "0",
"discount": "0.00",
"date_created": "2017-07-21 14:25:40",
"date_edited": "---",
"lastvisit": "---",
"balance": "1400000.00"
}
}
visits: object
Example
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000014",
"shop_id": "1000009",
"user_id": "1000000",
"device_id": "1000009",
"interested": "1",
"reason": "",
"notes": "From iphone",
"photos": [
"https://m44.bitwize.com.lb/app/wp-content/uploads/pictures/2017/07/20/597108448cd9b.jpg"
],
"date_created": "2017-07-20 22:45:08",
"date_edited": "---",
"user": "Fadi Badawi",
"date": "July 20, 2017"
}
]
}
visit: object
Example
{
"result": {
"ID": "1000014",
"shop_id": "1000009",
"user_id": "1000000",
"device_id": "1000009",
"interested": "1",
"reason": "",
"notes": "From iphone",
"photos": [
"https://m44.bitwize.com.lb/app/wp-content/uploads/pictures/2017/07/20/597108448cd9b.jpg"
],
"date_created": "2017-07-20 22:45:08",
"date_edited": "---",
"user": "Fadi Badawi",
"date": "July 20, 2017"
}
}
offers: object
Example
{
"pages": {
"total": 1,
"next": "",
"prev": ""
},
"result": [
{
"ID": "1000003",
"name": "Sale",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/1-get-1.jpg",
"category": "TVs",
"qty_from": "1",
"qty_to": "10",
"offer": "1",
"date_created": "2017-07-05 22:50:10",
"date_edited": "---",
"category_id": "1000003"
}
]
}
offer: object
Example
{
"result": {
"ID": "1000003",
"name": "Sale",
"image": "https://m44.bitwize.com.lb/app/wp-content/uploads/2017/07/1-get-1.jpg",
"category": "TVs",
"qty_from": "1",
"qty_to": "10",
"offer": "1",
"date_created": "2017-07-05 22:50:10",
"date_edited": "---",
"category_id": "1000003"
}
}
NotFound: object
- code: string
- message: string
Example
{
"code": "api_no_route",
"message": "No route was found matching the URL and request method"
}