POST api/Journal/Add

Request Information

URI Parameters

None.

Body Parameters

JournalEntry
NameDescriptionTypeAdditional information
JournalEntryId

integer

None.

VoucherNo

string

None.

VoucherDate

date

None.

Narration

string

None.

TotalDebit

decimal number

None.

TotalCredit

decimal number

None.

CreatedBy

integer

None.

CreatedOn

date

None.

Details

Collection of JournalEntryDetail

None.

Request Formats

application/json, text/json

Sample:
{
  "JournalEntryId": 1,
  "VoucherNo": "sample string 2",
  "VoucherDate": "2026-01-30T02:34:34.2071775+05:30",
  "Narration": "sample string 4",
  "TotalDebit": 5.0,
  "TotalCredit": 6.0,
  "CreatedBy": 7,
  "CreatedOn": "2026-01-30T02:34:34.2071775+05:30",
  "Details": [
    {
      "Id": 1,
      "JournalEntryId": 2,
      "AccountId": 3,
      "AccountName": "sample string 4",
      "Narration": "sample string 5",
      "Amount": 6.0,
      "CrDr": "sample string 7"
    },
    {
      "Id": 1,
      "JournalEntryId": 2,
      "AccountId": 3,
      "AccountName": "sample string 4",
      "Narration": "sample string 5",
      "Amount": 6.0,
      "CrDr": "sample string 7"
    }
  ]
}

application/xml, text/xml

Sample:
<JournalEntry xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NSG_Accountings.MC">
  <CreatedBy>7</CreatedBy>
  <CreatedOn>2026-01-30T02:34:34.2071775+05:30</CreatedOn>
  <Details>
    <JournalEntryDetail>
      <AccountId>3</AccountId>
      <AccountName>sample string 4</AccountName>
      <Amount>6</Amount>
      <CrDr>sample string 7</CrDr>
      <Id>1</Id>
      <JournalEntryId>2</JournalEntryId>
      <Narration>sample string 5</Narration>
    </JournalEntryDetail>
    <JournalEntryDetail>
      <AccountId>3</AccountId>
      <AccountName>sample string 4</AccountName>
      <Amount>6</Amount>
      <CrDr>sample string 7</CrDr>
      <Id>1</Id>
      <JournalEntryId>2</JournalEntryId>
      <Narration>sample string 5</Narration>
    </JournalEntryDetail>
  </Details>
  <JournalEntryId>1</JournalEntryId>
  <Narration>sample string 4</Narration>
  <TotalCredit>6</TotalCredit>
  <TotalDebit>5</TotalDebit>
  <VoucherDate>2026-01-30T02:34:34.2071775+05:30</VoucherDate>
  <VoucherNo>sample string 2</VoucherNo>
</JournalEntry>

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 'JournalEntry'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.