Versions in this module Expand all Collapse all v1 v1.1.0 Nov 7, 2026 Changes in this version + var ErrPageLimit = errors.New("page limit reached") + type AsyncJob struct + ID string + Results json.RawMessage + Status AsyncJobStatus + type AsyncJobStatus string + const AsyncJobCompleted + const AsyncJobFailed + const AsyncJobPending + type Balance struct + Free *Decimal + Locked *Decimal + Plus *Decimal + type CatalogCategory struct + Children []int64 + Count *int64 + ID int64 + Name string + type CatalogCategoryPage struct + Categories []CatalogCategory + type CatalogProduct struct + AddInfo *string + AgentFee *string + BadResponses int64 + Currency string + GoodResponses int64 + HasDiscount *bool + ID int64 + InStock int64 + Info string + Name string + NumInStock int64 + OptionCount int64 + Price string + PriceEUR Decimal + PriceRUR Decimal + PriceUAH *Decimal + PriceUSD Decimal + ReturnCount int64 + Sale SaleInfo + SellCount int64 + Visible int64 + type CatalogProductPage struct + Count int64 + HasNextPage bool + HasPreviousPage bool + Page int64 + Products []CatalogProduct + TotalCount int64 + TotalPages int64 type Chat + LastMessageAt string type Client + func (c *Client) ActivateOffers(ctx context.Context, offerIDs []int64) (Job, error) + func (c *Client) ArchiveOfferOptions(ctx context.Context, offerID int64, body OptionArchive) (Job, error) + func (c *Client) ArchiveOfferProducts(ctx context.Context, offerID int64, body ProductArchive) (Job, error) + func (c *Client) ArchiveOfferVariants(ctx context.Context, offerID, optionID int64, body VariantArchive) (Job, error) + func (c *Client) ArchiveSplittedProducts(ctx context.Context, offerID, variantID int64, body ProductArchive) (Job, error) + func (c *Client) CreateOfferOptions(ctx context.Context, offerID int64, options []OfferOptionWrite) ([]OfferOption, error) + func (c *Client) CreateOfferProducts(ctx context.Context, offerID int64, products []OfferProductInput) error + func (c *Client) CreateSplittedProducts(ctx context.Context, offerID, variantID int64, products []OfferProductInput) error + func (c *Client) DeleteOffers(ctx context.Context, offerIDs []int64) (Job, error) + func (c *Client) GetAsyncJob(ctx context.Context, jobID string) (AsyncJob, error) + func (c *Client) GetBalance(ctx context.Context) (Balance, error) + func (c *Client) GetCatalogProduct(ctx context.Context, productID string) (ProductCard, error) + func (c *Client) GetOfferOption(ctx context.Context, offerID, optionID int64) (OfferOption, error) + func (c *Client) GetProductTask(ctx context.Context, taskID string) (ProductTask, error) + func (c *Client) ListCatalogCategories(ctx context.Context, params ListCatalogCategoriesParams) (CatalogCategoryPage, error) + func (c *Client) ListCatalogProducts(ctx context.Context, params ListCatalogProductsParams) (CatalogProductPage, error) + func (c *Client) ListLastSales(ctx context.Context, params ListLastSalesParams) ([]LastSale, error) + func (c *Client) ListOfferOptions(ctx context.Context, offerID int64) (OfferOptionPage, error) + func (c *Client) ListOfferProducts(ctx context.Context, offerID int64, params ListOfferProductsParams) (OfferProductPage, error) + func (c *Client) ListReceipts(ctx context.Context, params ListReceiptsParams) (ReceiptPage, error) + func (c *Client) ListReviews(ctx context.Context, params ListReviewsParams) (ReviewPage, error) + func (c *Client) ListSellerGoods(ctx context.Context, query SellerGoodsQuery) (SellerGoods, error) + func (c *Client) ListSplittedProducts(ctx context.Context, offerID, variantID int64, params ListOfferProductsParams) (OfferProductPage, error) + func (c *Client) PauseOffers(ctx context.Context, offerIDs []int64) (Job, error) + func (c *Client) UpdateOfferOptionVisibility(ctx context.Context, offerID int64, options []OptionVisibility) ([]OfferOption, error) + func (c *Client) UpdateOfferVariantVisibility(ctx context.Context, offerID, optionID int64, variants []VariantVisibility) ([]OfferVariant, error) + func (c *Client) UpdateProductPrices(ctx context.Context, changes []ProductPriceChange) (string, error) + func (c *Client) UpsertOfferVariants(ctx context.Context, offerID, optionID int64, variants []OfferVariantWrite) ([]OfferVariant, error) + func (c *Client) WalkCategoryPages(ctx context.Context, params ListCategoriesParams, maxPages int, ...) error + func (c *Client) WalkCategorySearch(ctx context.Context, query string, params CategoryPageParams, maxPages int, ...) error + func (c *Client) WalkOfferPages(ctx context.Context, params ListOffersParams, maxPages int, ...) error type Decimal + func ParseDecimal(raw string) (Decimal, error) + type DeleteAll string + const DeleteAllFalse + const DeleteAllTrue + type DiscountType string + const DiscountFixed + const DiscountPercent + type GoodsCurrency string + const GoodsCurrencyEUR + const GoodsCurrencyRUB + const GoodsCurrencyUSD + type GoodsOrder string + const GoodsOrderSales + type ImpactType string + const ImpactDecrease + const ImpactIncrease + type Job struct + ID string + Success bool + type Lang string + const LangEN + const LangRU + type LastSale struct + Date string + InvoiceID int64 + Product LastSaleProduct + type LastSaleProduct struct + ID int64 + Name string + PriceEUR Decimal + PriceRUB Decimal + PriceUAH *Decimal + PriceUSD Decimal + type ListCatalogCategoriesParams struct + CategoryID *string + Count int64 + Lang Lang + Page int64 + type ListCatalogProductsParams struct + Count int64 + IDs *string + Lang Lang + Page int64 + type ListLastSalesParams struct + Group *bool + SellerID *int64 + Top *int64 + type ListOfferProductsParams struct + SortColumn *string + SortDirection *string + Status *OfferProductStatus + type ListReceiptsParams struct + AllowType *string + CodeFilter *ReceiptCodeFilter + Count int64 + Currency *string + Finish *string + Page int64 + Start *string + Type *ReceiptType + type ListReviewsParams struct + Count int64 + Lang Lang + Page int64 + ProductID *int64 + Type *ReviewFilter + type LocalizedText struct + Locale string + Value string type Message + IsFromBuyer int64 + IsFromSeller int64 + type MoneyTrio struct + EUR *Decimal + RUB *Decimal + USD *Decimal + type OfferOption struct + CommentEN *string + CommentRU *string + HasSplittedProducts bool + ID int64 + IsPriceModifierHidden bool + IsRequired bool + Position int64 + Status OfferOptionStatus + TitleEN *string + TitleRU *string + Type OfferOptionType + Variants []OfferVariant + type OfferOptionPage struct + Options []OfferOption + Pagination Pagination + type OfferOptionStatus string + const OfferOptionActive + const OfferOptionArchived + const OfferOptionHidden + type OfferOptionType string + const OfferOptionCheckBox + const OfferOptionMultilineText + const OfferOptionRadioButton + const OfferOptionText + type OfferOptionWrite struct + CommentEN *string + CommentRU *string + HasSplittedProducts *bool + ID *int64 + IsPriceModifierHidden *bool + IsRequired *bool + Position *int64 + Status *OfferOptionStatus + TitleEN *string + TitleRU *string + Type *OfferOptionType + type OfferProduct struct + CreatedAt string + ID int64 + Status OfferProductStatus + Value string + type OfferProductInput struct + Value string + type OfferProductPage struct + Pagination Pagination + Products []OfferProduct + type OfferProductStatus string + const OfferProductArchived + const OfferProductInStock + const OfferProductSold + type OfferVariant struct + DiscountType DiscountType + ID int64 + ImpactType ImpactType + InStock *int64 + IsDefault bool + Position int64 + Price Decimal + Sold *int64 + Status OfferOptionStatus + TitleEN *string + TitleRU *string + type OfferVariantWrite struct + DiscountType *DiscountType + ID *int64 + ImpactType *ImpactType + IsDefault *bool + Position *int64 + Price *Decimal + Status *OfferOptionStatus + TitleEN *string + TitleRU *string + type OptionArchive struct + DeleteAll *DeleteAll + OptionIDs []int64 + type OptionVisibility struct + ID int64 + Status OfferOptionStatus + type PayCurrency struct + Code *string + Currency *string + Limit PayLimit + Price *Decimal + type PayLimit struct + Max *Decimal + Min *Decimal + type PayMethod struct + Currencies []PayCurrency + Name *string + type PriceChangeType string + const PriceMinus + const PricePercentMinus + const PricePercentPlus + const PricePlus + type ProductArchive struct + DeleteAll *DeleteAll + ProductIDs []int64 + type ProductCard struct + AddInfo *string + AgencyFee *string + AgencyID *int64 + AgencySum *string + Available *int64 + Breadcrumbs []ProductCrumb + CategoryID *int64 + CodeVerification json.RawMessage + Collection *string + Currency *string + Discounts []json.RawMessage + File *string + GiftFee *string + ID *int64 + Images []ProductImage + InLock *int64 + InStock *int64 + Info *string + Name *string + NextID *int64 + Options []ProductOption + OptionsCheck *int64 + PaymentMethods []PayMethod + Present json.RawMessage + PrevID *int64 + Price *Decimal + Prices ProductPrices + Property *int64 + ReleaseDate *string + Sale SaleInfo + Seller ProductSeller + ShowRest *int64 + Statistics ProductStats + Text *string + Type *string + URL *string + Unit *ProductUnit + Units []json.RawMessage + Videos []ProductImage + type ProductCrumb struct + ID int64 + Name string + type ProductImage struct + Height *int64 + URL *string + Width *int64 + type ProductOption struct + Hidden *int64 + Label string + ModifierVisible *int64 + Name int64 + Required *int64 + SeparateContent *int64 + Type *string + Variants []ProductOptionVariant + type ProductOptionVariant struct + Default *int64 + InStock *int64 + Modify *string + ModifyDefault *string + ModifyType *string + ModifyValue *string + Text *string + Value *int64 + Visible *int64 + type ProductPriceChange struct + Price *Decimal + ProductID *int64 + Variants []VariantPriceChange + type ProductPrices struct + Default *MoneyTrio + Initial *MoneyTrio + type ProductSeller struct + ID int64 + Name string + type ProductStats struct + BadReviews int64 + GoodReviews int64 + Refunds int64 + Sales int64 + type ProductTask struct + ErrorCount int64 + Errors []ProductTaskError + ID string + Status ProductTaskStatus + SuccessCount int64 + TotalCount int64 + type ProductTaskError struct + Key string + Value string + type ProductTaskStatus int + const ProductTaskStatus1 + const ProductTaskStatus2 + const ProductTaskStatus3 + type ProductUnit struct + Amount *Decimal + AmountTo *string + Count *Decimal + CountTo *string + Currency *string + Fixed *bool + Max *Decimal + Min *Decimal + Name *string + OnlyInt *bool + type Receipt struct + AccountOperationID int64 + CodeCheckAt *string + FreeAt *string + FreeDescription *string + Operation ReceiptOperation + OwnerID int64 + Product ReceiptProduct + Response *string + type ReceiptCodeFilter string + const ReceiptHideWaitingCode + const ReceiptOnlyWaitingCode + type ReceiptOperation struct + Currency string + DateTime string + ID int64 + OnAccount Decimal + Percent int64 + Price Decimal + Type string + type ReceiptPage struct + Count int64 + HasNextPage bool + HasPreviousPage bool + Items []Receipt + Page int64 + TotalCount int64 + TotalPages int64 + type ReceiptProduct struct + Deleted bool + ID int64 + Name []LocalizedText + type ReceiptType string + const ReceiptAddFunds + const ReceiptAdvGoods + const ReceiptAgentAccruals + const ReceiptDiskRent + const ReceiptExchangeRequest + const ReceiptExchangeResponse + const ReceiptExternalCommission + const ReceiptGiftCertificates + const ReceiptPartnerSpace + const ReceiptProductSales + const ReceiptRefund + const ReceiptWalletTransfer + type Review struct + Comment *string + Date string + Good int64 + ID int64 + Info string + InvoiceID Decimal + Name string + OwnerID int64 + Type string + type ReviewFilter string + const ReviewAll + const ReviewBad + const ReviewGood + type ReviewPage struct + Reviews []Review + TotalBad int64 + TotalGood int64 + TotalItems int64 + TotalPages int64 + type SaleInfo struct + BasePrice *Decimal + End *string + Percent *string + PriceEUR *Decimal + PriceRUR *Decimal + PriceUSD *Decimal + type SellerGoods struct + Count int64 + Direction string + Order string + Page int64 + Pages int64 + Products []CatalogProduct + SellerID int64 + SellerName string + type SellerGoodsQuery struct + Currency *GoodsCurrency + Direction *SortDirection + Lang *Lang + Order *GoodsOrder + OwnerID *int64 + Page *int64 + Rows *int64 + SellerID *int64 + ShowHidden *int64 + type SortDirection string + const SortAsc + const SortDesc + type VariantArchive struct + DeleteAll *DeleteAll + VariantIDs []int64 + type VariantPriceChange struct + Rate *Decimal + Type *PriceChangeType + VariantID *int64 + type VariantVisibility struct + ID int64 + Status OfferOptionStatus v1.0.1 Nov 7, 2026 v1.0.0 Nov 7, 2026 Changes in this version + const DefaultBaseURL + var ErrSellerIDRequired = errors.New("ggsel: seller id is required") + func IsUnauthorized(err error) bool + func Ptr[T any](v T) *T + type APIError struct + Body []byte + Desc string + Errors []APIErrorItem + Method string + Path string + RetDesc string + RetVal *int + StatusCode int + func (e *APIError) Error() string + type APIErrorEntity struct + Description string + ID *int64 + Resource string + type APIErrorItem struct + Code string + Entity *APIErrorEntity + type Buyer struct + Account string + Email *string + IPAddress *string + PaymentAggregator string + PaymentMethod string + Phone *string + Skype *string + WhatsApp *string + type Category struct + ContentType string + Fee Decimal + HasChildren bool + ID int64 + PaymentFee Decimal + Title string + Tree string + type CategoryPage struct + Categories []Category + Pagination Pagination + type CategoryPageParams struct + Limit *int64 + Page *int64 + type Chat struct + Email string + InvoiceID int64 + LastMessage string + MessageCount *int64 + NewCount *int64 + ProductID int64 + type ChatPage struct + Items []Chat + PageCount int64 + type Client struct + func New(opts Options) (*Client, error) + func (c *Client) CheckUniqueCode(ctx context.Context, code string) (UniqueCode, error) + func (c *Client) CreateOffer(ctx context.Context, body OfferWrite) (Offer, error) + func (c *Client) GetOffer(ctx context.Context, id int64) (Offer, error) + func (c *Client) GetOrder(ctx context.Context, invoiceID int64) (Order, error) + func (c *Client) ListCategories(ctx context.Context, params ListCategoriesParams) (CategoryPage, error) + func (c *Client) ListChats(ctx context.Context, params ListChatsParams) (ChatPage, error) + func (c *Client) ListMessages(ctx context.Context, invoiceID int64, params ListMessagesParams) ([]Message, error) + func (c *Client) ListOffers(ctx context.Context, params ListOffersParams) (OfferPage, error) + func (c *Client) Login(ctx context.Context) error + func (c *Client) SearchCategories(ctx context.Context, query string, params CategoryPageParams) (CategoryPage, error) + func (c *Client) SendMessage(ctx context.Context, invoiceID int64, text string) error + func (c *Client) UpdateOffer(ctx context.Context, id int64, body OfferWrite) (Offer, error) + type Currency string + const CurrencyRUB + type Decimal struct + func (d *Decimal) UnmarshalJSON(raw []byte) error + func (d Decimal) Equal(other Decimal) bool + func (d Decimal) MarshalJSON() ([]byte, error) + func (d Decimal) String() string + type Delivery string + const DeliveryAuto + const DeliveryManual + type FeedbackType string + const FeedbackNegative + const FeedbackPositive + type InvoiceState int + const InvoiceStateCanceled + const InvoiceStateCompleted + const InvoiceStateCreated + const InvoiceStatePaid + const InvoiceStateRefunded + type ListCategoriesParams struct + Limit *int64 + Page *int64 + ParentID *int64 + type ListChatsParams struct + Email *string + FilterNew *int64 + GoodsID *string + Page *int64 + PageSize *int64 + type ListMessagesParams struct + Count *int64 + FromID *int64 + Newer *int64 + ToID *int64 + type ListOffersParams struct + CategoryID *int64 + Delivery *Delivery + Limit *int64 + Page *int64 + Search *string + Sort *OfferSort + Status *OfferListStatus + UpdatedAtFrom *time.Time + type Message struct + Buyer int64 + DateSeen *string + DateWritten string + Deleted *int64 + Filename *string + ID int64 + IsFile *int64 + IsImage *int64 + Preview *string + Seller int64 + Text string + URL *string + type NotificationMethod string + const NotificationMethodGET + const NotificationMethodPOST + type NotificationSettings struct + Email *string + HTTPMethod *NotificationMethod + IsDefault bool + IsDisabled bool + Type *NotificationType + URL *string + type NotificationSettingsWrite struct + Email *string + HTTPMethod *NotificationMethod + IsDefault *bool + IsDisabled *bool + Type *NotificationType + URL *string + type NotificationType string + const NotificationEmail + const NotificationURL + type Offer struct + Category Category + CoverImageENURL *string + CoverImageRUURL string + CreatedAt string + Currency Currency + Delivery *Delivery + DescriptionEN string + DescriptionRU string + HasSplittedProducts bool + ID int64 + InStockProductsCount int64 + InStockSplittedProductsCount int64 + InstructionsEN string + InstructionsRU string + IsAutoselling bool + IsUnlimitedQuantity bool + MaxQuantity *int64 + MinQuantity *int64 + NotificationSettings *NotificationSettings + PostPaymentURL *string + PrePaymentSettings *PrePaymentSettings + Price Decimal + Quantity int64 + SoldProductsCount int64 + SoldSplittedProductsCount int64 + Status OfferStatus + TitleEN string + TitleRU string + UpdatedAt string + type OfferListStatus string + const OfferListStatusActive + const OfferListStatusDraft + const OfferListStatusPaused + type OfferPage struct + Offers []OfferSummary + Pagination Pagination + type OfferSort string + const OfferSortPriceAsc + const OfferSortPriceDesc + const OfferSortProductsCountAsc + const OfferSortProductsCountDesc + const OfferSortSalesCountAsc + const OfferSortSalesCountDesc + type OfferStatus string + const OfferStatusActive + const OfferStatusArchived + const OfferStatusDraft + const OfferStatusPaused + type OfferSummary struct + Category Category + CoverImageENURL *string + CoverImageRUURL string + CreatedAt string + Currency Currency + Delivery *Delivery + DescriptionEN *string + DescriptionRU *string + HasOptions bool + HasProducts bool + HasSplittedProducts bool + ID int64 + InstructionsEN *string + InstructionsRU *string + IsAutoselling *bool + IsUnlimitedQuantity *bool + MaxQuantity *int64 + MinQuantity *int64 + NotificationSettings *NotificationSettings + PostPaymentURL *string + PrePaymentSettings *PrePaymentSettings + Price *Decimal + Quantity *int64 + Status OfferStatus + TitleEN *string + TitleRU *string + UpdatedAt string + type OfferWrite struct + CategoryID *int64 + CoverImageEN *string + CoverImageRU *string + Currency *Currency + Delivery *Delivery + DescriptionEN *string + DescriptionRU *string + InstructionsEN *string + InstructionsRU *string + IsAutoselling *bool + IsUnlimitedQuantity *bool + MaxQuantity *int64 + MinQuantity *int64 + NotificationSettings *NotificationSettingsWrite + PostPaymentURL *string + PrePaymentSettings *PrePaymentSettingsWrite + Price *Decimal + Quantity *int64 + TitleEN *string + TitleRU *string + type Options struct + APIKey string + BaseURL string + Clock func() time.Time + HTTPClient *http.Client + Locale string + MaxRetries int + RetryBackoffMax time.Duration + RetryBackoffMin time.Duration + SellerID int64 + type Order struct + AgentFee Decimal + AgentID *int64 + AgentPercent *Decimal + Amount Decimal + BonusCode *string + Buyer Buyer + CartUID *string + ContentID int64 + CountGoods *string + CurrencyType string + DatePay *string + DayLock int64 + ExternalOrderID *string + Feedback *OrderFeedback + InvoiceState InvoiceState + ItemID *int64 + LockState string + Name *string + Options []OrderOption + Owner int64 + Profit Decimal + PromoCode *string + PurchaseDate string + QueryString *string + UniqueCodeState OrderCodeState + UnitGoods *string + type OrderCodeState struct + DateCheck *string + DateConfirmed *string + DateDelivery *string + DateRefuted *string + State *int64 + type OrderFeedback struct + Comment *string + Deleted bool + Feedback string + Type FeedbackType + type OrderOption struct + ID int64 + Name *string + UserData string + UserDataID *int64 + type Pagination struct + HasNextPage bool + HasPreviousPage bool + Limit int64 + Page int64 + TotalCount *int64 + TotalPages int64 + type PrePaymentSettings struct + AllowPayment bool + IsEnabled bool + URL *string + type PrePaymentSettingsWrite struct + AllowPayment *bool + IsEnabled *bool + URL *string + type UniqueCode struct + AgentID *int64 + AgentPercent *string + Amount Decimal + AmountUSD Decimal + BonusCode *string + CartUID *string + CountGoods *string + CurrencyType string + DatePay string + Email *string + GoodsID int64 + InvoiceID int64 + Lang *string + Name string + Options []UniqueCodeOption + Profit Decimal + PromoCode *string + QueryString *string + UniqueCodeState UniqueCodeState + UnitGoods *string + type UniqueCodeOption struct + ID *int64 + Name *string + Value *string + VariantID *int64 + type UniqueCodeState struct + DateCheck *string + DateConfirmed *string + DateDelivery *string + DateRefuted *string + State int64