GetDepositedInvoices

Endpoint

Overview

The "GetDepositedInvoices" endpoint is a POST request. It is used to get the list of invoices included in a deposit.

The endpoint on Swagger: Reports_GetDepositedInvoices.

Now, we are going to declare the endpoint and its models along with each accepted parameter and possible value.

📘

Request Header

Add "Authorization": "Bearer {Token}" to request header. Token of demo configuration can be found here.


Request Model

The request is a POST request with the following parameters:

Required Fields

Input ParameterTypeDescription
DepositReferencestringthe Deposit Reference you would like to receive its invoices.

Optional Fields

Input ParameterTypeDescription
TypestringVendor: The deposit reference belongs to the vendor. (Default)
Supplier: The deposit reference belongs to a supplier.
SupplierCodeintegerThe supplier code to which the deposit reference belongs.

🚧

Type & SupplierCode

If you don't send Type & SupplierCode in the request to the endpoint, MyFatoorah will consider that the DepositReference is of a vendor.

In case the DepositReference belongs to a vendor. You can only send the DepositReference or you can add the Type and specify its value as a Vendor

📘

SupplierCode

SupplierCode is mandatory to send in case the Type value is a supplier

Response Model

After viewing the Response Model that you will get as a result of your request, here, you will find full details about the Data Model of this API endpoint. Let's check it and its contents.
The data model is a list of InvoiceDetailsModel which is explained below.

InvoiceDetailsModel

Response FieldTypeDescription
InvoiceIdnumberInvoiceId
PaymentGatewaystring
PaymentIdstring
InvoiceReferencestring
CustomerReferencestring
CreatedDatedate
InvoiceValuestring
PaidCurrencyValuestring
PaidCurrencystring
InvoiceDisplayValuestring
DueValuestringThe total amount of the invoice
PaidDatedate
TotalServiceChargestringTransaction service charge
DueDepositstringThe amount received by the vendor/supplier
DepositReferencestring
DepositDatedate

Sample Message

{
  "DepositReference": "2023000011",
  "Type": "Vendor"
}
{
  "IsSuccess": true,
  "Message": null,
  "ValidationErrors": null,
  "Data": [
    {
      "InvoiceId": 2608271,
      "PaymentGateway": "VISA/MASTER",
      "PaymentId": "07072608271167936573",
      "InvoiceReference": "2023004944",
      "CustomerReference": null,
      "CreatedDate": "2023-08-14T09:13:50.197",
      "InvoiceValue": "232.500",
      "PaidCurrencyValue": "232.500",
      "PaidCurrency": "KD",
      "InvoiceDisplayValue": "232.500",
      "DueValue": "232.500",
      "PaidDate": "2023-08-14T09:13:52.103",
      "TotalServiceCharge": "6.975",
      "DueDeposit": "224.479",
      "DepositReference": "2023000011",
      "DepositDate": "2023-08-14T09:26:02.237"
    },
    {
      "InvoiceId": 2608272,
      "PaymentGateway": "VISA/MASTER",
      "PaymentId": "07072608272167936673",
      "InvoiceReference": "2023004945",
      "CustomerReference": null,
      "CreatedDate": "2023-08-14T09:13:52.247",
      "InvoiceValue": "232.500",
      "PaidCurrencyValue": "232.500",
      "PaidCurrency": "KD",
      "InvoiceDisplayValue": "232.500",
      "DueValue": "232.500",
      "PaidDate": "2023-08-14T09:13:53.15",
      "TotalServiceCharge": "6.975",
      "DueDeposit": "224.479",
      "DepositReference": "2023000011",
      "DepositDate": "2023-08-14T09:26:02.237"
    }
  ]
}
{
  "DepositReference": "2023000204",
  "Type": "Supplier",
  "SupplierCode": "1"
}
{
  "IsSuccess": true,
  "Message": null,
  "ValidationErrors": null,
  "Data": [
    {
      "InvoiceId": 2146266,
      "PaymentGateway": "KNET",
      "PaymentId": "100202308140512007",
      "InvoiceReference": "2023000019",
      "CustomerReference": null,
      "CreatedDate": "2023-03-22T13:30:14.36",
      "InvoiceValue": "100.000",
      "PaidCurrencyValue": "100.000",
      "PaidCurrency": "KD",
      "InvoiceDisplayValue": "100.000",
      "DueValue": "100.000",
      "PaidDate": "2023-03-22T13:30:39.723",
      "TotalServiceCharge": "2.100",
      "DueDeposit": "95.585",
      "DepositReference": "2023000204",
      "DepositDate": "2023-03-28T09:14:00"
    },
    {
      "InvoiceId": 2146271,
      "PaymentGateway": "KNET",
      "PaymentId": "100202308140564923",
      "InvoiceReference": "2023000020",
      "CustomerReference": null,
      "CreatedDate": "2023-03-22T13:32:02.293",
      "InvoiceValue": "100.000",
      "PaidCurrencyValue": "100.000",
      "PaidCurrency": "KD",
      "InvoiceDisplayValue": "100.000",
      "DueValue": "100.000",
      "PaidDate": "2023-03-22T13:32:21.433",
      "TotalServiceCharge": "2.100",
      "DueDeposit": "90.000",
      "DepositReference": "2023000204",
      "DepositDate": "2023-03-28T09:14:00"
    },
    {
      "InvoiceId": 2146276,
      "PaymentGateway": "KNET",
      "PaymentId": "100202308140631527",
      "InvoiceReference": "2023000021",
      "CustomerReference": null,
      "CreatedDate": "2023-03-22T13:34:15.47",
      "InvoiceValue": "100.000",
      "PaidCurrencyValue": "100.000",
      "PaidCurrency": "KD",
      "InvoiceDisplayValue": "100.000",
      "DueValue": "100.000",
      "PaidDate": "2023-03-22T13:34:35.75",
      "TotalServiceCharge": "2.100",
      "DueDeposit": "40.000",
      "DepositReference": "2023000204",
      "DepositDate": "2023-03-28T09:14:00"
    }
  ]
}