Releases: merge-api/merge-go-client
Releases · merge-api/merge-go-client
v2.0.0
Merge Go SDK Release Notes - Version [2.0.0]
This release includes support for all of the latest updates as of June 10th to the Merge API. For more information, see https://www.merge.dev/changelog/week-2-june-2025
Breaking Changes:
- Client initialization:
You must now explicitly set the base URL usingoption.WithBaseURL
, selecting from the environments defined inenvironments.go
. Here's an example below:
Production: "https://api.merge.dev/api",
ProductionEu: "https://api-eu.merge.dev/api",
import (
"context"
"fmt"
"log"
merge "github.com/merge-api/merge-go-client/v2"
mergeclient "github.com/merge-api/merge-go-client/v2/client"
"github.com/merge-api/merge-go-client/v2/option"
)
token := merge.String("Your account token")
client := mergeclient.NewClient(
option.WithApiKey("Your API key"),
option.WithAccountToken(token),
option.WithBaseURL(merge.Environments.Production),
)
- Expand Query Params:
Previously a comma separated string was used for multiple enums. Now users will pass in a list of enums, then the SDK will pass them into the request correctly. Here's an example below:
import (
"context"
"fmt"
"log"
merge "github.com/merge-api/merge-go-client/v2"
mergeclient "github.com/merge-api/merge-go-client/v2/client"
"github.com/merge-api/merge-go-client/v2/accounting"
"github.com/merge-api/merge-go-client/v2/option"
)
token := merge.String("Your account token")
client := mergeclient.NewClient(
option.WithApiKey("Your API key"),
option.WithAccountToken(token),
option.WithBaseURL(merge.Environments.Production),
)
expandFields := []*accounting.InvoicesListRequestExpandItem{
accounting.InvoicesListRequestExpandItemEmployee.Ptr(),
accounting.InvoicesListRequestExpandItemAccountingPeriod.Ptr(),
accounting.InvoicesListRequestExpandItemAppliedPayments.Ptr(),
}
req := &accounting.InvoicesListRequest{
Expand: expandFields,
}
// paginate the response
ctx := context.TODO()
page, err := client.Accounting.Invoices.List(ctx, req)
if err != nil {
log.Fatalf("failed to list invoices: %v", err)
}
total := 0
for page != nil {
fmt.Printf("Received %d invoices\n", len(page.Results))
for _, invoice := range page.Results {
fmt.Printf("Invoice ID: %v\n", invoice.Id)
total++
}
// Try to get the next page
nextPage, err := page.GetNextPage(ctx)
if err != nil {
// If it's core.ErrNoPages, we're done
break
}
page = nextPage
}
v1.1.1
Note: This release impacts ONLY ticketing, accounting, and crm categories.
- Update typing for remote_fields request types for POST remote_fields as a part of other models.
- Allow the tracking_categories field on the line_items sub-model of general_ledger_transactions to be returned as UUID strings OR tracking_category models.
v1.1.0
This release impacts all categories.
- Updated descriptions and code snippets
- Add query parameters for multiple Common Model endpoints
- async POST request support
- [accounting] add GeneralLedgerTransactions
- [accounting] add BankFeeds and BankFeedTransactions
- updated RemoteData and RemoteFields objects to allow for better handling
v1.0.9
Note: This change impacts all categories.
- Sync the SDKs with the latest updates to the Merge API.
- New common models, query parameters, and fields
- [CRM + Ticketing] Improved typing on the RemoteFields object
value
field to avoid breakage when returning variable types. - Improvements to developer experience
v1.0.8
Note that changes in this release impact all categories!
- Addition of
coverage
field on theRemoteFieldAPI
object - Addition of
integration_specific_config
field on theEndUserDetailsRequest
object - Updated field and model descriptions
CRM
- Fix bug in the CRMAccountRequest object where the
Address
object field was missing.
Ticketing
- Add new endpoints POST Contact and POST Contact Meta
v1.0.7
Note: The changes in this release impact all categories.
- We sync the SDK with the latest improvements to the Merge API
- [Accounting] PATCH Invoices added
- [Accounting] PATCH Payments added
- [ATS] GET Job Postings added
- [FILE] added
mime_type
as a query parameter onFile
- Better inline examples and model examples
v1.0.6
Note: The changes in this release impact all categories.
- We sync the SDK with the latest improvements to the Merge API
- Addition of the Field Mappings API
- Addition of the Scopes manipulation API (both Organization-wide and Linked Account-wide)
- Replacing the old
is_in_beta
field on theAccountIntegration
model with the new and more accuratecategory_beta_status
field. - [HRIS] Addition of the
ended_after
,ended_before
,started_after
, andstarted_before
query parameters on the/time-off
endpoint - [File Storage] We fix typing on the
PermissionRequest
model - Better inline examples
v1.0.5
Note: This release has breaking changes to the Go SDK. The changes are highlighted below to make the update as seamless as possible.
- An open bug with passthrough Enums not being returned is resolved in this release. Now if you have a field that isn't normalized to one of the predefined Enum values, it will just return the original string value as direct calls to the API do.
- Function paths change in this release.
Before:
client.Hris().Groups().List(...)
After:
client.Hris.Groups.List(...)
- Some option names have changed in this release:
Before:
.ClientWithBaseURL(...)
.ClientWithAuthApiKey(...)
.ClientWithHeaderAccountToken(...)
After:
.WithBaseURL(...)
.WithApiKey(...)
.WithAccountToken(...)
- Remaining changes are developer quality of life improvements.
v1.0.4
Note: this release impacts the Accounting, ATS, CRM, and Ticketing categories
- For these categories, we fix the typing of the
RemoteData
object, specifically thedata
field. The typing is updated from being a list of theRemoteData
object to a list ofany
types.