Function: CreateOrUpdateGLAccounts
The CreateOrUpdateGLAccounts function creates, updates or closes GL A general ledger (GL) is used for recording transactions related to business assets, liabilities, equity, revenue and expenses. accounts.
GL accounts are synchronized from the ERP to Tipalti.
- Updating a GL account updates all bills assigned to the account.
- If you update an account that is currently closed, the account will be reactivated and updated as specified.
- If you update an account that does not currently exist, then one will be created.
- If you close an account that does not currently exist, an account will be created and closed.
- If the GL account is assigned to outstanding unpaid bills, the "Close" action will be rejected.
- Closed GL accounts become "inactive" in Tipalti.
If a GL account that is already assigned to a bill becomes inactive, and the bill:
- Has been approved already (i.e., bill status = "Pending payment" or later), the bill is not affected
- Is in the approval process (i.e., bill status = "Pending approval", "Pending payee approval" or "Pending payee invoice"), the bill is sent automatically back to AP so that a new GL account can be assigned to the bill
- EAT Encryption Additional Terms parameter: None
- API version: V7
The following is a sample SOAP 1.2 request and response. In the request, you need to replace the data types in yellow with actual values.
SOAP 1.2: Request
POST /v7/payerfunctions.asmx HTTP/1.1
Host: api.tipalti.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateOrUpdateGLAccounts xmlns="http://Tipalti.org/">
<payerName>string</payerName>
<timestamp>double</timestamp>
<key>string</key>
<glAccounts>
<UpdateGLAccountRequest>
<TipaltiGLAccount>
<Name>string</Name>
<Number>integer</Number>
<AccountExternalId>string</AccountExternalId>
<Description>string</Description>
<MiscBox1099>string</MiscBox1099>
<Type>string</Type>
<Currency>string</Currency>
</TipaltiGLAccount>
<Action>string</Action>
<EntityName>string</EntityName>
</UpdateGLAccountRequest>
<UpdateGLAccountRequest>
<TipaltiGLAccount>
<Name>string</Name>
<Number>integer</Number>
<AccountExternalId>string</AccountExternalId>
<Description>string</Description>
<MiscBox1099>string</MiscBox1099>
<Type>string</Type>
<Currency>string</Currency>
</TipaltiGLAccount>
<Action>string</Action>
<EntityName>string</EntityName>
</UpdateGLAccountRequest>
</glAccounts>
</CreateOrUpdateGLAccounts>
</soap12:Body>
</soap12:Envelope>
SOAP 1.2: Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateOrUpdateGLAccountsResponse xmlns="http://Tipalti.org/">
<CreateOrUpdateGLAccountsResult>
<errorMessage>string</errorMessage>
<errorCode>string</errorCode>
<b>boolean</b>
<i>integer</i>
<d>double</d>
<s>string</s>
</CreateOrUpdateGLAccountsResult>
</CreateOrUpdateGLAccountsResponse>
</soap12:Body>
</soap12:Envelope>
Request parameters
element |
description |
limitation |
Mandatory? |
data type |
---|---|---|---|---|
payerName | The name of the payer, as assigned by Tipalti |
|
Mandatory | string |
timestamp |
Current time (UTC) when the request is sent |
Unix time | Mandatory | double |
key | Encryption key | Mandatory | string | |
glAccounts |
|
Mandatory | Array of UpdateGLAccount Request (extension of type TipaltiGLAccount) |
UpdateGLAccountRequest
element |
description |
limitations |
Mandatory? |
data type |
---|---|---|---|---|
TipaltiGLAccount | GL account information | Optional | Array of TipaltiGLAccount | |
Action |
|
Valid values:
|
Optional | string |
EntityName | The payer entity linked to the GL account |
|
Optional | string |
TipaltiGLAccount
element |
Description |
Limitation |
Mandatory? |
Data Type |
---|---|---|---|---|
Name | The name of the GL account | Max. length = 450 | Mandatory | string |
Number |
|
Max. length = 450 | Optional | integer |
ExternalId | An ID that uniquely identifies the GL account (e.g., in NetSuite, it is the "Internal ID") | Max. length = 100 | Mandatory | string |
Description | A description of the GL account | Max. length = 450 | Optional | string |
MiscBox1099 |
|
Valid values for expense accounts:
Note: The values above apply to the "New IRS format (2020 and onwards)". Click here to see the "Old IRS format (pre-2020)". |
Optional | string |
Type | The type of GL account |
Valid values:
|
Optional | string |
Currency | The currency of the GL account | Length = 3 (per ISO 4217) | Optional | string |
Response parameters
element |
description |
data type |
---|---|---|
CreateOrUpdateGL AccountsResult |
Contains the response parameters | TipaltiResponse |
TipaltiResponse
element |
description |
Limitation |
data type |
---|---|---|---|
errorMessage | A description of the error | See API error codes. | string |
errorCode | The status of the error | See API error codes. | string |
b | If the return code is Boolean, this parameter will carry the value. | boolean | |
i | If the return code is integer, this parameter will carry the value. | integer | |
d | If the return code is double, this parameter will carry the value. | double | |
s | If the return code is string, this parameter will carry the value. | string |