دریافت لیست
متد | endpoint |
---|---|
Get | transactions/ |
Response
"transactions": [
{
"id": 1,
"accountingCode": "0010",
"priceUnit": null,
"date": "1401/07/01",
"description": null,
"type": "receive",
"currency_exchange": 1,
"createdAt": "2022-10-17 08:36:40",
"updatedAt": "2022-10-17 08:37:23",
"deletedAt": null,
"CurrencyId": 1,
"ProjectId": null,
"FactorId": null,
"Project": null,
"Currency": {
"id": 1,
"en_title": "ریال",
"fa_title": "ریال",
"createdAt": "2022-07-16 06:45:18",
"updatedAt": "2022-07-16 06:45:18",
"deletedAt": null
},
"totalAmount": 50000000000
}
...
]
دریافت از طریق Id
متد | endpoint |
---|---|
Get | transactions/{id} |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
id | اجباری | Integer | Id تراکنش |
Response
{
"transaction": {
"id": 1,
"accountingCode": "0010",
"priceUnit": null,
"date": "1401/07/01",
"description": "سند دریافت فاکتور شماره #820",
"type": "receive",
"currency_exchange": 1,
"createdAt": "2022-10-04 09:33:21",
"updatedAt": "2022-10-04 09:33:21",
"deletedAt": null,
"CurrencyId": 1,
"ProjectId": null,
"FactorId": 820,
"Currency": {
"id": 1,
"en_title": "ریال",
"fa_title": "ریال",
"createdAt": "2022-07-16 06:45:18",
"updatedAt": "2022-07-16 06:45:18",
"deletedAt": null,
"label": "ریال",
"value": 1
},
"Factor": {
"id": 820,
"title": "فاکتور فروش محمود پارسا",
"accountingCode": "820",
"date": "2022-09-23",
"dueDate": "2022-10-01",
"priceUnit": null,
"transferPrice": null,
"status": "پرداخت شده",
"reference": null,
"description": null,
"type": "sale",
"currency_exchange": 1,
"createdAt": "2022-10-04 09:32:59",
"updatedAt": "2022-10-04 09:42:32",
"deletedAt": null,
"PersonId": 1,
"CurrencyId": 1,
"ProjectId": null,
"SellerId": null
},
"Project": null
},
"transactionItems": [
{
"id": 26,
"amount": 50000000,
"wage": null,
"reference": null,
"description": null,
"optionableId": 149,
"optionableType": "financial",
"createdAt": "2022-10-04 09:33:21",
"updatedAt": "2022-10-04 09:33:21",
"deletedAt": null,
"TransactionId": 1,
"AccountTypeId": null,
"Account_Type": null,
"optionType": {
"id": 149,
"accountingCode": "0029",
"name": "رفاه کارگران",
"branch": null,
"accountNumber": null,
"priceUnit": null,
"description": null,
"balance": 1733900035,
"default": false,
"active": true,
"type": "bank",
"createdAt": "2022-08-03 11:36:37",
"updatedAt": "2022-10-04 09:33:21",
"deletedAt": null,
"CurrencyId": 1,
}
}
]
}
ذخیره
متد | endpoint |
---|---|
Post | transactions/ |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
accountingCode | اختیاری | String | کد شخص در صورتی که کد شخص را وارد نکنید، شخص جدید ذخیره می شود. در صورتی که کد وارد شود و موجود باشد، اطلاعات ویرایش می شود.در صورتی که کد وارد شود و موجود نباشد، شخص با آن کد ذخیره خواهد شد. کد باید به صورت رشته ای از اعداد شد |
nickName | اجباری | String | نام مستعار |
isLegal | اختیاری | String | |
firstName | اختیاری | String | نام |
lastName | اختیاری | String | نام خانوادگی |
active | اختیاری | Boolean | وضعیت فعال یا غیر فعال کاربر |
personType | اجباری | Enum(customer,personnel,seller,provider) | نوع شخص که فقط یکی از موارد (customer,personnel,seller,provider) می تواند باشد |
personTypeId | اختیاری | Integer | دسته بندی شخص |
financialCredit | اختیاری | Integer | اعتبار مالی |
tax | اختیاری | Integer | مالیات |
description | اختیاری | String | توضیحات |
country | اختیاری | String | کشور |
state | اختیاری | String | استان |
city | اختیاری | String | شهر |
postalCode | اختیاری | String | |
address | اختیاری | String | |
phone | اختیاری | String | |
mobile | اختیاری | String | |
اختیاری | String | ||
website | اختیاری | String | |
bankName | اختیاری | String | |
bankAccountNumber | اختیاری | String | |
bankCardNumber | اختیاری | String | |
bankShaba | اختیاری | String | |
jobPosition | اختیاری | String | |
salary | اختیاری | String | |
contractStart | اختیاری | String | |
contractEnd | اختیاری | String | |
contractDescription | اختیاری | String | |
commissionInput | اختیاری | String |
مثال
{
"main": {
"accountingCode": "010",
"nickName": "ذکتر پارسا",
"firstName": "محمود",
"lastName": "پارسا",
"title": "دکتر پارسا",
"company": null,
"description": "مشتری اینترنت پرسرعت",
"active": true,
"personType": "customer",
"personTypeId": 1
},
"others": [
{"financialCredit": "500000"},
{"economicCode": "12345"},
{"registerationNumber": "12345678"},
{"postalCode": "1234567890"},
{"country": "ایران"},
{"state": "تهران"},
{"city": "تهران"},
{"address": "تهران_میدان ولیعصر"},
{"phone": "02112345678"},
{"mobile": "09123456789"},
{"email": "personEmail@gmail.com"},
{"website": "person.web"},
{"bankName": "ملی"},
{"bankAccountNumber": "0012345678"},
{"bankCardNumber": "1234123412341234"},
{"bankShaba": "12341234123412341234"}
]
}
Response
"transaction": {
"id": 1,
"accountingCode": "0010",
"priceUnit": null,
"date": "1401/07/01",
"description": null,
"type": "receive",
"currency_exchange": 1,
"createdAt": "2022-10-17 08:36:40",
"updatedAt": "2022-10-17 08:37:23",
"deletedAt": null,
"CurrencyId": 1,
"ProjectId": null,
"FactorId": null,
"Project": null,
"Currency": {
"id": 1,
"en_title": "ریال",
"fa_title": "ریال",
"createdAt": "2022-07-16 06:45:18",
"updatedAt": "2022-07-16 06:45:18",
"deletedAt": null
},
"totalAmount": 50000000000
}
ویرایش
متد | endpoint |
---|---|
Put | transactions/{id} |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
id | اجباری | Integer | Id تراکنش |
Response
"transaction": {
"id": 1,
"accountingCode": "0010",
"priceUnit": null,
"date": "1401/07/01",
"description": null,
"type": "receive",
"currency_exchange": 1,
"createdAt": "2022-10-17 08:36:40",
"updatedAt": "2022-10-17 08:37:23",
"deletedAt": null,
"CurrencyId": 1,
"ProjectId": null,
"FactorId": null,
"Project": null,
"Currency": {
"id": 1,
"en_title": "ریال",
"fa_title": "ریال",
"createdAt": "2022-07-16 06:45:18",
"updatedAt": "2022-07-16 06:45:18",
"deletedAt": null
},
"totalAmount": 50000000000
}
حذف
متد | endpoint |
---|---|
Delete | transactions/{id} |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
id | اجباری | Integer | Id تراکنش |
Response
{
"message": "تراکنش انتخاب شده با موفقیت حذف شد"
}