POST api/COA/AddAccount

Request Information

URI Parameters

None.

Body Parameters

AddAccountViewModel
NameDescriptionTypeAdditional information
AccountName

string

None.

AccountNameLatin

string

None.

AccountCurrencyID

integer

None.

ParentAccountID

integer

None.

AccountSerialNo

integer

None.

HasChildren

boolean

None.

LeafAccount

boolean

None.

AccountLevel

integer

None.

BankID

integer

None.

CostCenterID

integer

None.

AccountStatusID

integer

None.

AccountNotes

string

None.

OpeningBalanceVoucherID

integer

None.

BalanceSheetGroupID

integer

None.

SequenceInBalanceSheetGroup

integer

None.

ListTypeID

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "AccountName": "sample string 1",
  "AccountNameLatin": "sample string 2",
  "AccountCurrencyID": 3,
  "ParentAccountID": 4,
  "AccountSerialNo": 5,
  "HasChildren": true,
  "LeafAccount": true,
  "AccountLevel": 8,
  "BankID": 9,
  "CostCenterID": 10,
  "AccountStatusID": 11,
  "AccountNotes": "sample string 12",
  "OpeningBalanceVoucherID": 13,
  "BalanceSheetGroupID": 14,
  "SequenceInBalanceSheetGroup": 15,
  "ListTypeID": 16
}

application/xml, text/xml

Sample:
<AddAccountViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Layan_Cargo_API.ViewModels">
  <AccountCurrencyID>3</AccountCurrencyID>
  <AccountLevel>8</AccountLevel>
  <AccountName>sample string 1</AccountName>
  <AccountNameLatin>sample string 2</AccountNameLatin>
  <AccountNotes>sample string 12</AccountNotes>
  <AccountSerialNo>5</AccountSerialNo>
  <AccountStatusID>11</AccountStatusID>
  <BalanceSheetGroupID>14</BalanceSheetGroupID>
  <BankID>9</BankID>
  <CostCenterID>10</CostCenterID>
  <HasChildren>true</HasChildren>
  <LeafAccount>true</LeafAccount>
  <ListTypeID>16</ListTypeID>
  <OpeningBalanceVoucherID>13</OpeningBalanceVoucherID>
  <ParentAccountID>4</ParentAccountID>
  <SequenceInBalanceSheetGroup>15</SequenceInBalanceSheetGroup>
</AddAccountViewModel>

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

Response Information

Resource Description

ResultModel
NameDescriptionTypeAdditional information
Success

string

None.

ErrorText

string

None.

Data

Object

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": "sample string 1",
  "ErrorText": "sample string 2",
  "Data": {}
}

application/xml, text/xml

Sample:
<ResultModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Layan_Cargo_API.Models">
  <Data />
  <ErrorText>sample string 2</ErrorText>
  <Success>sample string 1</Success>
</ResultModel>