Skip to main content

Go SDK for Bolivia’s SIAT

A production-ready Go SDK for integrating with the Sistema de Facturación (SIAT) web services

Key Features

Code Management

Request CUIS and CUFD codes for system initialization and daily operations

Invoice Processing

Submit and manage electronic invoices with XML signing and compression

Catalog Sync

Synchronize activities, parameters, and product catalogs from SIAT

Point of Sale

Register and manage point of sale operations and significant events

Quick Example

Get started with go-siat in just a few lines of code:
main.go
package main

import (
    "context"
    "log"
    "github.com/ron86i/go-siat"
    "github.com/ron86i/go-siat/pkg/config"
    "github.com/ron86i/go-siat/pkg/models"
)

func main() {
    // Initialize the SDK
    s, err := siat.New("https://pilotosiatservicios.impuestos.gob.bo/v2", nil)
    if err != nil {
        log.Fatal(err)
    }

    // Create a CUIS request using the builder pattern
    req := models.Codigos.NewCuisRequest().
        WithNit(123456789).
        WithCodigoAmbiente(2).
        WithCodigoSistema("ABC123XYZ").
        Build()

    // Execute the operation
    ctx := context.Background()
    cfg := config.Config{Token: "YOUR_API_TOKEN"}
    
    resp, err := s.Codigos.SolicitudCuis(ctx, cfg, req)
    if err == nil {
        log.Println("CUIS:", resp.Body.Content.RespuestaCuis.Codigo)
    }
}

Why go-siat?

Type-Safe

Builder pattern API ensures compile-time safety and reduces runtime errors

Production Ready

Battle-tested implementation with comprehensive error handling

Complete Coverage

Supports all major SIAT operations including codes, invoicing, and catalogs

XML Signing

Built-in XML digital signature support for secure invoice submission

Easy to Use

Intuitive API design with clear documentation and examples

MIT Licensed

Free and open source under the permissive MIT license

Next Steps

Installation

Install go-siat in your Go project

Quickstart Guide

Build your first SIAT integration

Core Concepts

Learn about the SDK architecture

API Reference

Explore the complete API documentation

Build docs developers (and LLMs) love