go - v0.27.1 - 2026-03-23 09:33:15
Go SDK v0.27.1 Changelog
Release Date: March 2026
What's New
This release adds new fields for employee bank accounts and tax types on journal entry line items, giving you more granular control over accounting journal entries. It also includes a breaking change to the JournalEntryLineItem.Type field, which is now a pointer type to better represent optional values. If you set or compare the Type field on journal entry line items, you will need to update your code. Internal improvements to pagination and retry logic make the SDK more resilient to transient network errors.
Summary of Changes
| Category | Description | Action Required |
|---|---|---|
| Breaking | JournalEntryLineItem.Type changed from value to pointer (*JournalEntryLineItemType) |
Yes -- update struct initialization and comparisons |
| Breaking | JournalEntryLineItemInput.Type changed from value to pointer (*JournalEntryLineItemType) |
Yes -- update struct initialization and comparisons |
| New Feature | BankAccount field added to AccountingEmployee and AccountingEmployeeInput |
No -- optional field |
| New Feature | TaxType field added to JournalEntryLineItem and JournalEntryLineItemInput |
No -- optional field |
| New Feature | Employee field added to JournalEntryLineItem and JournalEntryLineItemInput |
No -- optional field |
| New Model | LinkedEmployee model added |
No |
| New Enum | TaxType enum added (Sales, Purchase) |
No |
| New Enum Value | Employee added to LinkedFinancialAccountAccountType |
No |
| Deprecation | JournalEntry.TaxType deprecated in favor of line-item level TaxType |
Migrate when convenient |
| Internal | Pagination refactored, retry logic improved with proper syscall error detection |
No |
Detailed Changes by API
Accounting API
JournalEntryLineItem.Type changed to pointer type
What changed: The Type field on JournalEntryLineItem and JournalEntryLineItemInput changed from a value type (JournalEntryLineItemType) to a pointer type (*JournalEntryLineItemType). The corresponding GetType() method now returns *JournalEntryLineItemType instead of JournalEntryLineItemType.
Impact: Any code that initializes or compares the Type field must be updated. This is a compile-time error, so your build will catch it immediately.
Before (v0.27.0):
import "github.com/apideck-libraries/sdk-go/models/components"
// Struct initialization
lineItem := components.JournalEntryLineItem{
Type: components.JournalEntryLineItemTypeDebit,
TotalAmount: sdkgo.Float64(1000.00),
}
// Comparison
if item.GetType() == components.JournalEntryLineItemTypeDebit {
// handle debit
}After (v0.27.1):
import "github.com/apideck-libraries/sdk-go/models/components"
// Option A: Use the .ToPointer() helper
lineItem := components.JournalEntryLineItem{
Type: components.JournalEntryLineItemTypeDebit.ToPointer(),
TotalAmount: sdkgo.Float64(1000.00),
}
// Option B: Use the address-of operator
debitType := components.JournalEntryLineItemTypeDebit
lineItem := components.JournalEntryLineItem{
Type: &debitType,
TotalAmount: sdkgo.Float64(1000.00),
}
// Comparison -- dereference the pointer (nil-check first if the field may be unset)
if item.GetType() != nil && *item.GetType() == components.JournalEntryLineItemTypeDebit {
// handle debit
}The same change applies to JournalEntryLineItemInput:
// Before
input := components.JournalEntryLineItemInput{
Type: components.JournalEntryLineItemTypeCredit,
}
// After
input := components.JournalEntryLineItemInput{
Type: components.JournalEntryLineItemTypeCredit.ToPointer(),
}New BankAccount field on AccountingEmployee
What changed: A new optional BankAccount field is available on AccountingEmployee and AccountingEmployeeInput, allowing you to read and write employee bank account details.
Impact: Non-breaking. The field is optional and defaults to nil.
employee := components.AccountingEmployeeInput{
FirstName: sdkgo.String("Jane"),
LastName: sdkgo.String("Doe"),
BankAccount: &components.BankAccount{
AccountNumber: sdkgo.String("1234567890"),
RoutingNumber: sdkgo.String("021000021"),
},
}New TaxType and Employee fields on JournalEntryLineItem
What changed: Two new optional fields are available on JournalEntryLineItem and JournalEntryLineItemInput:
TaxType-- a newTaxTypeenum with valuesSalesandPurchase, indicating the tax classification of the line item.Employee-- aLinkedEmployeereference, allowing you to associate an employee with a specific line item.
Impact: Non-breaking. Both fields are optional and default to nil. The top-level JournalEntry.TaxType field is now deprecated -- you should set TaxType at the line-item level instead.
lineItem := components.JournalEntryLineItem{
Type: components.JournalEntryLineItemTypeDebit.ToPointer(),
TotalAmount: sdkgo.Float64(500.00),
TaxType: components.TaxTypeSales.ToPointer(),
Employee: &components.LinkedEmployee{
ID: sdkgo.String("emp_12345"),
},
}New Employee value in LinkedFinancialAccountAccountType
What changed: The LinkedFinancialAccountAccountType enum now includes an Employee value.
Impact: Non-breaking. If you use exhaustive switch statements over this enum, add a case for the new value.
switch accountType {
case components.LinkedFinancialAccountAccountTypeBank:
// ...
case components.LinkedFinancialAccountAccountTypeEmployee:
// new -- handle employee accounts
default:
// ...
}JournalEntry.TaxType deprecated
What changed: The top-level TaxType field on JournalEntry is deprecated. Tax type should now be specified per line item using the new JournalEntryLineItem.TaxType field.
Impact: Existing code will continue to compile and work, but you should migrate to the line-item level field to ensure forward compatibility.
Internal Improvements
Pagination and retry logic
What changed: Pagination handling has been refactored for consistency across all list endpoints. The retry logic now correctly detects transient syscall errors (e.g., ECONNRESET, EPIPE) and retries them automatically.
Impact: No code changes required. You may notice improved reliability when making requests over unstable network connections.
Migration Checklist
- Search your codebase for
JournalEntryLineItemTypeusage -- update struct initialization to use.ToPointer()or& - Search for
GetType()calls onJournalEntryLineItem-- add nil checks and dereference the pointer - Search for
JournalEntryLineItemInputstruct literals -- updateTypefield the same way - Review any exhaustive switch statements on
LinkedFinancialAccountAccountType-- add a case forEmployee - If using
JournalEntry.TaxType, plan migration toJournalEntryLineItem.TaxType - Run
go build ./...to catch any remaining compile-time errors from the pointer change - Run your test suite to verify behavior is correct after migration