modulepackage
1.0.33
Repository: https://github.com/andmetoo/ozon-api-client.git
Documentation: pkg.go.dev
# README
Ozon Seller API Client
A Ozon Seller API client written in Golang
Ozon is a marketplace for small and medium enterprises to launch and grow their businesses in Russia.
Read full documentation
You can check list of supported endpoints
How to start
API
Get Client-Id and Api-Key in your seller profile here
Just add dependency to your project and you're ready to go.
go get github.com/s1berc0de/ozon-api-client
A simple example on how to use this library:
package main
import (
"fmt"
"log"
"net/http"
"github.com/s1berc0de/ozon-api-client/ozon"
)
func main() {
// Create a client with your Client-Id and Api-Key
// [Documentation]: https://docs.ozon.ru/api/seller/en/#tag/Auth
client := ozon.NewClient("my-client-id", "my-api-key")
// Send request with parameters
resp, err := client.Products().GetProductDetails(&ozon.GetProductDetailsParams{
ProductId: 123456789,
})
if err != nil || resp.StatusCode != http.StatusOK {
log.Fatalf("error when getting product details: %s", err)
}
// Do some stuff
for _, d := range resp.Result.Barcodes {
fmt.Printf("Barcode %s\n", d)
}
}
Notifications
Ozon can send push-notifications to your REST server. There is an implementation of REST server that handles notifications in this library.
How to use:
package main
import (
"log"
"github.com/s1berc0de/ozon-api-client/ozon/notifications"
)
func main() {
// Create server
port := 5000
server := notifications.NewNotificationServer(port)
// Register handlers passing message type and handler itself
server.Register(notifications.ChatClosedType, func(req interface{}) error {
notification := req.(*notifications.ChatClosed)
// Do something with the notification here...
log.Printf("chat %s has been closed\n", notification.ChatId)
return nil
})
// Run server
if err := server.Run(); err != nil {
log.Printf("error while running notification server: %s", err)
}
}
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.
Endpoints
Атрибуты и характеристики Ozon
- /v2/category/tree ✅
- /v1/description-category/attribute/values ✅
- /v3/category/attribute ✅
- /v2/category/attribute/values ✅
Загрузка и обновление товаров
- /v2/product/import ✅
- /v1/product/import/info ✅
- /v1/product/import-by-sku ✅
- /v1/product/attributes/update ✅
- /v1/product/pictures/import ✅
- /v1/product/pictures/info ✅
- /v2/product/list ✅
- /v2/product/info ✅
- /v1/product/rating-by-sku ✅
- /v2/product/info/list ✅
- /v3/products/info/attributes ✅
- /v1/product/info/description ✅
- /v4/product/info/limit ✅
- /v1/product/update/offer-id ✅
- /v1/product/archive ✅
- /v1/product/unarchive ✅
- /v2/products/delete ✅
- /v1/products/geo-restrictions-catalog-by-filter ✅
- /v1/product/upload_digital_codes ✅
- /v1/product/upload_digital_codes/info ✅
- /v1/product/info/subscription ✅
Цены и остатки товаров
- /v1/product/import/stocks ✅
- /v2/products/stocks ✅
- /v3/product/info/stocks ✅
- /v1/product/info/stocks-by-warehouse/fbs ✅
- /v1/product/import/prices ✅
- /v4/product/info/prices ✅
- /v1/product/info/discounted ✅
- /v1/product/update/discount ✅
Акции
- /v1/actions [GET]
- /v1/actions/candidates
- /v1/actions/products
- /v1/actions/products/activate
- /v1/actions/products/deactivate
- /v1/actions/hotsales/list
- /v1/actions/hotsales/products
- /v1/actions/hotsales/activate
- /v1/actions/hotsales/deactivate
- /v1/actions/discounts-task/list
- /v1/actions/discounts-task/approve
- /v1/actions/discounts-task/decline
Стратегии ценообразования
- /v1/pricing-strategy/competitors/list
- /v1/pricing-strategy/list
- /v1/pricing-strategy/create
- /v1/pricing-strategy/info
- /v1/pricing-strategy/update
- /v1/pricing-strategy/products/add
- /v1/pricing-strategy/strategy-ids-by-product-ids
- /v1/pricing-strategy/products/list
- /v1/pricing-strategy/product/info
- /v1/pricing-strategy/products/delete
- /v1/pricing-strategy/status
- /v1/pricing-strategy/delete
Сертификаты брендов
- /v1/brand/company-certification/list
Сертификаты качества
- /v1/product/certificate/accordance-types [GET]
- /v2/product/certificate/accordance-types/list [GET]
- /v1/product/certificate/types
- /v1/product/certification/list
- /v1/product/certificate/create
- /v1/product/certificate/bind
- /v1/product/certificate/delete
- /v1/product/certificate/info
- /v1/product/certificate/list
- /v1/product/certificate/product_status/list
- /v1/product/certificate/products/list
- /v1/product/certificate/unbind
- /v1/product/certificate/rejection_reasons/list
- /v1/product/certificate/status/list
Склады
- /v1/warehouse/list ✅
- /v1/delivery-method/list
Полигоны
- /v1/polygon/create
- /v1/polygon/bind
Схема FBO
- /v2/posting/fbo/list
- /v2/posting/fbo/get
- /v1/supply-order/list
- /v1/supply-order/get
- /v1/supply-order/items
- /v1/supplier/available_warehouses [GET]
Управление кодами маркировки для FBS/rFBS
- /v4/fbs/posting/product/exemplar/validate
- /v4/fbs/posting/product/exemplar/set
- /v4/fbs/posting/product/exemplar/status
- /v4/posting/fbs/ship
Схемы FBS и rFBS
- /v3/posting/fbs/unfulfilled/list
- /v3/posting/fbs/list
- /v3/posting/fbs/get
- /v2/posting/fbs/get-by-barcode
- /v2/posting/fbs/act/get-barcode
- /v2/posting/fbs/act/get-barcode/text
- /v2/posting/fbs/product/country/list
- /v2/posting/fbs/product/country/set
- /v3/posting/multiboxqty/set
- /v1/posting/fbs/restrictions
- /v3/posting/fbs/ship
- /v3/posting/fbs/ship/package
- /v2/posting/fbs/act/create
- /v2/posting/fbs/act/check-status
- /v1/posting/carriage-available/list
- /v2/posting/fbs/act/get-pdf
- /v2/posting/fbs/digital/act/check-status
- /v2/posting/fbs/digital/act/get-pdf
- /v2/posting/fbs/package-label
- /v1/posting/fbs/package-label/create
- /v1/posting/fbs/package-label/get
- /v2/posting/fbs/act/get-container-labels
- /v2/posting/fbs/arbitration
- /v2/posting/fbs/awaiting-delivery
- /v1/posting/fbs/cancel-reason
- /v2/posting/fbs/cancel-reason/list
- /v2/posting/fbs/cancel
- /v2/posting/fbs/product/change
- /v2/posting/fbs/product/cancel
- /v2/posting/fbs/act/list
- /v2/posting/fbs/digital/act/document-sign
- /v2/posting/fbs/act/get-postings
- /v2/fbs/posting/delivering
- /v2/fbs/posting/tracking-number/set
- /v2/fbs/posting/last-mile
- /v2/fbs/posting/delivered
- /v2/fbs/posting/sent-by-seller
- /v1/posting/fbs/timeslot/change-restrictions
- /v1/posting/fbs/timeslot/set
- /v1/posting/global/etgb
Возвраты товаров
- /v3/returns/company/fbo
- /v3/returns/company/fbs
Отмены заказов
- /v1/conditional-cancellation/get
- /v1/conditional-cancellation/list
- /v1/conditional-cancellation/approve
- /v1/conditional-cancellation/reject
Чаты с покупателями
- /v2/chat/list
- /v1/chat/send/message
- /v1/chat/send/file
- /v2/chat/history
- /v1/chat/updates
- /v1/chat/start
- /v2/chat/read
Накладные
- /v1/invoice/create-or-update
- /v1/invoice/get
- /v1/invoice/delete
Отчёты
- /v1/report/info
- /v1/report/list
- /v1/report/products/create
- /v1/report/stock/create
- /v1/report/products/movement/create
- /v1/report/returns/create
- /v1/report/postings/create
- /v1/finance/cash-flow-statement/list
- /v1/report/discounted/create
- /v1/report/discounted/info
- /v1/report/discounted/list
Аналитические отчёты
- /v1/analytics/data
- /v2/analytics/stock_on_warehouses
Финансовые отчёты
- /v1/finance/realization
- /v3/finance/transaction/list
- /v3/finance/transaction/totals
Рейтинг продавца
- /v1/rating/summary ✅
- /v1/rating/history ✅
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author