POST v1/company/{companyId}/expenses/EditExpenses/{id}

Update expense details

Request Information

URI Parameters

NameDescriptionTypeAdditional information
companyId

Company id

decimal number

Required

id

Expense id

decimal number

Required

Body Parameters

Expense detail object

AppExpenseMasterModelRequest
NameDescriptionTypeAdditional information
Id

Expense record id

integer

None.

ContactId

Contact id

decimal number

Required

VNo

Voucher/Expense number

string

Required

VDate

Voucher/Expense date

date

Required

Matching regular expression pattern: (19|20)[0-9]{2}[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])

DueDate

Voucher/Expense due date

date

Matching regular expression pattern: (19|20)[0-9]{2}[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])

VatIncluded

VAT included in amount or not

boolean

None.

Type

Transaction type (Expenses, Dr. Note)

string

None.

Note

Expense note/reference

string

None.

Items

Expense items

Collection of AppExpenseMasterItemRequest

Required

PaymentItems

Collection of AppExpenseMasterRequestNew

None.

Attachments

Expense attachments

Collection of AppAttachmentRequest

None.

isSendCopy

Email copy is need to send or not

boolean

None.

CurrencyId

Currency id

integer

Required

CurrencyRate

Currency conversion rate

decimal number

Required

ContactName

contact name

string

None.

IsFromCapiScan

Scanned purchase or not

boolean

None.

CapiScanId

CapiScan record id

integer

None.

ISFullyPaid

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "ContactId": 2.0,
  "VNo": "sample string 3",
  "VDate": "2025-04-19T17:59:37.404839+01:00",
  "DueDate": "2025-04-19T17:59:37.404839+01:00",
  "VatIncluded": true,
  "Type": "Expenses",
  "Note": "sample string 8",
  "Items": [
    {
      "Description": "sample string 1",
      "Price": 2.0,
      "AccountId": 3.0,
      "TaxId": 4.0,
      "TaxRate": 5.0,
      "TaxAmount": 6.0
    },
    {
      "Description": "sample string 1",
      "Price": 2.0,
      "AccountId": 3.0,
      "TaxId": 4.0,
      "TaxRate": 5.0,
      "TaxAmount": 6.0
    }
  ],
  "PaymentItems": [
    {
      "Id": 1.0,
      "VDate": "2025-04-19T17:59:37.404839+01:00",
      "CurrencyRate": 3.0,
      "Amount": 4.0,
      "RAmount": 5.0,
      "Description": "sample string 6",
      "F_CurrencyMaster": 7,
      "AccountName": "sample string 8",
      "F_AccountMaster": 9,
      "Addin": "sample string 10",
      "withInvoice": true,
      "IsFullyPaid": true
    },
    {
      "Id": 1.0,
      "VDate": "2025-04-19T17:59:37.404839+01:00",
      "CurrencyRate": 3.0,
      "Amount": 4.0,
      "RAmount": 5.0,
      "Description": "sample string 6",
      "F_CurrencyMaster": 7,
      "AccountName": "sample string 8",
      "F_AccountMaster": 9,
      "Addin": "sample string 10",
      "withInvoice": true,
      "IsFullyPaid": true
    }
  ],
  "Attachments": [
    {
      "FileName": "sample string 1",
      "ContentType": "sample string 2",
      "FileContents": "sample string 3",
      "ImageType": "sample string 4"
    },
    {
      "FileName": "sample string 1",
      "ContentType": "sample string 2",
      "FileContents": "sample string 3",
      "ImageType": "sample string 4"
    }
  ],
  "isSendCopy": true,
  "CurrencyId": 10,
  "CurrencyRate": 11.0,
  "ContactName": "sample string 12",
  "IsFromCapiScan": true,
  "CapiScanId": 14,
  "ISFullyPaid": true
}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AppExpenseMasterModelRequest'.

Response Information

Resource Description

ApiResponseOfAppExpenseMasterModel
NameDescriptionTypeAdditional information
Result

AppExpenseMasterModel

None.

Status

