POST api/GLAccounts

Insert a new GL Account.

Request Information

URI Parameters

None.

Body Parameters

glAccountInsertViewModel

GlAccountInsertViewModel
NameDescriptionTypeAdditional information
GLAccountNumber

Required Possible values include alphanumeric characters only
Max legth: 10

string

Required

Matching regular expression pattern: ^[a-zA-Z0-9]*$

Max length: 10

Description

Required Possible values include alphanumeric characters and special characters
Max legth: 100

string

Required

Max length: 100

IsBalance

Is Balance Account

boolean

None.

Is1099Account

Is 1099 Account

boolean

None.

Active

Account Active Or Inactive

boolean

None.

BudgetCheck

Is Budget Account

boolean

None.

GlAccountTypeId

GlAccountTypeId

integer

None.

GlSubAccounts

GL Subaccounts

Collection of GLSubAccountBaseViewModel

None.

GlAccountTypeCategoryId

integer

None.

GlAccountTypeSubCategoryId

GlAccountTypeSubCategoryId

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "glAccountNumber": "sample string 1",
  "description": "sample string 2",
  "isBalance": true,
  "is1099Account": true,
  "active": true,
  "budgetCheck": true,
  "glAccountTypeId": 1,
  "glSubAccounts": [
    {
      "subAccountName": "sample string 1",
      "description": "sample string 2"
    },
    {
      "subAccountName": "sample string 1",
      "description": "sample string 2"
    }
  ],
  "glAccountTypeCategoryId": 1,
  "glAccountTypeSubCategoryId": 1
}

application/xml, text/xml

Sample:
<GlAccountInsertViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CamAcctApi.Controllers.GLAccounts.Models">
  <Active>true</Active>
  <BudgetCheck>true</BudgetCheck>
  <Description>sample string 2</Description>
  <GLAccountNumber>sample string 1</GLAccountNumber>
  <GlAccountTypeCategoryId>1</GlAccountTypeCategoryId>
  <GlAccountTypeId>1</GlAccountTypeId>
  <GlAccountTypeSubCategoryId>1</GlAccountTypeSubCategoryId>
  <GlSubAccounts xmlns:d2p1="http://schemas.datacontract.org/2004/07/CamAcctApi.ViewModels">
    <d2p1:GLSubAccountBaseViewModel>
      <d2p1:Description>sample string 2</d2p1:Description>
      <d2p1:SubAccountName>sample string 1</d2p1:SubAccountName>
    </d2p1:GLSubAccountBaseViewModel>
    <d2p1:GLSubAccountBaseViewModel>
      <d2p1:Description>sample string 2</d2p1:Description>
      <d2p1:SubAccountName>sample string 1</d2p1:SubAccountName>
    </d2p1:GLSubAccountBaseViewModel>
  </GlSubAccounts>
  <Is1099Account>true</Is1099Account>
  <IsBalance>true</IsBalance>
</GlAccountInsertViewModel>

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

Response Information

Resource Description

GLAcoountId

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.