Documentation
¶
Overview ¶
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Tokens * * The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). * * API version: 2021-03-01 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type BasicAuth
- type Configuration
- type CreateRestrictedDataTokenRequest
- type CreateRestrictedDataTokenResponse
- type ErrorList
- type GenericSwaggerError
- type ModelError
- type RestrictedResource
- type TokensApiService
Constants ¶
This section is empty.
Variables ¶
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 ¶
Types ¶
type APIClient ¶
type APIClient struct { TokensApi *TokensApiService // contains filtered or unexported fields }
APIClient manages communication with the Selling Partner API for Tokens API v2021-03-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 ¶
Change base path to allow switching to mocks
type APIKey ¶
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 CreateRestrictedDataTokenRequest ¶
type CreateRestrictedDataTokenRequest struct { // The application ID for the target application to which access is being delegated. TargetApplication string `json:"targetApplication,omitempty"` // A list of restricted resources. Maximum: 50 RestrictedResources []RestrictedResource `json:"restrictedResources"` }
The request schema for the createRestrictedDataToken operation.
type CreateRestrictedDataTokenResponse ¶
type CreateRestrictedDataTokenResponse struct { // A Restricted Data Token (RDT). This is a short-lived access token that authorizes calls to restricted operations. Pass this value with the x-amz-access-token header when making subsequent calls to these restricted resources. RestrictedDataToken string `json:"restrictedDataToken,omitempty"` // The lifetime of the Restricted Data Token, in seconds. ExpiresIn int32 `json:"expiresIn,omitempty"` }
The response schema for the createRestrictedDataToken operation.
type ErrorList ¶
type ErrorList struct {
Errors []ModelError `json:"errors,omitempty"`
}
A list of error responses returned when a request is unsuccessful.
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 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"` }
An error response returned when the request is unsuccessful.
type RestrictedResource ¶
type RestrictedResource struct { // The HTTP method in the restricted resource. Method string `json:"method"` // The path in the restricted resource. Here are some path examples: - “`/orders/v0/orders“`. For getting an RDT for the getOrders operation of the Orders API. For bulk orders. - “`/orders/v0/orders/123-1234567-1234567“`. For getting an RDT for the getOrder operation of the Orders API. For a specific order. - “`/orders/v0/orders/123-1234567-1234567/orderItems“`. For getting an RDT for the getOrderItems operation of the Orders API. For the order items in a specific order. - “`/mfn/v0/shipments/FBA1234ABC5D“`. For getting an RDT for the getShipment operation of the Shipping API. For a specific shipment. - “`/mfn/v0/shipments/{shipmentId}“`. For getting an RDT for the getShipment operation of the Shipping API. For any of a selling partner's shipments that you specify when you call the getShipment operation. Path string `json:"path"` // Indicates the type of Personally Identifiable Information requested. This parameter is required only when getting an RDT for use with the getOrder, getOrders, or getOrderItems operation of the Orders API. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). Possible values include: - **buyerInfo**. On the order level this includes general identifying information about the buyer and tax-related information. On the order item level this includes gift wrap information and custom order information, if available. - **shippingAddress**. This includes information for fulfilling orders. - **buyerTaxInformation**. This includes information for issuing tax invoices. DataElements []string `json:"dataElements,omitempty"` }
Model of a restricted resource.
type TokensApiService ¶
type TokensApiService service
func (*TokensApiService) CreateRestrictedDataToken ¶
func (a *TokensApiService) CreateRestrictedDataToken(ctx context.Context, body CreateRestrictedDataTokenRequest) (CreateRestrictedDataTokenResponse, *http.Response, error)
TokensApiService Returns a Restricted Data Token (RDT) for one or more restricted resources that you specify. A restricted resource is the HTTP method and path from a restricted operation that returns Personally Identifiable Information (PII), plus a dataElements value that indicates the type of PII requested. See the Tokens API Use Case Guide for a list of restricted operations. Use the RDT returned here as the access token in subsequent calls to the corresponding restricted operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body The restricted data token request details.
@return CreateRestrictedDataTokenResponse