swagger

package
v0.0.0-...-c324a2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2023 License: MIT Imports: 21 Imported by: 0

README

Go API client for swagger

The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the Listings Items API Use Case Guide.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://sellingpartnerapi-na.amazon.com/

Class Method HTTP request Description
ListingsApi DeleteListingsItem Delete /listings/2021-08-01/items/{sellerId}/{sku}
ListingsApi GetListingsItem Get /listings/2021-08-01/items/{sellerId}/{sku}
ListingsApi PatchListingsItem Patch /listings/2021-08-01/items/{sellerId}/{sku}
ListingsApi PutListingsItem Put /listings/2021-08-01/items/{sellerId}/{sku}

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Overview

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Listings Items * * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide). * * API version: 2021-08-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	ListingsApi *ListingsApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Selling Partner API for Listings Items API v2021-08-01 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type ErrorList

type ErrorList struct {
	Errors []ModelError `json:"errors"`
}

A list of error responses returned when a request is unsuccessful.

type FulfillmentAvailability

type FulfillmentAvailability struct {
	// Designates which fulfillment network will be used.
	FulfillmentChannelCode string `json:"fulfillmentChannelCode"`
	// The quantity of the item you are making available for sale.
	Quantity int32 `json:"quantity,omitempty"`
}

Fulfillment availability details for the listings item.

type GenericSwaggerError

type GenericSwaggerError struct {
	// contains filtered or unexported fields
}

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type Issue

type Issue struct {
	// An issue code that identifies the type of issue.
	Code string `json:"code"`
	// A message that describes the issue.
	Message string `json:"message"`
	// The severity of the issue.
	Severity string `json:"severity"`
	// Names of the attributes associated with the issue, if applicable.
	AttributeNames []string `json:"attributeNames,omitempty"`
}

An issue with a listings item.

type Item

type Item struct {
	// A selling partner provided identifier for an Amazon listing.
	Sku        string                      `json:"sku"`
	Summaries  *[]ItemSummaryByMarketplace `json:"summaries,omitempty"`
	Attributes *ModelMap                   `json:"attributes,omitempty"`
	Issues     *[]Issue                    `json:"issues,omitempty"`
	Offers     *[]ItemOfferByMarketplace   `json:"offers,omitempty"`
	// Fulfillment availability for the listings item.
	FulfillmentAvailability []FulfillmentAvailability `json:"fulfillmentAvailability,omitempty"`
	Procurement             *ItemProcurement          `json:"procurement,omitempty"`
}

A listings item.

type ItemImage

type ItemImage struct {
	// Link, or URL, for the image.
	Link string `json:"link"`
	// Height of the image in pixels.
	Height int32 `json:"height"`
	// Width of the image in pixels.
	Width int32 `json:"width"`
}

Image for the listings item.

type ItemOfferByMarketplace

type ItemOfferByMarketplace struct {
	// Amazon marketplace identifier.
	MarketplaceId string `json:"marketplaceId"`
	// Type of offer for the listings item.
	OfferType string  `json:"offerType"`
	Price     *Money  `json:"price"`
	Points    *Points `json:"points,omitempty"`
}

Offer details of a listings item for an Amazon marketplace.

type ItemProcurement

type ItemProcurement struct {
	CostPrice *Money `json:"costPrice"`
}

Vendor procurement information for the listings item.

type ItemSummaryByMarketplace

type ItemSummaryByMarketplace struct {
	// A marketplace identifier. Identifies the Amazon marketplace for the listings item.
	MarketplaceId string `json:"marketplaceId"`
	// Amazon Standard Identification Number (ASIN) of the listings item.
	Asin string `json:"asin"`
	// The Amazon product type of the listings item.
	ProductType string `json:"productType"`
	// Identifies the condition of the listings item.
	ConditionType string `json:"conditionType,omitempty"`
	// Statuses that apply to the listings item.
	Status []string `json:"status"`
	// Fulfillment network stock keeping unit is an identifier used by Amazon fulfillment centers to identify each unique item.
	FnSku string `json:"fnSku,omitempty"`
	// Name, or title, associated with an Amazon catalog item.
	ItemName string `json:"itemName"`
	// Date the listings item was created, in ISO 8601 format.
	CreatedDate time.Time `json:"createdDate"`
	// Date the listings item was last updated, in ISO 8601 format.
	LastUpdatedDate time.Time  `json:"lastUpdatedDate"`
	MainImage       *ItemImage `json:"mainImage,omitempty"`
}

