مستندات API سیبا
نسخه: 1.۰.۰
http://localhost:3900
GET /api/banks
دریافت لیست حسابهای بانکی
| کد | توضیح |
|---|---|
| ۲۰۰ | لیست حسابها |
| ۵۰۰ | خطای سرور |
curl
JavaScript
PHP
curl http://localhost:3900/api/banks
fetch("http://localhost:3900/api/banks")
.then(res=>res.json())
.then(data=>console.log(data))
$response=file_get_contents("http://localhost:3900/api/banks");
echo $response;
GET /api/cashRegister
دریافت لیست صندوقها
| کد | توضیح |
|---|---|
| ۲۰۰ | لیست صندوقها |
| ۵۰۰ | خطای سرور |
curl
JavaScript
PHP
curl http://localhost:3900/api/cashRegister
fetch("http://localhost:3900/api/cashRegister")
.then(res=>res.json())
.then(data=>console.log(data))
$response=file_get_contents("http://localhost:3900/api/cashRegister");
echo $response;
GET /api/customers
دریافت لیست مشتریان
| نام | جایگاه | نوع | اجباری |
|---|---|---|---|
| customerCode | query | integer | |
| tel | query | string | |
| name | query | string |
| کد | توضیح |
|---|---|
| ۲۰۰ | دریافت موفق |
| ۴۰۴ | مشتری یافت نشد |
curl
JavaScript
PHP
curl http://localhost:3900/api/customers
fetch("http://localhost:3900/api/customers")
.then(res=>res.json())
.then(data=>console.log(data))
$response=file_get_contents("http://localhost:3900/api/customers");
echo $response;
GET /api/customers/group
دریافت گروههای مشتری
| کد | توضیح |
|---|---|
| ۲۰۰ | لیست گروهها |
GET /api/customers/tel
جستجوی مشتری با شماره تلفن
| نام | جایگاه | نوع | اجباری |
|---|---|---|---|
| tel | query | string | بله |
| کد | توضیح |
|---|---|
| ۲۰۰ | مشتری یافت شد |
| ۴۰۴ | مشتری یافت نشد |
GET /api/products
دریافت لیست کالاها
| نام | جایگاه | نوع | اجباری |
|---|---|---|---|
| productCode | query | integer | |
| name | query | string | |
| barcode | query | string |
| کد | توضیح |
|---|---|
| ۲۰۰ | دریافت موفق |
| ۴۰۴ | کالایی یافت نشد |
curl
JavaScript
PHP
curl http://localhost:3900/api/products
fetch("http://localhost:3900/api/products")
.then(res=>res.json())
.then(data=>console.log(data))
$response=file_get_contents("http://localhost:3900/api/products");
echo $response;
GET /api/products/barcode
جستجو کالا با بارکد
| نام | جایگاه | نوع | اجباری |
|---|---|---|---|
| barcode | query | string | بله |
| کد | توضیح |
|---|---|
| ۲۰۰ | کالا یافت شد |
| ۴۰۴ | کالا یافت نشد |
GET /api/products/group
دریافت گروه کالا
| کد | توضیح |
|---|---|
| ۲۰۰ | لیست گروهها |
GET /api/products/unit
دریافت واحدهای کالا
| کد | توضیح |
|---|---|
| ۲۰۰ | لیست واحدها |
GET /api/products/warehouse
موجودی کالا در انبار
| نام | جایگاه | نوع | اجباری |
|---|---|---|---|
| productId | query | integer |
| کد | توضیح |
|---|---|
| ۲۰۰ | موجودی دریافت شد |
| ۴۰۴ | کالا یافت نشد |
POST /api/factors
ثبت فاکتور جدید
| کد | توضیح |
|---|---|
| ۲۰۱ | فاکتور با موفقیت ایجاد شد |
| ۴۰۰ | خطای اعتبارسنجی |
| ۵۰۰ | خطای سرور |
curl
JavaScript
PHP
curl -X POST http://localhost:3900/api/factors
fetch("http://localhost:3900/api/factors",{
method:"POST"
})
.then(res=>res.json())
.then(data=>console.log(data))
$url="http://localhost:3900/api/factors"; $options=[ "http"=>[ "method"=>"POST" ] ]; $context=stream_context_create($options); $result=file_get_contents($url,false,$context); echo $result;
GET /api/history
دریافت تاریخچه سیستم
| نام | جایگاه | نوع | اجباری |
|---|---|---|---|
| userId | query | integer |
| کد | توضیح |
|---|---|
| ۲۰۰ | تاریخچه دریافت شد |
| ۴۰۴ | تاریخچهای یافت نشد |
| ۵۰۰ | خطای سرور |
POST /api/receivePay
ثبت دریافت یا پرداخت
| کد | توضیح |
|---|---|
| ۲۰۱ | عملیات با موفقیت ثبت شد |
| ۴۰۰ | خطای ورودی |
curl
JavaScript
PHP
curl -X POST http://localhost:3900/api/receivePay
fetch("http://localhost:3900/api/receivePay",{
method:"POST"
})
.then(res=>res.json())
.then(data=>console.log(data))
$url="http://localhost:3900/api/receivePay"; $options=[ "http"=>[ "method"=>"POST" ] ]; $context=stream_context_create($options); $result=file_get_contents($url,false,$context); echo $result;
GET /api/users
دریافت لیست کاربران سیستم
| کد | توضیح |
|---|---|
| ۲۰۰ | لیست کاربران |
| ۵۰۰ | خطای سرور |
curl
JavaScript
PHP
curl http://localhost:3900/api/users
fetch("http://localhost:3900/api/users")
.then(res=>res.json())
.then(data=>console.log(data))
$response=file_get_contents("http://localhost:3900/api/users");
echo $response;