Documentation ¶
Overview ¶
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Selling Partner API for Reports * * The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses. * * API version: 2021-06-30 * 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 CreateReportResponse
- type CreateReportScheduleResponse
- type CreateReportScheduleSpecification
- type CreateReportSpecification
- type ErrorList
- type GenericSwaggerError
- type GetReportsResponse
- type ModelError
- type Report
- type ReportDocument
- type ReportSchedule
- type ReportScheduleList
- type ReportsApiGetReportsOpts
- type ReportsApiService
- func (a *ReportsApiService) CancelReport(ctx context.Context, reportId string) (*http.Response, error)
- func (a *ReportsApiService) CancelReportSchedule(ctx context.Context, reportScheduleId string) (*http.Response, error)
- func (a *ReportsApiService) CreateReport(ctx context.Context, body CreateReportSpecification) (CreateReportResponse, *http.Response, error)
- func (a *ReportsApiService) CreateReportSchedule(ctx context.Context, body CreateReportScheduleSpecification) (CreateReportScheduleResponse, *http.Response, error)
- func (a *ReportsApiService) GetReport(ctx context.Context, reportId string) (Report, *http.Response, error)
- func (a *ReportsApiService) GetReportDocument(ctx context.Context, reportDocumentId string) (ReportDocument, *http.Response, error)
- func (a *ReportsApiService) GetReportSchedule(ctx context.Context, reportScheduleId string) (ReportSchedule, *http.Response, error)
- func (a *ReportsApiService) GetReportSchedules(ctx context.Context, reportTypes []string) (ReportScheduleList, *http.Response, error)
- func (a *ReportsApiService) GetReports(ctx context.Context, localVarOptionals *ReportsApiGetReportsOpts) (GetReportsResponse, *http.Response, error)
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 { ReportsApi *ReportsApiService // contains filtered or unexported fields }
APIClient manages communication with the Selling Partner API for Reports API v2021-06-30 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 CreateReportResponse ¶
type CreateReportResponse struct { // The identifier for the report. This identifier is unique only in combination with a seller ID. ReportId string `json:"reportId"` }
Response schema.
type CreateReportScheduleResponse ¶
type CreateReportScheduleResponse struct { // The identifier for the report schedule. This identifier is unique only in combination with a seller ID. ReportScheduleId string `json:"reportScheduleId"` }
Response schema.
type CreateReportScheduleSpecification ¶
type CreateReportScheduleSpecification struct { // The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. ReportType string `json:"reportType"` // A list of marketplace identifiers for the report schedule. MarketplaceIds []string `json:"marketplaceIds"` ReportOptions *map[string]string `json:"reportOptions,omitempty"` // One of a set of predefined ISO 8601 periods that specifies how often a report should be created. Period string `json:"period"` // The date and time when the schedule will create its next report, in ISO 8601 date time format. NextReportCreationTime time.Time `json:"nextReportCreationTime,omitempty"` }
type CreateReportSpecification ¶
type CreateReportSpecification struct { ReportOptions *map[string]string `json:"reportOptions,omitempty"` // The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. ReportType string `json:"reportType"` // The start of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. DataStartTime time.Time `json:"dataStartTime,omitempty"` // The end of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. DataEndTime time.Time `json:"dataEndTime,omitempty"` // A list of marketplace identifiers. The report document's contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise. MarketplaceIds []string `json:"marketplaceIds"` }
Information required to create the report.
type ErrorList ¶
type ErrorList struct {
Errors []ModelError `json:"errors"`
}
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 GetReportsResponse ¶
type GetReportsResponse struct { Reports *[]Report `json:"reports"` // Returned when the number of results exceeds pageSize. To get the next page of results, call getReports with this token as the only parameter. NextToken string `json:"nextToken,omitempty"` }
The response for the getReports operation.
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 in a human-readable form. 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 Report ¶
type Report struct { // A list of marketplace identifiers for the report. MarketplaceIds []string `json:"marketplaceIds,omitempty"` // The identifier for the report. This identifier is unique only in combination with a seller ID. ReportId string `json:"reportId"` // The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. ReportType string `json:"reportType"` // The start of a date and time range used for selecting the data to report. DataStartTime time.Time `json:"dataStartTime,omitempty"` // The end of a date and time range used for selecting the data to report. DataEndTime time.Time `json:"dataEndTime,omitempty"` // The identifier of the report schedule that created this report (if any). This identifier is unique only in combination with a seller ID. ReportScheduleId string `json:"reportScheduleId,omitempty"` // The date and time when the report was created. CreatedTime time.Time `json:"createdTime"` // The processing status of the report. ProcessingStatus string `json:"processingStatus"` // The date and time when the report processing started, in ISO 8601 date time format. ProcessingStartTime time.Time `json:"processingStartTime,omitempty"` // The date and time when the report processing completed, in ISO 8601 date time format. ProcessingEndTime time.Time `json:"processingEndTime,omitempty"` // The identifier for the report document. Pass this into the getReportDocument operation to get the information you will need to retrieve the report document's contents. ReportDocumentId string `json:"reportDocumentId,omitempty"` }
Detailed information about the report.
type ReportDocument ¶
type ReportDocument struct { // The identifier for the report document. This identifier is unique only in combination with a seller ID. ReportDocumentId string `json:"reportDocumentId"` // A presigned URL for the report document. If `compressionAlgorithm` is not returned, you can download the report directly from this URL. This URL expires after 5 minutes. Url string `json:"url"` // If the report document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the report when you download. Otherwise, you can download the report directly. Refer to [Step 2. Download the report](doc:reports-api-v2021-06-30-retrieve-a-report#step-2-download-the-report) in the use case guide, where sample code is provided. CompressionAlgorithm string `json:"compressionAlgorithm,omitempty"` }
Information required for the report document.
type ReportSchedule ¶
type ReportSchedule struct { // The identifier for the report schedule. This identifier is unique only in combination with a seller ID. ReportScheduleId string `json:"reportScheduleId"` // The report type. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. ReportType string `json:"reportType"` // A list of marketplace identifiers. The report document's contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise. MarketplaceIds []string `json:"marketplaceIds,omitempty"` ReportOptions *map[string]string `json:"reportOptions,omitempty"` // An ISO 8601 period value that indicates how often a report should be created. Period string `json:"period"` // The date and time when the schedule will create its next report, in ISO 8601 date time format. NextReportCreationTime time.Time `json:"nextReportCreationTime,omitempty"` }
Detailed information about a report schedule.
type ReportScheduleList ¶
type ReportScheduleList struct {
ReportSchedules []ReportSchedule `json:"reportSchedules"`
}
A list of report schedules.
type ReportsApiService ¶
type ReportsApiService service
func (*ReportsApiService) CancelReport ¶
func (a *ReportsApiService) CancelReport(ctx context.Context, reportId string) (*http.Response, error)
ReportsApiService Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 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 reportId The identifier for the report. This identifier is unique only in combination with a seller ID.
func (*ReportsApiService) CancelReportSchedule ¶
func (a *ReportsApiService) CancelReportSchedule(ctx context.Context, reportScheduleId string) (*http.Response, error)
ReportsApiService Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 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 reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
func (*ReportsApiService) CreateReport ¶
func (a *ReportsApiService) CreateReport(ctx context.Context, body CreateReportSpecification) (CreateReportResponse, *http.Response, error)
ReportsApiService Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | 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
@return CreateReportResponse
func (*ReportsApiService) CreateReportSchedule ¶
func (a *ReportsApiService) CreateReportSchedule(ctx context.Context, body CreateReportScheduleSpecification) (CreateReportScheduleResponse, *http.Response, error)
ReportsApiService Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 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
@return CreateReportScheduleResponse
func (*ReportsApiService) GetReport ¶
func (a *ReportsApiService) GetReport(ctx context.Context, reportId string) (Report, *http.Response, error)
ReportsApiService Returns report details (including the reportDocumentId, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | 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 reportId The identifier for the report. This identifier is unique only in combination with a seller ID.
@return Report
func (*ReportsApiService) GetReportDocument ¶
func (a *ReportsApiService) GetReportDocument(ctx context.Context, reportDocumentId string) (ReportDocument, *http.Response, error)
ReportsApiService Returns the information required for retrieving a report document's contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | 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 reportDocumentId The identifier for the report document.
@return ReportDocument
func (*ReportsApiService) GetReportSchedule ¶
func (a *ReportsApiService) GetReportSchedule(ctx context.Context, reportScheduleId string) (ReportSchedule, *http.Response, error)
ReportsApiService Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 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 reportScheduleId The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
@return ReportSchedule
func (*ReportsApiService) GetReportSchedules ¶
func (a *ReportsApiService) GetReportSchedules(ctx context.Context, reportTypes []string) (ReportScheduleList, *http.Response, error)
ReportsApiService Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 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 reportTypes A list of report types used to filter report schedules. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
@return ReportScheduleList
func (*ReportsApiService) GetReports ¶
func (a *ReportsApiService) GetReports(ctx context.Context, localVarOptionals *ReportsApiGetReportsOpts) (GetReportsResponse, *http.Response, error)
Source Files ¶
- api_reports.go
- client.go
- configuration.go
- model_create_report_response.go
- model_create_report_schedule_response.go
- model_create_report_schedule_specification.go
- model_create_report_specification.go
- model_error.go
- model_error_list.go
- model_get_reports_response.go
- model_report.go
- model_report_document.go
- model_report_schedule.go
- model_report_schedule_list.go
- response.go