Summary details of a listings item for an Amazon marketplace.

type ListingsApiDeleteListingsItemOpts

type ListingsApiDeleteListingsItemOpts struct {
	IssueLocale optional.String
}

type ListingsApiGetListingsItemOpts

type ListingsApiGetListingsItemOpts struct {
	IssueLocale  optional.String
	IncludedData optional.Interface
}

type ListingsApiPatchListingsItemOpts

type ListingsApiPatchListingsItemOpts struct {
	IssueLocale optional.String
}

type ListingsApiPutListingsItemOpts

type ListingsApiPutListingsItemOpts struct {
	IssueLocale optional.String
}

type ListingsApiService

type ListingsApiService service

func (*ListingsApiService) DeleteListingsItem

func (a *ListingsApiService) DeleteListingsItem(ctx context.Context, sellerId string, sku string, marketplaceIds []string, localVarOptionals *ListingsApiDeleteListingsItemOpts) (ListingsItemSubmissionResponse, *http.Response, error)

func (*ListingsApiService) GetListingsItem

func (a *ListingsApiService) GetListingsItem(ctx context.Context, sellerId string, sku string, marketplaceIds []string, localVarOptionals *ListingsApiGetListingsItemOpts) (Item, *http.Response, error)

func (*ListingsApiService) PatchListingsItem

func (a *ListingsApiService) PatchListingsItem(ctx context.Context, body ListingsItemPatchRequest, marketplaceIds []string, sellerId string, sku string, localVarOptionals *ListingsApiPatchListingsItemOpts) (ListingsItemSubmissionResponse, *http.Response, error)

func (*ListingsApiService) PutListingsItem

func (a *ListingsApiService) PutListingsItem(ctx context.Context, body ListingsItemPutRequest, marketplaceIds []string, sellerId string, sku string, localVarOptionals *ListingsApiPutListingsItemOpts) (ListingsItemSubmissionResponse, *http.Response, error)

type ListingsItemPatchRequest

type ListingsItemPatchRequest struct {
	// The Amazon product type of the listings item.
	ProductType string `json:"productType"`
	// One or more JSON Patch operations to perform on the listings item.
	Patches []PatchOperation `json:"patches"`
}

The request body schema for the patchListingsItem operation.

type ListingsItemPutRequest

type ListingsItemPutRequest struct {
	// The Amazon product type of the listings item.
	ProductType string `json:"productType"`
	// The name of the requirements set for the provided data.
	Requirements string `json:"requirements,omitempty"`
	// JSON object containing structured listings item attribute data keyed by attribute name.
	Attributes ModelMap `json:"attributes"`
}

The request body schema for the putListingsItem operation.

type ListingsItemSubmissionResponse

type ListingsItemSubmissionResponse struct {
	// A selling partner provided identifier for an Amazon listing.
	Sku string `json:"sku"`
	// The status of the listings item submission.
	Status string `json:"status"`
	// The unique identifier of the listings item submission.
	SubmissionId string `json:"submissionId"`
	// Listings item issues related to the listings item submission.
	Issues []Issue `json:"issues,omitempty"`
}

Response containing the results of a submission to the Selling Partner API for Listings Items.

type ModelError

type ModelError struct {
	// An error code that identifies the type of error that occurred.
	Code string `json:"code"`
	// A message that describes the error condition.
	Message string `json:"message"`
	// Additional details that can help the caller understand or fix the issue.
	Details string `json:"details,omitempty"`
}

Error response returned when the request is unsuccessful.

type ModelMap

type ModelMap map[string]interface{}

type Money

type Money struct {
	// Three-digit currency code. In ISO 4217 format.
	CurrencyCode string `json:"currencyCode"`
	Amount       string `json:"amount"`
}

The currency type and the amount.

type PatchOperation

type PatchOperation struct {
	// Type of JSON Patch operation. Supported JSON Patch operations include add, replace, and delete. See <https://tools.ietf.org/html/rfc6902>.
	Op string `json:"op"`
	// JSON Pointer path of the element to patch. See <https://tools.ietf.org/html/rfc6902>.
	Path string `json:"path"`
	// JSON value to add, replace, or delete.
	Value []ModelMap `json:"value,omitempty"`
}

Individual JSON Patch operation for an HTTP PATCH request.

type Points

type Points struct {
	PointsNumber int32 `json:"pointsNumber"`
}

The number of Amazon Points offered with the purchase of an item, and their monetary value. Note that the Points element is only returned in Japan (JP).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL