Barkodlu Stok Yönetimi
Endpoint: https://api.propars.net/api/v1/core/item/inventory_by_barcode/
Depolu Kullanım Senaryosu
Depolar: Depoların adlarının ve id'lerinin programatik olarak okunabileceği endpoint:
https://api.propars.net/api/v1/core/warehouse/
Stok Okuma
URL: https://api.propars.net/api/v1/core/item/inventory_by_barcode/?barcodes=barcode1,barcode2,barcode3
NOT
Bir istekte bulunabilecek en fazla barkod sayısı 50'dir.
Örnek Stok Okuma İsteği:
GET https://api.propars.net/api/v1/core/item/inventory_by_barcode/?barcodes=8696909530735,8696523530753,8691787876203,8696187706600
Örnek Stok Okuma Cevabı:
{
"results": [
{
"item": 199,
"liquid_stock": 876,
"barcode": "8691787876203",
"quantity": 0,
"warehouse": 4,
"warehouse_name": "Depo 4"
},
{
"item": 199,
"liquid_stock": 876,
"barcode": "8691787876203",
"quantity": 22,
"warehouse": 2,
"warehouse_name": "Depo 2"
},
{
"item": 199,
"liquid_stock": 876,
"barcode": "8691787876203",
"quantity": 312,
"warehouse": 3,
"warehouse_name": "Depo 3"
},
{
"item": 199,
"liquid_stock": 876,
"barcode": "8691787876203",
"quantity": 30,
"warehouse": 1,
"warehouse_name": "Depo 1"
}
],
"errors": [
{
"barcode": "8696187706600",
"errors": {
"barcode": "No items or variants found with barcode: 8696187706600"
}
},
{
"barcode": "8696523530753",
"errors": {
"barcode": "No items or variants found with barcode: 8696523530753"
}
},
{
"barcode": "8696909530735",
"errors": {
"barcode": "No items or variants found with barcode: 8696909530735"
}
}
]
}
NOT
-
Örnekteki barkodlardan 8696909530735, 8696187706600, 8691787876203 olanlar istek atılan hesapta tanımlı olmayan barkodlar olduğu için bu barkodlarla ilgili cevaplar
errors
listesinde yer almakta. -
8691787876203 barkodu ise 4 farklı depoda stok tanımına sahip olduğu için bu 4 kayıt
result
listesinin elemanları olarak dönülüyor.
Stok Güncelleme
Örnek Stok Güncelleme İsteği:
POST https://api.propars.net/api/v1/core/item/inventory_by_barcode/
Content-Type: application/json
BODY:
[
{'barcode': '8691787876203', 'quantity': 10, 'warehouse_name': 'Depo 1'},
{'barcode': '8696909530735', 'quantity': 15, 'warehouse_name': 'Depo 1'},
{'barcode': '8691787876203', 'quantity': 20, 'warehouse_name': 'Yanlis Depo Adi'},
]
NOT
Bir istekte bulunabilecek en fazla öge sayısı 50'dir.
Örnek Stok Güncelleme Cevabı:
{
"results": [
{
"item": 199,
"liquid_stock": 876,
"barcode": "8691787876203",
"quantity": 10,
"warehouse": 1,
"warehouse_name": "Depo 1"
}
],
"errors": [
{
"data": {
"barcode": "8696909530735",
"quantity": 15,
"warehouse_name": "Depo 1"
},
"errors": {
"barcode": "No items or variants found with barcode: 8696909530735"
}
},
{
"data": {
"barcode": "8691787876203",
"quantity": 10,
"warehouse_name": "Yanlis Depo Adi"
},
"errors": {
"warehouse_name": "No warehouses found with name: Yanlis Depo Adi"
}
}
]
}
NOT
-
8691787876203 ve 'Depo 1' geçerli bilgiler olduğu için birinci satır için güncelleme yapılıyor ve bu güncellemenin sonucu
results
listesinde dönülüyor. -
8696909530735 kayıtlarda bulunmayan bir barkod olduğu için bununla ilgili dönüş
errors
listesinde yapılıyor. -
8691787876203 barkodu kayıtlarda olmasına rağmen
Yanlis Depo Adi
isimli bir depo olmadığı için bu satırla ilgili dönüş deerrors
listesinde bulunuyor.