POST v1/gl-accounts

Creates new or updates existing gl account This API performs full update of an existing gl account. Ensure that all parameters and IDs are correctly supplied.

Request Information

URI Parameters

None.

Body Parameters

GLAccount
NameDescriptionTypeAdditional information
Id

Unique account id

integer

None.

Name

Account name

string

Required

ExtendedName

Read-only - Account name prefixed with account number if set to do so in GL settings

string

None.

AccountType

Account Type - cannot be changed once set

IdNamePair

Required

AccountNumber

Account Number

string

None.

Description

Account Description

string

None.

IsReconcilable

is the account reconcilable?

boolean

None.

DoNotAllowPosting

does the account not allow posting?

boolean

None.

Parent

The parent GL Account - set id to change parent (parent must have same account type as child) - Name and ExtendedName are read-only

IdNameExtended

None.

DateCreated

Read-only - The date and time (in company time zone) when the gl account was created.

date

None.

CreatedBy

Read-only - The person who created the gl account

IdNamePair

None.

LastUpdatedDate

Read-only - The date and time (in company time zone) when the gl account was last updated

date

None.

LastUpdatedBy

Read-only - The person who last updated the gl account

IdNamePair

None.

CurrencyISO

Currency ISO symbol - cannot be changed once set

string

None.

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "name": "sample string 2",
  "extendedName": "sample string 3",
  "accountType": {
    "id": 1,
    "name": "sample string 2"
  },
  "accountNumber": "sample string 4",
  "description": "sample string 5",
  "isReconcilable": true,
  "doNotAllowPosting": true,
  "parent": {
    "extendedName": "sample string 1",
    "id": 2,
    "name": "sample string 3"
  },
  "dateCreated": "2022-07-06T12:27:10.4490556-04:00",
  "createdBy": {
    "id": 1,
    "name": "sample string 2"
  },
  "lastUpdatedDate": "2022-07-06T12:27:10.4490556-04:00",
  "lastUpdatedBy": {
    "id": 1,
    "name": "sample string 2"
  },
  "currencyISO": "sample string 9"
}

application/xml, text/xml

Sample:
<GLAccount xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.Accounting">
  <AccountNumber>sample string 4</AccountNumber>
  <AccountType xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </AccountType>
  <CreatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </CreatedBy>
  <CurrencyISO>sample string 9</CurrencyISO>
  <DateCreated>2022-07-06T12:27:10.4490556-04:00</DateCreated>
  <Description>sample string 5</Description>
  <DoNotAllowPosting>true</DoNotAllowPosting>
  <ExtendedName>sample string 3</ExtendedName>
  <Id>1</Id>
  <IsReconcilable>true</IsReconcilable>
  <LastUpdatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </LastUpdatedBy>
  <LastUpdatedDate>2022-07-06T12:27:10.4490556-04:00</LastUpdatedDate>
  <Name>sample string 2</Name>
  <Parent xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>2</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 3</d2p1:_x003C_Name_x003E_k__BackingField>
    <d2p1:ExtendedName>sample string 1</d2p1:ExtendedName>
  </Parent>
</GLAccount>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

GLAccount
NameDescriptionTypeAdditional information
Id

Unique account id

integer

None.

Name

Account name

string

Required

ExtendedName

Read-only - Account name prefixed with account number if set to do so in GL settings

string

None.

AccountType

Account Type - cannot be changed once set

IdNamePair

Required

AccountNumber

Account Number

string

None.

Description

Account Description

string

None.

IsReconcilable

is the account reconcilable?

boolean

None.

DoNotAllowPosting

does the account not allow posting?

boolean

None.

Parent

The parent GL Account - set id to change parent (parent must have same account type as child) - Name and ExtendedName are read-only

IdNameExtended

None.

DateCreated

Read-only - The date and time (in company time zone) when the gl account was created.

date

None.

CreatedBy

Read-only - The person who created the gl account

IdNamePair

None.

LastUpdatedDate

Read-only - The date and time (in company time zone) when the gl account was last updated

date

None.

LastUpdatedBy

Read-only - The person who last updated the gl account

IdNamePair

None.

CurrencyISO

Currency ISO symbol - cannot be changed once set

string

None.

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "name": "sample string 2",
  "extendedName": "sample string 3",
  "accountType": {
    "id": 1,
    "name": "sample string 2"
  },
  "accountNumber": "sample string 4",
  "description": "sample string 5",
  "isReconcilable": true,
  "doNotAllowPosting": true,
  "parent": {
    "extendedName": "sample string 1",
    "id": 2,
    "name": "sample string 3"
  },
  "dateCreated": "2022-07-06T12:27:10.4490556-04:00",
  "createdBy": {
    "id": 1,
    "name": "sample string 2"
  },
  "lastUpdatedDate": "2022-07-06T12:27:10.4490556-04:00",
  "lastUpdatedBy": {
    "id": 1,
    "name": "sample string 2"
  },
  "currencyISO": "sample string 9"
}

application/xml, text/xml

Sample:
<GLAccount xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.Accounting">
  <AccountNumber>sample string 4</AccountNumber>
  <AccountType xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </AccountType>
  <CreatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </CreatedBy>
  <CurrencyISO>sample string 9</CurrencyISO>
  <DateCreated>2022-07-06T12:27:10.4490556-04:00</DateCreated>
  <Description>sample string 5</Description>
  <DoNotAllowPosting>true</DoNotAllowPosting>
  <ExtendedName>sample string 3</ExtendedName>
  <Id>1</Id>
  <IsReconcilable>true</IsReconcilable>
  <LastUpdatedBy xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </LastUpdatedBy>
  <LastUpdatedDate>2022-07-06T12:27:10.4490556-04:00</LastUpdatedDate>
  <Name>sample string 2</Name>
  <Parent xmlns:d2p1="http://schemas.datacontract.org/2004/07/BBM.BLL.Core">
    <d2p1:_x003C_Id_x003E_k__BackingField>2</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 3</d2p1:_x003C_Name_x003E_k__BackingField>
    <d2p1:ExtendedName>sample string 1</d2p1:ExtendedName>
  </Parent>
</GLAccount>