/api/invoices/
POST
- Header
Parameter Description GenerationVersion نسخه API Authorization توکن از نوع JWT برای اعتبارسنجی کاربر IntegrationID کد دستگاه ArbitraryCode یک GUID یکتا EncArbitraryCode نسخه کد شده ArbitraryCode به کمک کلید عمومی - Request
Parameter Type Required Description GUID string * شناسه یکتا برای جلوگیری از ثبت تکراری CurrencyRef int * شناسه ارز CustomerRef int * شناسه مشتری AddressRef ?int – شناسه آدرس (اختیاری) SaleTypeRef int * شناسه نوع فروش DiscountOnCustomer double * تخفیف مشتری Price double * مبلغ ناخالص Discount double * تخفیف Tax double * مالیات Duty double * عوارض Addition double * اضافات Items []InvoiceItem_New * آرایهای از اقلام فاکتور JSON{ "InvoiceExtraData": { "Fields": [ { "Key": "string", "Value": {} } ], "ExtraColumnVersion": 0, "ExtraDataVersion": 0, "EntityID": 0 }, "GUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "CurrencyRef": 1, "CustomerRef": 1, "AddressRef": 1, "SaleTypeRef": 1, "SettlementType": 1, "DiscountOnCustomer": 0, "Price": 0, "Discount": 0, "Tax": 0, "Duty": 0, "Addition": 0, "Items": [ { "RowID": 1, "ItemRef": 1, "TracingRef": 1, "StockRef": 1, "Quantity": 0, "SecondaryQuantity": 0, "Fee": 0, "Price": 0, "Description": "string", "PriceInfoPercentDiscount": 0, "PriceInfoPriceDiscount": 0, "PriceInfoDiscountRate": 0, "AggregateAmountPercentDiscount": 0, "AggregateAmountPriceDiscount": 0, "AggregateAmountDiscountRate": 0, "CustomerDiscount": 0, "CustomerDiscountRate": 0, "Discount": 0, "DiscountParentRef": 1, "Tax": 0, "Duty": 0, "Addition": 0 } ] } - Response
- 200
Parameter Type Description InvoiceID int شناسه فاکتور OrderRef ?int شناسه درخواست فروش QuotationRef ?int شناسه پیش فاکتور Number int شماره فاکتور Date datetime تاریخ فاکتور CustomerRef int شناسه مشتری CurrencyRef int شناسه ارز Rate double نرخ تبدیل ارز SaleTypeRef int شناسه نوع فروش AddressRef ?int شناسه آدرس Price decimal مبلغ Tax ?decimal مالیات Duty ?decimal عوارض Discount ?decimal تخفیف Addition ?decimal اضافات NetPrice ?decimal مبلغ خالص InvoiceItems []InvoiceItem آرایهای از اقلام فاکتور JSON{ "InvoiceExtraData": { "Fields": [ { "Key": "string", "Value": {} } ], "ExtraColumnVersion": 0, "ExtraDataVersion": 0, "EntityID": 0 }, "InvoiceID": 1, "OrderRef": 1, "QuotationRef": 1, "Number": 0, "Date": "2024-04-28", "CustomerRef": 1, "CurrencyRef": 1, "Rate": 0, "SaleTypeRef": 1, "AddressRef": 1, "Price": 0, "Tax": 0, "Duty": 0, "Discount": 0, "Addition": 0, "NetPrice": 0, "AgreementRef": 1, "RemainingAmount": 0, "TotalReceivedAmount": 0, "SettlementType": 1, "State": 1, "InvoiceItems": [ { "InvoiceItemID": 1, "ItemRef": 1, "TracingRef": 1, "TracingTitle": "string", "Quantity": 0, "SecondaryQuantity": 0, "Fee": 0, "Price": 0, "Discount": 0, "Tax": 0, "Duty": 0, "Addition": 0, "NetPrice": 0, "DiscountInvoiceItemRef": 1, "ProductPackRef": 1, "ProductPackQuantity": 0, "Description": "string" } ] } - 400
Code Message Description 400 شناسه سند نباید خالی باشد. شناسه GUID ارسال نشده است. 400 کالای نامعتبر در حال حاضر امکان انتخاب این کالا وجود ندارد. 400 شناسه کالای مشمول تخفیف پیدا نشد. شناسه تخفیف اشتباه است. 400 “متن خطای بیزینسی” در هنگام ذخیره فاکتور خطایی رخ داده است.
- 200