Pada halaman ini, akan dijelaskan penggunaaan API untuk mendapatkan daftar produk dengan ketentuan yang dipilih.
API Report Products List
Method ini digunakan untuk mendapatkan data daftar produk yang berisikan id produk, nama produk dan kode produk berdasarkan kombindasi kode – kode tipe, brand, warna dan kategori yang dipilih.
Request
| METHOD | URL |
|---|---|
| GET | http://apiv2.mitrabunso.com/public/product/report/productList/{id_user} |
Parameter yang digunakan pada method ini adalah sebagai berikut:
| METHOD | Parameter | Wajib | Tipe | Keterangan |
|---|---|---|---|---|
| GET | id_user | YA | STRING | 36 character id user |
| HEAD | Authorization | YA | Bearer Token | Bearer Token Login |
| POST | limit | YA | INT | Banyak data yang ingin diambil |
| POST | start | YA | INT | Batas awal data diambil |
| POST | type | TIDAK | JSON | JSON berupa array yang berisiskan kumpulan kode type yang dicari. Contoh: [“1ERC”, “1ARC”, “WCN9”] |
| POST | brand | TIDAK | JSON | JSON berupa array yang berisiskan kumpulan kode brand yang dicari. Contoh: [“SZFD30”, “MI1200”, “SA14B0”] |
| POST | color | TIDAK | JSON | JSON berupa array yang berisiskan kumpulan kode color yang dicari. Contoh: [“000”, “001”, “002”] |
| POST | category | TIDAK | JSON | JSON berupa array yang berisiskan kumpulan kode category yang dicari. Contoh: [“HDST”, “CASE”] |
Response
{
"message": "Data retrieved successfully",
"show": 4,
"total": 4,
"data": [
{
"productId": "7782f989-5518-46d9-aca8-4a2820587f04",
"productName": "Aramid raCasetaSamsung Galaxy Z Fold 3Hitam",
"productCode": "1ARCSZFD30001"
},
{
"productId": "bec88071-a562-4321-b856-724350976145",
"productName": "Aramid raCasetaSamsung Galaxy Z Fold 3Putih",
"productCode": "1ARCSZFD30000"
},
{
"productId": "13628104-90c3-41a9-9074-c5c8b386f720",
"productName": "Electroplating raCasetaSamsung Galaxy Z Fold 3Gold",
"productCode": "1ERCSZFD30002"
},
{
"productId": "40284733-4757-452b-813a-8bf7aadedee8",
"productName": "Electroplating raCasetaSamsung Galaxy Z Fold 3Hitam",
"productCode": "1ERCSZFD30001"
}
]
}