API

Finance APIs

POST finance/general-ledger-default-accounts/{generalLedgerDefaultAccountId}/assignments

Resource for creating new general ledger account assignment

HTTP method POST
URI https://api.rambase.net/finance/general-ledger-default-accounts/{generalLedgerDefaultAccountId}/assignments
Supported formats Xml, Html, Json (ex. $format=json)
- URI parameter {generalLedgerDefaultAccountId} General ledger default account identifier
Integer, minimum 100000
Successful HTTP status code 201
API resource identifier 3909, version 3

The following body must be added to the request. Mouse over fieldnames for description and other useful information about the fields. Note that fields in bold are required/mandatory.

Format:
1
<GeneralLedgerAccountAssignment>
2
     <GeneralLedgerAccount>
3
          <GeneralLedgerAccountId
GeneralLedgerAccountId

Required/mandatory field

General ledger account identifier

Minimum value: 1000

>
{Integer}</GeneralLedgerAccountId>
4
     </GeneralLedgerAccount>
5
     <Country>
6
          <CountryCode
CountryCode

Required/mandatory field

Country code of the company

>
{String}</CountryCode>
7
     </Country>
8
</GeneralLedgerAccountAssignment>
1
{
2
     "generalLedgerAccountAssignment": {
3
          "generalLedgerAccount": {
4
               "generalLedgerAccountId
GeneralLedgerAccountId

Required/mandatory field

General ledger account identifier

Minimum value: 1000

":
"{Integer}"
5
          },
6
          "country": {
7
               "countryCode
CountryCode

Required/mandatory field

Country code of the company

":
"{String}"
8
          }
9
     }
10
}

The query string is placed after the resource URL, seperated with a questionmark (?). The query string is composed of a series of query parameters with values. See the page about query parameters on how to use these parameters.

$access_token String, optional After successful login you get an access token which needs to be provided in all API requests. Even though it is possible to pass this token as query parameter, we recommended passing it using the HTTP request header as described in Authorization. Note that all access tokens have an expiration time.
$db String, optional Set the database/company for the request
$useMinimumVersion Integer, optional Used to run a new version of an API resource when your API client is running a deprecated API resource. See the Breaking changes page for more information.
$showDomainDescriptions Boolean, optional Set to "true" to include domain descriptions for fields using domain values. See the Domain values page for more information. Default value is false.
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]

Read more about filters and sorting on how to use filter parameters and named filters.

Read more about filters and sorting on how to use sortable parameters

Requesting this resource will yield the following response. Mouse over fieldnames (or fieldgroups) for descriptions and other useful information about the fields.

Please note that some fields may be removed from the response, based on user roles/duties/permissions.

Format:
1
<GeneralLedgerAccountAssignment>
2
     <GeneralLedgerAccountAssignmentId
GeneralLedgerAccountAssignmentId

General ledger account assignment identifier

>
{Integer}</GeneralLedgerAccountAssignmentId>
3
     <Status
Status

Status of general ledger default account assignment

Possible domain values can be found here

>
{Integer}</Status>
4
     <GeneralLedgerAccount>
5
          <GeneralLedgerAccountId
GeneralLedgerAccountId

General ledger account identifier

>
{Integer}</GeneralLedgerAccountId>
6
          <AccountNumber
AccountNumber

The account number of the general ledger account

>
{String}</AccountNumber>
7
          <Name
Name

Name of general ledger account

>
{String}</Name>
8
          <GeneralLedgerAccountLink
GeneralLedgerAccountLink

General ledger account reference

>
{String}</GeneralLedgerAccountLink>
9
     </GeneralLedgerAccount>
10
     <Country>
11
          <CountryId
CountryId

Country identifier

>
{Integer}</CountryId>
12
          <Name
Name

Name of country

>
{String}</Name>
13
          <CountryCode
CountryCode

Country code of the company

>
{String}</CountryCode>
14
          <CountryLink
CountryLink

Country reference

>
{String}</CountryLink>
15
     </Country>
16
</GeneralLedgerAccountAssignment>
1
{
2
     "generalLedgerAccountAssignment": {
3
          "generalLedgerAccountAssignmentId
GeneralLedgerAccountAssignmentId

General ledger account assignment identifier

":
"{Integer}",
4
          "status
Status

Status of general ledger default account assignment

Possible domain values can be found here

":
"{Integer}",
5
          "generalLedgerAccount": {
6
               "generalLedgerAccountId
GeneralLedgerAccountId

General ledger account identifier

":
"{Integer}",
7
               "accountNumber
AccountNumber

The account number of the general ledger account

":
"{String}",
8
               "name
Name

Name of general ledger account

":
"{String}",
9
               "generalLedgerAccountLink
GeneralLedgerAccountLink

General ledger account reference

":
"{String}"
10
          },
11
          "country": {
12
               "countryId
CountryId

Country identifier

":
"{Integer}",
13
               "name
Name

Name of country

":
"{String}",
14
               "countryCode
CountryCode

Country code of the company

":
"{String}",
15
               "countryLink
CountryLink

Country reference

":
"{String}"
16
          }
17
     }
18
}

List of available operations/actions for this resource.
See the operations documentation for more information about API operations.

Possible error codes the response might return:

Error 101015 HTTP 404 Permission not found
Error 101420 HTTP 404 Setting definition not found
Error 104469 HTTP 400 You cannot change the forward option to NO, FAR documents exists!
Error 103702 HTTP 400 From period is not valid. General ledger postings exists.
Error 103703 HTTP 400 To period is not valid. General ledger postings exists.
Error 104702 HTTP 400 You cannot change posting type of a processed (status 9) general ledger account
Error 105056 HTTP 400 You cannot change account type. General ledger postings exists.
Error 105087 HTTP 400 You cannot change the blocking attributes for an off-balance account.
Error 105176 HTTP 400 Child account exists, the account cannot be changed to an non control account.
Error 105177 HTTP 400 You cannot change to a control account. General ledger postings exists.
Error 106939 HTTP 400 Cannot set parent account to the same account
Error 105179 HTTP 400 Only control accounts are allowed as parent account.