Difference between revisions of "API Stock by Storage Bin"
(→GET Stock By Storage Bin) |
(→GET Stock By Storage Bin) |
||
Line 18: | Line 18: | ||
Parameter umum yang wajib dilakukan adalah filter '''_where''' untuk field '''organization''' untuk menghasilkan query yang seefektif mungkin. | Parameter umum yang wajib dilakukan adalah filter '''_where''' untuk field '''organization''' untuk menghasilkan query yang seefektif mungkin. | ||
</p> | </p> | ||
+ | |||
+ | == Contoh hasil query == | ||
+ | <pre> | ||
+ | { | ||
+ | "response": { | ||
+ | "data": [ | ||
+ | { | ||
+ | "_identifier": "ASAMI HOMEDRESS WARNA - KALE GREEN,SIZE - M - S1-SRENGSENG REG A", | ||
+ | "_entityName": "MaterialMgmtStorageDetail", | ||
+ | "$ref": "MaterialMgmtStorageDetail/FFEC79B0001E4A84BBB6503D58F42FF0", | ||
+ | "product": "6A59C285AD3E430895BD91FC0BA9709D", | ||
+ | "product$_identifier": "ASAMI HOMEDRESS WARNA - KALE GREEN,SIZE - M", | ||
+ | "storageBin": "C1C760F2C2734E8F8845773EC4F73087", | ||
+ | "storageBin$_identifier": "S1-SRENGSENG REG A", | ||
+ | "attributeSetValue": "0", | ||
+ | "attributeSetValue$_identifier": "", | ||
+ | "uOM": "E4D60A0ECD0E4BAA902D9A844327B46D", | ||
+ | "uOM$_identifier": "Piece", | ||
+ | "orderUOM": null, | ||
+ | "quantityOnHand": 18, | ||
+ | "onHandOrderQuanity": null, | ||
+ | "lastInventoryCountDate": "2021-11-30", | ||
+ | "quantityInDraftTransactions": 0, | ||
+ | "quantityOrderInDraftTransactions": null, | ||
+ | "client": "0866093A2EEE4EE88399C8CE4E664858", | ||
+ | "client$_identifier": "KREASI FESYEN SINERGI PT", | ||
+ | "organization": "7F844AE4060B41CDB7E943F75B76F4B2", | ||
+ | "organization$_identifier": "PT Kreasi Fesyen Sinergi", | ||
+ | "active": true, | ||
+ | "creationDate": "2021-12-08T13:55:13+07:00", | ||
+ | "createdBy": "A1055523B27E4116B73E56B1D8700E80", | ||
+ | "createdBy$_identifier": "Luqman", | ||
+ | "updated": "2021-12-31T11:30:23+07:00", | ||
+ | "updatedBy": "51F0D5F383754670ADBCB28DC55BAD8F", | ||
+ | "updatedBy$_identifier": "Suryo Wahono ASP", | ||
+ | "id": "FFEC79B0001E4A84BBB6503D58F42FF0", | ||
+ | "reservedQty": 0, | ||
+ | "allocatedQuantity": 0, | ||
+ | "recordTime": 1643848893551 | ||
+ | }, | ||
+ | ..... '''''DATA TRUNCATED FOR SAMPLE ONLY.''''' | ||
+ | } | ||
+ | ], | ||
+ | "status": 0, | ||
+ | "totalRows": 7, | ||
+ | "startRow": 0, | ||
+ | "endRow": 5 | ||
+ | } | ||
+ | } | ||
+ | </pre> |
Revision as of 07:59, 3 February 2022
Introduction
API ini yang berfungsi untuk query data stock produk dan tidak bisa melakukan transaksi INSERT atau UPDATE. Perubahan stock di ERP adalah dampak dari transaksi yang di proses didalam ERP oleh user.
GET Stock By Storage Bin
URL:
https://HOST/infinite/org.openbravo.service.json.jsonrest/MaterialMgmtStorageDetail?_startRow=0&_endRow=5&_where=organization='7F844AE4060B41CDB7E943F75B76F4B2'
API di atas sudah menggunakan beberapa parameter sekaligus.
Selalu gunakan parameter paging _startRow dan _endRow agar membatasi record yang akan dihasilkan, sistem otomatis timeout jika data yang dihasilkan terlalu banyak dan membutuhkan waktu lama. Untuk query record sebanyak 1000 mungkin anda harus melakukan query beberapa kali sesuai dengan pagination yang dibuat, dengan demikian query via API tidak mengalami timeout.
Parameter umum yang wajib dilakukan adalah filter _where untuk field organization untuk menghasilkan query yang seefektif mungkin.
Contoh hasil query
{ "response": { "data": [ { "_identifier": "ASAMI HOMEDRESS WARNA - KALE GREEN,SIZE - M - S1-SRENGSENG REG A", "_entityName": "MaterialMgmtStorageDetail", "$ref": "MaterialMgmtStorageDetail/FFEC79B0001E4A84BBB6503D58F42FF0", "product": "6A59C285AD3E430895BD91FC0BA9709D", "product$_identifier": "ASAMI HOMEDRESS WARNA - KALE GREEN,SIZE - M", "storageBin": "C1C760F2C2734E8F8845773EC4F73087", "storageBin$_identifier": "S1-SRENGSENG REG A", "attributeSetValue": "0", "attributeSetValue$_identifier": "", "uOM": "E4D60A0ECD0E4BAA902D9A844327B46D", "uOM$_identifier": "Piece", "orderUOM": null, "quantityOnHand": 18, "onHandOrderQuanity": null, "lastInventoryCountDate": "2021-11-30", "quantityInDraftTransactions": 0, "quantityOrderInDraftTransactions": null, "client": "0866093A2EEE4EE88399C8CE4E664858", "client$_identifier": "KREASI FESYEN SINERGI PT", "organization": "7F844AE4060B41CDB7E943F75B76F4B2", "organization$_identifier": "PT Kreasi Fesyen Sinergi", "active": true, "creationDate": "2021-12-08T13:55:13+07:00", "createdBy": "A1055523B27E4116B73E56B1D8700E80", "createdBy$_identifier": "Luqman", "updated": "2021-12-31T11:30:23+07:00", "updatedBy": "51F0D5F383754670ADBCB28DC55BAD8F", "updatedBy$_identifier": "Suryo Wahono ASP", "id": "FFEC79B0001E4A84BBB6503D58F42FF0", "reservedQty": 0, "allocatedQuantity": 0, "recordTime": 1643848893551 }, ..... '''''DATA TRUNCATED FOR SAMPLE ONLY.''''' } ], "status": 0, "totalRows": 7, "startRow": 0, "endRow": 5 } }