Help Page Home - Accounts
POST Account
Insert an account.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
WsAccessKey | The Web Service access key for this user and file which allows access to the API for the associated file (found in File - Settings). Using OAuth authentication mechanism is the preferred method to allow API access. | string |
Optional. Legacy authentication method and only required if not using OAuth. OAuth is preferred. |
FileId | Specifies the file id of the file to perform the operation upon. | integer |
Required |
Body Parameters
Account details.
AccountDetailName | Description | Type | Additional information |
---|---|---|---|
Id | The unique Id for the account. | integer |
None. |
Name | The account name. | string |
None. |
AccountLevel | The level of account - either "Header" or "Detail". Default is Detail. | string |
None. |
AccountType | The type of account. E.g. "Income". | string |
None. |
IsActive | Whether the account is active or not. | boolean |
None. |
IsBuiltIn | Whether the account is a default one that comes with the subscription or not. | boolean |
None. |
LastUpdatedId | Unique identifier to ensure concurrency issue avoidance when performing updates. | string |
None. |
DefaultTaxCode | The default tax code used for the account. | string |
None. |
LedgerCode | A unique code to identify the account in general ledger. | string |
None. |
Currency | The currency used for the account. | string |
None. |
HeaderAccountId | The Header account for this detail account. | integer |
None. |
ExchangeAccountId | The base currency account for foreign exchange. | integer |
None. |
IsBankAccount | Whether the account is a bank account or not. | boolean |
None. |
CreatedDateUtc | The date and time the account was created. | date |
None. |
LastModifiedDateUtc | The date and time and the account was last modified. | date |
None. |
IncludeInForecaster | Whether to include the account in Forecaster report and data forecasting. | boolean |
None. |
BSB | BSB of the bank. | string |
None. |
Number | The bank account number. | string |
None. |
BankAccountName | The name of the bank account. | string |
None. |
BankFileCreationEnabled | Enables/Disables the ability to upload an ABA file to the account. | boolean |
None. |
BankCode | The Bank code. | string |
None. |
UserNumber | The Bank client user Id. | string |
None. |
MerchantFeeAccountId | The merchant fee account Id. | integer |
None. |
IncludePendingTransactions | (Deprecated) Indicates whether to include pending transactions. | boolean |
None. |
_links | Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. | Collection of Link |
None. |
Request Formats
application/json, text/json
Sample:
{ "Id": 1, "Name": "Test Income Account", "AccountLevel": "Detail", "AccountType": "Income", "IsActive": true, "IsBuiltIn": false, "LastUpdatedId": "AAAAAAA", "DefaultTaxCode": "G1", "LedgerCode": "AA", "Currency": "AUD", "HeaderAccountId": 3, "ExchangeAccountId": 3, "IsBankAccount": false, "CreatedDateUtc": "2024-05-20T19:21:08.6238136Z", "LastModifiedDateUtc": "2024-11-14T19:21:08.6238136Z", "IncludeInForecaster": false, "BSB": null, "Number": null, "BankAccountName": null, "BankFileCreationEnabled": null, "BankCode": null, "UserNumber": null, "MerchantFeeAccountId": null, "IncludePendingTransactions": null, "_links": [] }
application/xml, text/xml
Sample:
<AccountDetail xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <_links /> <Id>1</Id> <Name>Test Income Account</Name> <AccountLevel>Detail</AccountLevel> <AccountType>Income</AccountType> <IsActive>true</IsActive> <IsBuiltIn>false</IsBuiltIn> <LastUpdatedId>AAAAAAA</LastUpdatedId> <DefaultTaxCode>G1</DefaultTaxCode> <LedgerCode>AA</LedgerCode> <Currency>AUD</Currency> <HeaderAccountId>3</HeaderAccountId> <ExchangeAccountId>3</ExchangeAccountId> <IsBankAccount>false</IsBankAccount> <CreatedDateUtc>2024-05-20T19:21:08.6238136Z</CreatedDateUtc> <LastModifiedDateUtc>2024-11-14T19:21:08.6238136Z</LastModifiedDateUtc> <IncludeInForecaster>false</IncludeInForecaster> <BSB xsi:nil="true" /> <Number xsi:nil="true" /> <BankAccountName xsi:nil="true" /> <BankFileCreationEnabled xsi:nil="true" /> <BankCode xsi:nil="true" /> <UserNumber xsi:nil="true" /> <MerchantFeeAccountId xsi:nil="true" /> <IncludePendingTransactions xsi:nil="true" /> </AccountDetail>
Response Information
Resource Description
InsertAccountResultName | Description | Type | Additional information |
---|---|---|---|
InsertedEntityId | The Id/key of the newly created/inserted account. | integer |
None. |
LastUpdatedId | The unique identifier generated as part of the update. This value is required when submitting subsequent update to prevent concurrency errors. | string |
None. |
UtcLastModified | The date and time this resource was modified in UTC. | date |
None. |
_links | Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. | Collection of Link |
None. |
Response Formats
application/json, text/json
Sample:
{ "InsertedEntityId": 321, "LastUpdatedId": "AAAAAKhg=", "UtcLastModified": "2024-11-10T19:21:08.6899241Z", "_links": [ { "rel": "self", "href": "https://api.saasu.com/Account/321?FileId=123", "method": "POST", "title": null }, { "rel": "list", "href": "https://api.saasu.com/Accounts?FileId=123", "method": "GET", "title": null }, { "rel": "update", "href": "https://api.saasu.com/Account/321?FileId=123", "method": "PUT", "title": null }, { "rel": "delete", "href": "https://api.saasu.com/Account/321?FileId=123", "method": "DELETE", "title": null } ] }
application/xml, text/xml
Sample:
<InsertAccountResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <_links> <Link> <rel>self</rel> <href>https://api.saasu.com/Account/321?FileId=123</href> <method>POST</method> </Link> <Link> <rel>list</rel> <href>https://api.saasu.com/Accounts?FileId=123</href> <method>GET</method> </Link> <Link> <rel>update</rel> <href>https://api.saasu.com/Account/321?FileId=123</href> <method>PUT</method> </Link> <Link> <rel>delete</rel> <href>https://api.saasu.com/Account/321?FileId=123</href> <method>DELETE</method> </Link> </_links> <LastUpdatedId>AAAAAKhg=</LastUpdatedId> <UtcLastModified>2024-11-10T19:21:08.6899241Z</UtcLastModified> <InsertedEntityId>321</InsertedEntityId> </InsertAccountResult>