Skip to content

Releases: merge-api/merge-go-client

v2.0.0

01 Jul 00:48
ac6a825
Compare
Choose a tag to compare

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 using option.WithBaseURL, selecting from the environments defined in environments.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

19 Feb 03:35
ce24dce
Compare
Choose a tag to compare

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

23 Jan 17:45
f7640a2
Compare
Choose a tag to compare

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

26 Jul 19:41
e6a7564
Compare
Choose a tag to compare

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

22 May 15:57
f4bf3f8
Compare
Choose a tag to compare

Note that changes in this release impact all categories!

  • Addition of coverage field on the RemoteFieldAPI object
  • Addition of integration_specific_config field on the EndUserDetailsRequest 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

22 Apr 04:44
747706b
Compare
Choose a tag to compare

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 on File
    • Better inline examples and model examples

v1.0.6

25 Feb 19:45
2a582a8
Compare
Choose a tag to compare

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 the AccountIntegration model with the new and more accurate category_beta_status field.
    • [HRIS] Addition of the ended_after, ended_before, started_after, and started_before query parameters on the /time-off endpoint
    • [File Storage] We fix typing on the PermissionRequest model
    • Better inline examples

v1.0.5

22 Jan 22:25
defb9e3
Compare
Choose a tag to compare

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

09 Jan 00:59
4d5f417
Compare
Choose a tag to compare

Note: this release impacts the Accounting, ATS, CRM, and Ticketing categories

  • For these categories, we fix the typing of the RemoteData object, specifically the data field. The typing is updated from being a list of the RemoteData object to a list of any types.

v1.0.3

04 Jan 20:17
a9b2290
Compare
Choose a tag to compare

Note: This change is to roll back a bug in the SDK generator. There should be no impact on usage of the SDK or the models/fields available otherwise.

  • Fix incorrect API endpoint paths bug in the Go generator