Skip to content

invopop/client.go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Invopop Go Client

The official Invopop API Go Client Library.

Usage

Start using the Invopop Client in your project by importing the library and initializing the client:

import (
    "context"
    "os"

    "github.com/invopop/client.go/invopop"
)

func main() {
    ctx := context.Background()
    token, _ := os.Getenv("INVOPOP_TOKEN")
    ic := invopop.New()
    ic.SetAuthToken(token)

    p := new(invopop.Ping)
    if err := ic.Utils().Ping(ctx, p); err != nil {
        panic(err.Error())
    }
    fmt.Printf("%v\n", p)
}

The Invopop API is split into individual namespaces, these are:

  • Utils - for ensuring you can connect correctly with the Invopop servers and your credentials are correct.
  • Sequence - used for generating sequential numbers or codes called Series.
  • Transform - used to configure Integrations and Workflows that will be requested to be used when processing Jobs.
  • Silo - for storing GOBL envelopes ready to send to integrations via jobs whose output may be stored as attachments.
  • Access - mostly used by apps to get access tokens and manage enrollment data.