Skip to content

ghost-gopher/ozon-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ozon Common API

Functional includes:

  • Seller API - for manage products, reports, sell strategies, warehouses more details here.
  • Performance API - planning to do

How to start

Seller API

Get Client-Id and Api-Key in your seller profile here

for begin add dependency to your project and ready done.

go get github.com/ghost-gopher/ozon-api

A simple example on how to use this library:

package main

import (
	"context"
	"github.com/ghost-gopher/ozon-api/internal/seller"
	"github.com/ghost-gopher/ozon-api/internal/seller/product"
	"log"
)

const (
	ApiKey   = "-"
	ClientId = "-"
)

func main() {
	ctx := context.Background()
	slr, _ := seller.New(ApiKey, ClientId)

	pdt, err := slr.Product().Info(ctx, product.InfoProperty{
		Sku: 123456789,
	})
	if err != nil {
		log.Fatalf("error %s", err.Error())
	}

	if pdt.Id > 0 {
		log.Printf("product_id: %d, product_name: %s", pdt.Id, pdt.Name)
	} else {
		log.Printf("products list empty")
	}
}

Contribution

If you need some endpoints ASAP, create an issue and list all the endpoints. I will add them to library soon.

Or you can implement them and contribute to the project. Contribution to the project is welcome.

About

Client library in Golang for Ozon Common API, included here interfaces: Seller API and Performance API.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages