Dokumentasi ini ditujukan untuk membantu pengguna memahami cara kerja sistem kami, mengakses dan menggunakan API yang disediakan,
serta memperoleh informasi yang relevan melalui report yang telah kami sediakan untuk website AutoParts.
Kami harap dokumentasi ini akan membantu Anda dalam memahami sistem kami dan memberikan informasi yang berguna dalam penggunaan dan pemeliharaan sistem.
Jika Anda memiliki pertanyaan atau masukan, jangan ragu untuk menghubungi kami melalui email di support@mostar.co.id.
Terima kasih telah memilih sistem kami.
API Master Data
Daftar API mengikuti tabel database:
Car
car/allbrand [POST]
JSON Request
{}JSON Response
{
"car": [
{ "carbrand": "Porsche" },
{ "carbrand": "Honda" },
{ "carbrand": "Subaru" },
{ "carbrand": "Mazda" },
{ "carbrand": "Mitsubishi" },
{ "carbrand": "Lexus" },
{ "carbrand": "Toyota" },
{ "carbrand": "BMW" },
{ "carbrand": "Volkswagen" },
{ "carbrand": "Suzuki" },
{ "carbrand": "Mercedes-Benz" },
{ "carbrand": "Audi" }
]
}car/create [POST]
JSON Request
{
"carbrand": "Honda",
"carname": "Civic"
}JSON Response
{
"car": {
"id": "15",
"carbrand": "Honda",
"carname": "Civic"
}
}car/explore [POST]
JSON Request
{}JSON Response
{
"page": 1,
"totalpage": 2,
"length": 10,
"displayed": 10,
"anchor": [
{
"page": 1
},
{
"page": 2
}
],
"totaldata": 15,
"data": [
{
"id": "1",
"carbrand": "Honda",
"carname": "Civic"
},
{
"id": "2",
"carbrand": "Honda",
"carname": "CRV"
}
]
}car/search [POST]
JSON Request
{
"carbrand": "Honda"
}JSON Response
{
"car": [
{
"id": "1",
"carbrand": "Honda",
"carname": "Civic"
}
]
}car/table [POST]
Search Param
Table Specs
"id", //0
"carbrand", //1
"carname", //2car/{?} [GET]
JSON Response
{
"car": {
"id": "2",
"carbrand": "Honda",
"carname": "Civic"
}
}car/{?}/delete [DELETE]
JSON Response
{
"deleted": true
}car/{?}/update [PUT]
JSON Request
{
"carbrand": "Honda",
"carname": "Civic"
}JSON Response
{
"car": {
"id": "15",
"carbrand": "Honda",
"carname": "Civic"
}
}Cart Header
cartheader/create [POST]
JSON Request
{
"store_id": 3,
"note": "ORDER NOTE",
"date": "2023/01/02",
"details": [
{
"product_id": 1,
"price": 200000,
"qty": 3,
"note": "DETAIL NOTE"
},
{
"product_id": 2,
"price": 100000,
"qty": 5,
"note": "DETAIL NOTE 2"
}
]
}JSON Response
{
"cartheader": {
"id": "7",
"store_id": 3,
"note": "ORDER NOTE",
"date": "2023/01/02",
"total": 1100000,
"details": [
{
"product_id": 1,
"price": 200000,
"qty": 3,
"note": "DETAIL NOTE"
},
{
"product_id": 2,
"price": 100000,
"qty": 5,
"note": "DETAIL NOTE 2"
}
}
}cartheader/explore [POST]
JSON Request
{
"bank": "BCA"
}JSON Response
{
"page": 1,
"totalpage": 1,
"length": 10,
"displayed": 1,
"anchor": [
{
"page": 1
}
],
"totaldata": 1,
"data": [
{
"id": "7",
"store_id": 3,
"note": "ORDER NOTE",
"date": "2023/01/02",
"total": 1100000
}
]
}cartheader/search [POST]
JSON Request
{
"store_id": 3
}JSON Response
{
"cartheader": [
{
"id": "7",
"store_id": 3,
"note": "ORDER NOTE",
"date": "2023/01/02",
"total": 1100000,
"details": [
{
"id": 1,
"product_id": 1,
"price": 200000,
"qty": 3,
"note": "DETAIL NOTE",
"itemname": "BARANG 1",
"itemcode": "00001",
"number": "2012",
"weight": 10,
"unit": "gr",
"description": "Item Description",
"url": "asdasd.jpg",
"category_id": 1,
"category": "Kategori 1",
"keywords": "JAZZ,CIVIC"
},
{
"id": 2,
"product_id": 2,
"price": 250000,
"qty": 2,
"note": "DETAIL NOTE",
"itemname": "BARANG 1",
"itemcode": "00001",
"number": "2012",
"weight": 10,
"unit": "gr",
"description": "Item Description",
"url": "asdasd.jpg",
"category_id": 1,
"category": "Kategori 1",
"keywords": "JAZZ,CIVIC"
}
]
}
]
}cartheader/table [POST]
Search Param
fromdate
thrudate
sales_id
store_idTable Specs
"id", //0
"storename", //1
"note", //2
"date", //3
"total", //4
"sales", //5cartheader/{?} [GET]
JSON Response
{
"cartheader": {
"id": "7",
"store_id": 3,
"note": "ORDER NOTE",
"date": "2023/01/02",
"total": 1100000,
"sales": "ZENER",
"details": [
{
"id": 1,
"product_id": 1,
"price": 200000,
"qty": 3,
"note": "DETAIL NOTE",
"itemname": "BARANG 1",
"itemcode": "00001",
"number": "2012",
"weight": 10,
"unit": "gr",
"description": "Item Description",
"url": "asdasd.jpg",
"category_id": 1,
"category": "Kategori 1",
"keywords": "JAZZ,CIVIC",
"total": 600000
},
{
"id": 2,
"product_id": 2,
"price": 250000,
"qty": 2,
"note": "DETAIL NOTE",
"itemname": "BARANG 1",
"itemcode": "00001",
"number": "2012",
"weight": 10,
"unit": "gr",
"description": "Item Description",
"url": "asdasd.jpg",
"category_id": 1,
"category": "Kategori 1",
"keywords": "JAZZ,CIVIC",
"total": 500000
}
]
}
}cartheader/{?}/delete [DELETE]
JSON Response
{
"deleted": true
}cartheader/{?}/update [PUT]
JSON Request
{
"store_id": 3,
"note": "ORDER NOTE",
"date": "2023/01/02",
"details": [
{
"product_id": 1,
"price": 200000,
"qty": 3,
"note": "DETAIL NOTE"
},
{
"product_id": 2,
"price": 100000,
"qty": 5,
"note": "DETAIL NOTE 2"
}
]
}JSON Response
{
"cartheader": {
"id": "7",
"store_id": 3,
"note": "ORDER NOTE",
"date": "2023/01/02",
"total": 1100000,
"details": [
{
"product_id": 1,
"price": 200000,
"qty": 3,
"note": "DETAIL NOTE"
},
{
"product_id": 2,
"price": 100000,
"qty": 5,
"note": "DETAIL NOTE 2"
}
}
}
category
category/create [POST]
JSON Request
{
"category": "Kategori 1"
}JSON Response
{
"category": {
"id": "15",
"category": "Kategori 1"
}
}category/explore [POST]
JSON Request
{}JSON Response
{
"page": 1,
"totalpage": 2,
"length": 10,
"displayed": 10,
"anchor": [
{
"page": 1
},
{
"page": 2
}
],
"totaldata": 15,
"data": [
{
"id": "1",
"category": "Kategori 1"
},
{
"id": "2",
"category": "Kategori 2"
}
]
}category/search [POST]
JSON Request
{}JSON Response
{
"category": [
{
"id": "1",
"category": "Kategori 1",
"url": "iwnwF24DJF8YUhp0.jpg",
"img_path": "https://admin.finalautoparts.com/uploads/product/iwnwF24DJF8YUhp0.jpg",
"thumbnail": "https://admin.finalautoparts.com/uploads/product/low_iwnwF24DJF8YUhp0.jpg"
}
]
}category/table [POST]
Search Param
Table Specs
"id", //0
"category", //1
"url", //2category/{?} [GET]
JSON Response
{
"category": {
"id": "2",
"category": "Kategori 1",
"url": "asdzxcas.jpg",
"img_path": "https://admin.finalautoparts.com/uploads/product/iwnwF24DJF8YUhp0.jpg",
"thumbnail": "https://admin.finalautoparts.com/uploads/product/low_iwnwF24DJF8YUhp0.jpg"
}
}category/{?}/delete [DELETE]
JSON Response
{
"deleted": true
}category/{?}/update [PUT]
JSON Request
{
"category": "Kategori 3"
}JSON Response
{
"category": {
"id": "15",
"category": "Kategori 3"
}
}category/picture/upload [POST]
POST Request
id_category
pictureJSON Response
{
"image_upload": true,
"img": "5OVMrLGmnxOI18YH.jpg",
"img_path": "https://admin.finalautoparts.com/uploads/product/iwnwF24DJF8YUhp0.jpg",
"thumbnail": "https://admin.finalautoparts.com/uploads/product/low_iwnwF24DJF8YUhp0.jpg"
}price
price/create [POST]
JSON Request
{
"price": "150000",
"product_id": 1
}JSON Response
{
"price": {
"id": "15",
"price": "150000",
"product_id": 1
}
}price/explore [POST]
JSON Request
{}JSON Response
{
"page": 1,
"totalpage": 2,
"length": 10,
"displayed": 10,
"anchor": [
{
"page": 1
},
{
"page": 2
}
],
"totaldata": 15,
"data": [
{
"id": "1",
"price": "150000",
"product_id": 1
},
{
"id": "2",
"price": "150000",
"product_id": 1
}
]
}price/search [POST]
JSON Request
{}JSON Response
{
"price": [
{
"id": "1",
"price": "150000",
"product_id": 1
}
]
}price/table [POST]
Search Param
Table Specs
"id", //0
"product", //1
"price", //2price/{?} [GET]
JSON Response
{
"price": {
"id": "2",
"product": "Nama Barang",
"price": "150000"
}
}price/{?}/delete [DELETE]
JSON Response
{
"deleted": true
}price/{?}/update [PUT]
JSON Request
{
"price": "150000",
"product_id": 1
}JSON Response
{
"price": {
"id": "15",
"price": "150000",
"product_id": 1
}
}product
product/create [POST]
JSON Request
{
"itemname": "Nama Barang",
"itemcode": "00001",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"keywords": "JAZZ,CIVIC"
}JSON Response
{
"product": {
"id": "15",
"itemname": "Nama Barang",
"itemcode": "00001",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"keywords": "JAZZ,CIVIC"
}
}product/explore [POST]
JSON Request
{}JSON Response
{
"page": 1,
"totalpage": 2,
"length": 10,
"displayed": 10,
"anchor": [
{
"page": 1
},
{
"page": 2
}
],
"totaldata": 15,
"data": [
{
"id": "1",
"itemname": "Nama Barang",
"itemcode": "00001",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"keywords": "JAZZ,CIVIC"
},
{
"id": "2",
"itemname": "Nama Barang",
"itemcode": "00001",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"keywords": "JAZZ,CIVIC"
}
]
}product/search [POST]
JSON Request
{
"category_id": "2",
"itemcode": "C223836",
"number": "230512",
"itemname": "Barang",
"keywords": "JAZZ",
"search_key": "23"
}JSON Response
{
"product": [
{
"id": "1",
"itemname": "Nama Barang",
"itemcode": "C22836",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"category": "Kategori 1",
"keywords": "JAZZ,CIVIC"
"img_path": "https://admin.finalautoparts.com/uploads/product/iwnwF24DJF8YUhp0.jpg",
"thumbnail": "https://admin.finalautoparts.com/uploads/product/low_iwnwF24DJF8YUhp0.jpg"
}
]
}product/table [POST]
Search Param
Table Specs
"id", //0
"itemname", //1
"itemcode", //2
"number", //3
"weight", //4
"unit", //5
"description", //6
"url", //7
"category", //8
"keywords", //9product/{?} [GET]
JSON Response
{
"product": {
"id": "2",
"itemname": "Nama Barang",
"itemcode": "00001",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"category": "Kategori 2",
"keywords": "JAZZ,CIVIC",
"price": 250000,
"img_path": "https://admin.finalautoparts.com/uploads/product/iwnwF24DJF8YUhp0.jpg",
"thumbnail": "https://admin.finalautoparts.com/uploads/product/low_iwnwF24DJF8YUhp0.jpg"
}
}product/{?}/delete [DELETE]
JSON Response
{
"deleted": true
}product/{?}/update [PUT]
JSON Request
{
"itemname": "Nama Barang",
"itemcode": "00001",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"keywords": "JAZZ,CIVIC"
}JSON Response
{
"product": {
"id": "15",
"itemname": "Nama Barang",
"itemcode": "00001",
"number": "230512",
"weight": 25,
"unit": "gr",
"description": "Deskripsi Barang, Lorem Ipsum",
"category_id": 1,
"keywords": "JAZZ,CIVIC"
}
}User Management
Master Data User & Roles
users/create [POST]
JSON Request
{
"username": "zener",
"fullname": "Eldi Zener",
"email": "eldzener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung",
"roles": 1
}JSON Response
{
"users": {
"id": "1",
"username": "zener",
"fullname": "Eldi Zener",
"email": "eldzener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung",
"roles": 1
}
}users/explore [POST]
JSON Request
{
"is_blocked": 0
}JSON Response
{
"page": 1,
"totalpage": 1,
"length": 10,
"displayed": 1,
"anchor": [
{
"page": 1
}
],
"totaldata": 1,
"data": [
{
"id": "1",
"username": "zener",
"fullname": "Eldi Zener",
"email": "eldzener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung",
"roles": 1
}
]
}users/search [POST]
JSON Request
{
"is_blocked": 0,
"fullname": "zen"
}JSON Response
{
"users": [
{
"id": "1",
"username": "zener",
"fullname": "Eldi Zener",
"email": "eldzener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung",
"roles": 1
}
]
}users/table [POST]
Search Param
is_blockedTable Specs
"id", //0
"username", //1
"fullname", //2
"email", //3
"phone", //4
"address", //5
"city", //6
"roles", //7
"picture", //8
"is_blocked", //9users/{?} [GET]
JSON Response
{
"users": {
"id": "1",
"username": "zener",
"fullname": "Eldi Zener",
"email": "eldzener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung",
"roles": 1
}
}users/{?}/delete [DELETE]
JSON Response
{
"deleted": true
}users/{?}/update [PUT]
JSON Request
{
"fullname": "Eldi Zener",
"email": "eldzener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung"
}JSON Response
{
"users": {
"id": "1",
"username": "zener",
"fullname": "Eldi Zener",
"email": "eldzener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung"
}
}users/picture/upload [POST]
POST Request
id_users
pictureJSON Response
{
"image_upload": true,
"img": "5OVMrLGmnxOI18YH.jpg",
"img_path": "http://{PATH}/uploads/users/5OVMrLGmnxOI18YH.jpg"
}Authentications
users/login [POST] credential with username & password
JSON Request
{
"act": "login",
"username": "didit",
"password": "*******1234"
}JSON Response
{
"login": true,
"bearer": "SVdkQ3JSL2tMWU5VSlRQbE5xUWY0a3B2YzN4MnVVZ1htZ0hPeVpTTlRxYlNYUXo4WC9oM01DMENFVzBZSVVEK1Rxb083RFR4dXVZUWhDVXczaFdXVDY4OFN0SWNoRnA5bTBVd0dXREJiNGhrZnlvVFNEV0R6YkpFVXNVRnRkVTZEL2lSQWhCQ1VkbzFyYUJDcnRrTE93PT0=",
"id": "1"
}users/data [GET]
JSON Response
{
"users": {
"id": "1",
"username": "zener",
"fullname": "Eldi Zener",
"email": "eldizener@gmail.com",
"phone": "081573937773",
"address": "Bandung, Indonesia",
"city": "Bandung",
"picture": "5OVMrLGmnxOI18YH.jpg",
"is_blocked": "0",
"roles": 1,
"img_path": "https://admin.finalautoparts.com/uploads/users/eMw5okT0L9Z99LE5.jpg",
"store_list": [
{
"id": 1,
"sales_id": 1,
"store_id": 3,
"storename": "Mostar Store"
}
]
},
"permissions": 1
// 1 [ADMIN]
// 2 [SALES]
// 3 [STORE]
}users/{?}/update/password [POST]
JSON Request
{
"new_password": "*************1234",
"new_password_confirm": "****1234"
}JSON Response
{
"update_password": true
}