boolean

None.

Message

string

None.

Errors

Errors occures while processing request

Collection of ApiError

None.

Response Formats

application/json, text/json

Sample:
{
  "Result": {
    "Id": 1.0,
    "ContactId": 2.0,
    "ContactName": "sample string 3",
    "VNo": "sample string 4",
    "VDate": "2025-04-19",
    "DueDate": "2025-04-19",
    "CurrencyCode": "sample string 7",
    "CurrencySymbol": "sample string 8",
    "GrossAmount": 9.0,
    "IGrossAmount": 10.0,
    "TaxAmount": 11.0,
    "ITaxAmount": 12.0,
    "TotalAmount": 22.0,
    "ITotalAmount": 20.0,
    "IsEditable": true,
    "Type": "Expenses",
    "BalanceRemaining": 16.0,
    "AppliedAmount": 17.0,
    "IAppliedAmount": 18.0,
    "Note": "sample string 19",
    "Items": [
      {
        "Id": 1.0,
        "Description": "sample string 3",
        "Price": 4.0,
        "AccountId": 5.0,
        "AccountName": "sample string 6",
        "AccountCode": "sample string 7",
        "TaxId": 8.0,
        "TaxName": "sample string 9",
        "TaxRate": 10.0,
        "TaxAmount": 11.0,
        "VatIncluded": true,
        "gAmount": 13.0,
        "NetAmount": -7.0,
        "GrossAmount": 4.0
      },
      {
        "Id": 1.0,
        "Description": "sample string 3",
        "Price": 4.0,
        "AccountId": 5.0,
        "AccountName": "sample string 6",
        "AccountCode": "sample string 7",
        "TaxId": 8.0,
        "TaxName": "sample string 9",
        "TaxRate": 10.0,
        "TaxAmount": 11.0,
        "VatIncluded": true,
        "gAmount": 13.0,
        "NetAmount": -7.0,
        "GrossAmount": 4.0
      }
    ],
    "Attachments": [
      {
        "Id": 1.0,
        "Name": "sample string 2",
        "ContentType": "sample string 3",
        "FileUrl": "sample string 6",
        "FileContent": "sample string 7"
      },
      {
        "Id": 1.0,
        "Name": "sample string 2",
        "ContentType": "sample string 3",
        "FileUrl": "sample string 6",
        "FileContent": "sample string 7"
      }
    ],
    "VatIncluded": true,
    "CurrencyId": 1.0,
    "CurrencyRate": 22.0,
    "CurrencyName": "sample string 23",
    "Payments": [
      {
        "Id": 1.0,
        "VDate_Payment": "sample string 2",
        "VNo_Payment": "sample string 3",
        "Amount": 4.0,
        "RAmount": 5.0,
        "Symbol": "sample string 6",
        "F_CurrencyMaster": 7,
        "AccountName": "sample string 8"
      },
      {
        "Id": 1.0,
        "VDate_Payment": "sample string 2",
        "VNo_Payment": "sample string 3",
        "Amount": 4.0,
        "RAmount": 5.0,
        "Symbol": "sample string 6",
        "F_CurrencyMaster": 7,
        "AccountName": "sample string 8"
      }
    ]
  },
  "Status": true,
  "Message": "sample string 2",
  "Errors": [
    {
      "Number": 1,
      "Message": "sample string 2",
      "Exception": {
        "ClassName": "System.Exception",
        "Message": null,
        "Data": null,
        "InnerException": null,
        "HelpURL": "sample string 1",
        "StackTraceString": null,
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": null,
        "HResult": 3,
        "Source": "sample string 2",
        "WatsonBuckets": null
      }
    },
    {
      "Number": 1,
      "Message": "sample string 2",
      "Exception": {
        "ClassName": "System.Exception",
        "Message": null,
        "Data": null,
        "InnerException": null,
        "HelpURL": "sample string 1",
        "StackTraceString": null,
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": null,
        "HResult": 3,
        "Source": "sample string 2",
        "WatsonBuckets": null
      }
    }
  ]
}