Skip to content
This repository was archived by the owner on Sep 23, 2026. It is now read-only.

About

Standalone Go HTTP client for the Shopware Admin API: OAuth (integration + password grants), DAL Criteria builder, typed EntityRepository, typed aggregations.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-shopware-http-client

CI Go Reference

A standalone Go client for the Shopware Admin API, with a typed Data Abstraction Layer (DAL) on top.

It is self-contained — outside the standard library (which provides the uuid package) it depends only on golang.org/x/sync and github.com/shyim/go-version. Everything application-specific (HTTP transport, instrumentation, SSRF protection, extra headers, token persistence) is injected rather than imported, so the package can be vendored or split into its own module without dragging the rest of an application along.

import "github.com/shopwareLabs/go-shopware-http-client"

The import path ends in go-shopware-http-client, but the package is named shopware, so it is used as shopware.NewClient(...).

Quick start

ctx := context.Background()

client := shopware.NewClient(shopware.Config{
	BaseURL:     "https://my-shop.example.com",
	Credentials: shopware.NewIntegrationCredentials("CLIENT_ID", "CLIENT_SECRET"),
})

type Product struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

products := shopware.NewRepository[Product](client, "product")

result, err := products.Search(ctx,
	shopware.NewCriteria().
		SetLimit(10).
		AddFilter(shopware.Equals("active", true)),
)
if err != nil {
	panic(err)
}

fmt.Printf("found %d products\n", result.Total)
for _, p := range result.Data {
	fmt.Println(p.ID, p.Name)
}

The client authenticates lazily on the first request, caches the OAuth token, and refreshes it transparently — you never manage tokens by hand.

Documentation

Full guides live in docs/:

Runnable, compile-checked snippets are in example_test.go. A full PKCE browser-login CLI demo lives in examples/pkce-cli.

About

Standalone Go HTTP client for the Shopware Admin API: OAuth (integration + password grants), DAL Criteria builder, typed EntityRepository, typed aggregations.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages