Documentation ¶
Index ¶
- type API
- func (r *API) CancelReport(reportID string) error
- func (r *API) CancelReportSchedule(reportScheduleID string) error
- func (r *API) CreateReport(specification *CreateReportSpecification) (*apis.CallResponse[CreateReportResponse], error)
- func (r *API) CreateReportSchedule(specification *CreateReportScheduleSpecification) (*apis.CallResponse[CreateReportScheduleResponse], error)
- func (r *API) GetReport(reportID string) (*apis.CallResponse[GetReportResponse], error)
- func (r *API) GetReportDocument(reportDocumentID string, restrictedDataToken *string) (*apis.CallResponse[GetReportDocumentResponse], error)
- func (r *API) GetReportSchedule(reportScheduleID string) (*apis.CallResponse[GetReportScheduleResponse], error)
- func (r *API) GetReportSchedules(reportTypes []string) (*apis.CallResponse[GetReportsResponse], error)
- func (r *API) GetReports(filter *GetReportsFilter) (*apis.CallResponse[GetReportsResponse], error)
- type CreateReportResponse
- type CreateReportScheduleResponse
- type CreateReportScheduleSpecification
- type CreateReportSpecification
- type GetReportDocumentResponse
- type GetReportResponse
- type GetReportScheduleResponse
- type GetReportsFilter
- type GetReportsResponse
- type ReportDocument
- type ReportModel
- type ReportSchedule
- type ReportScheduleList
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CancelReport ¶
CancelReport returns report schedule details that match the filters that you specify. reportTypes is list of report types used to filter report schedules. This is optional can can be nil.
func (*API) CancelReportSchedule ¶
CancelReportSchedule cancels the report schedule that you specify.
func (*API) CreateReport ¶
func (r *API) CreateReport(specification *CreateReportSpecification) (*apis.CallResponse[CreateReportResponse], error)
CreateReport creates a report and returns the reportID.
func (*API) CreateReportSchedule ¶
func (r *API) CreateReportSchedule(specification *CreateReportScheduleSpecification) (*apis.CallResponse[CreateReportScheduleResponse], error)
CreateReportSchedule 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.
func (*API) GetReport ¶
func (r *API) GetReport(reportID string) (*apis.CallResponse[GetReportResponse], error)
GetReport returns report details (including the reportDocumentID, if available) for the report that you specify.
func (*API) GetReportDocument ¶
func (r *API) GetReportDocument(reportDocumentID string, restrictedDataToken *string) (*apis.CallResponse[GetReportDocumentResponse], error)
GetReportDocument returns the information required for retrieving a report document's contents. a restrictedDataToken is optional and may be passed to receive Personally Identifiable Information (PII).
func (*API) GetReportSchedule ¶
func (r *API) GetReportSchedule(reportScheduleID string) (*apis.CallResponse[GetReportScheduleResponse], error)
GetReportSchedule returns report schedule details for the report schedule that you specify.
func (*API) GetReportSchedules ¶
func (r *API) GetReportSchedules(reportTypes []string) (*apis.CallResponse[GetReportsResponse], error)
GetReportSchedules returns report schedule details that match the filters that you specify. reportTypes is list of report types used to filter report schedules. This is optional can can be nil.
func (*API) GetReports ¶
func (r *API) GetReports(filter *GetReportsFilter) (*apis.CallResponse[GetReportsResponse], error)
GetReports returns report details for the reports that match the filters that you specify. filter are optional and can be set to nil
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"` }
CreateReportResponse 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"` }
CreateReportScheduleResponse Response schema.
type CreateReportScheduleSpecification ¶
type CreateReportScheduleSpecification struct { // The report type. ReportType Type `json:"reportType"` // A list of marketplace identifiers for the report schedule. MarketplaceIDs []constants.MarketplaceID `json:"marketplaceIds"` // Additional information passed to reports. This varies by report type. 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 apis.JsonTimeISO8601 `json:"nextReportCreationTime,omitempty"` }
CreateReportScheduleSpecification struct for CreateReportScheduleSpecification
type CreateReportSpecification ¶
type CreateReportSpecification struct { // Additional information passed to reports. This varies by report type. ReportOptions *map[string]string `json:"reportOptions,omitempty"` // The report type. ReportType Type `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 apis.JsonTimeISO8601 `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 apis.JsonTimeISO8601 `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 []constants.MarketplaceID `json:"marketplaceIds"` }
CreateReportSpecification Information required to create the report.
type GetReportDocumentResponse ¶
type GetReportDocumentResponse struct {
ReportDocument
}
GetReportDocumentResponse Response schema.
type GetReportResponse ¶
type GetReportResponse struct {
ReportModel
}
GetReportResponse The response for the getReports operation.
type GetReportScheduleResponse ¶
type GetReportScheduleResponse struct {
ReportSchedule
}
GetReportScheduleResponse Response schema.
type GetReportsFilter ¶
type GetReportsFilter struct { // reportTypes is a list of report types used to filter reports. // When reportTypes is provided, the other filter parameters // (processingStatuses, marketplaceIDs, createdSince, createdUntil) and pageSize may also be provided. // Either reportTypes or nextToken is required. // Min count 1, max count 10 ReportTypes []Type // processingStatuses is a list of processing statuses used to filter reports. ProcessingStatuses []constants.ProcessingStatus //marketplaceIDs is a list of marketplace identifiers used to filter reports. // The reports returned will match at least one of the marketplaces that you specify. // min count 1, max count 10 MarketplaceIDs []constants.MarketplaceID // pageSize is the maximum number of reports to return in a single call. // min 1, max 100 PageSize int // createdSince is the earliest report creation date and time for reports to include in the response, in ISO 8601 date time format. // The default is 90 days ago. ReportsAPI are retained for a maximum of 90 days. CreatedSince apis.JsonTimeISO8601 // createdUntil is the latest report creation date and time for reports to include in the response, in ISO 8601 date time format. // The default is now. CreatedUntil apis.JsonTimeISO8601 // nextToken is a string token returned in the response to your previous request. // nextToken is returned when the number of results exceeds the specified pageSize value. //To get the next page of results, call the getReports operation and include this token as the only parameter. // Specifying nextToken with any other parameters will cause the request to fail. NextToken string }
func (*GetReportsFilter) GetQuery ¶
func (f *GetReportsFilter) GetQuery() url.Values
type GetReportsResponse ¶
type GetReportsResponse struct { // A list of reports. Reports []ReportModel `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"` }
GetReportsResponse The response for the getReports operation.
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. This URL expires after 5 minutes. Url string `json:"url"` // If present, the report document contents have been compressed with the provided algorithm. CompressionAlgorithm *string `json:"compressionAlgorithm,omitempty"` }
ReportDocument Information required for the report document.
type ReportModel ¶
type ReportModel struct { // A list of marketplace identifiers for the report. MarketplaceIDs []constants.MarketplaceID `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. ReportType Type `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 constants.ProcessingStatus `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"` }
ReportModel Detailed information about the report.
func (*ReportModel) GetDocumentAPIPath ¶
func (r *ReportModel) GetDocumentAPIPath() string
GetDocumentAPIPath returns the URL /reports/xxxx-xx-xx/documents/documentID which can be used for RestrictedDataTokens (RDTs) generation
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. ReportType Type `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 []constants.MarketplaceID `json:"marketplaceIds,omitempty"` // Additional information passed to reports. This varies by report type. 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 apis.JsonTimeISO8601 `json:"nextReportCreationTime,omitempty"` }
ReportSchedule Detailed information about a report schedule.
type ReportScheduleList ¶
type ReportScheduleList struct {
ReportSchedules []ReportSchedule `json:"reportSchedules"`
}
ReportScheduleList A list of report schedules.
type Type ¶
type Type string
Type of report
const ( // FBA Sales Reports FBAAmazonFulfilledShipmentsReport Type = "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL" FBAAmazonFulfilledShipmentsInvoicing Type = "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING" FBAAmazonFulfilledShipmentsReportTax Type = "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_TAX" FBAFlatFileAllOrdersReportbyLastUpdate Type = "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL" FBAFlatFileAllOrdersReportbyOrderDate Type = "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL" FBAXMLAllOrdersReportbyLastUpdate Type = "GET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL" FBAXMLAllOrdersReportbyOrderDate Type = "GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL" FBACustomerShipmentSalesReport Type = "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_SALES_DATA" FBAPromotionsReport Type = "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_PROMOTION_DATA" FBACustomerTaxes Type = "GET_FBA_FULFILLMENT_CUSTOMER_TAXES_DATA" FBARemoteFulfillmentEligibility Type = "GET_REMOTE_FULFILLMENT_ELIGIBILITY" // FBA Inventory Reports FBAInventoryReconciliationReport Type = "GET_FBA_RECONCILIATION_REPORT_DATA" FBAAmazonFulfilledInventoryReport Type = "GET_AFN_INVENTORY_DATA" FBAMultiCountryInventoryReport Type = "GET_AFN_INVENTORY_DATA_BY_COUNTRY" FBAInventoryLedgerReportSummaryView Type = "GET_LEDGER_SUMMARY_VIEW_DATA" FBAInventoryLedgerReportDetailedView Type = "GET_LEDGER_DETAIL_VIEW_DATA" FBADailyInventoryHistoryReport Type = "GET_FBA_FULFILLMENT_CURRENT_INVENTORY_DATA" FBAMonthlyInventoryHistoryReport Type = "GET_FBA_FULFILLMENT_MONTHLY_INVENTORY_DATA" FBAReceivedInventoryReport Type = "GET_FBA_FULFILLMENT_INVENTORY_RECEIPTS_DATA" FBAReservedInventoryReport Type = "GET_RESERVED_INVENTORY_DATA" FBAInventoryEventDetailReport Type = "GET_FBA_FULFILLMENT_INVENTORY_SUMMARY_DATA" FBAInventoryAdjustmentsReport Type = "GET_FBA_FULFILLMENT_INVENTORY_ADJUSTMENTS_DATA" FBAInventoryHealthReport Type = "GET_FBA_FULFILLMENT_INVENTORY_HEALTH_DATA" FBAManageInventory Type = "GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA" FBAManageInventoryArchived Type = "GET_FBA_MYI_ALL_INVENTORY_DATA" FBARestockInventoryReport Type = "GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT" FBAInboundPerformanceReport Type = "GET_FBA_FULFILLMENT_INBOUND_NONCOMPLIANCE_DATA" FBAStrandedInventoryReport Type = "GET_STRANDED_INVENTORY_UI_DATA" FBABulkFixStrandedInventoryReport Type = "GET_STRANDED_INVENTORY_LOADER_DATA" FBAInventoryAgeReport Type = "GET_FBA_INVENTORY_AGED_DATA" FBAManageExcessInventoryReport Type = "GET_EXCESS_INVENTORY_DATA" FBAStorageFeesReport Type = "GET_FBA_STORAGE_FEE_CHARGES_DATA" FBAGetReportExchangeData Type = "GET_PRODUCT_EXCHANGE_DATA" FBAManageInventoryHealthReport Type = "GET_FBA_INVENTORY_PLANNING_DATA" FBAInventoryStorageOverageFeesReport Type = "GET_FBA_OVERAGE_FEE_CHARGES_DATA" // FBA Payments Reports FBAFeePreviewReport Type = "GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA" FBAReimbursementsReport Type = "GET_FBA_REIMBURSEMENTS_DATA" FBALongTermStorageFeeChargesReport Type = "GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA" // FBA Customer Concessions Reports FBAReturnsReport Type = "GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA" FBAReplacementsReport Type = "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_REPLACEMENT_DATA" // FBA Removals Reports FBARecommendedRemovalReport Type = "GET_FBA_RECOMMENDED_REMOVAL_DATA" FBARemovalOrderDetailReport Type = "GET_FBA_FULFILLMENT_REMOVAL_ORDER_DETAIL_DATA" FBARemovalShipmentDetailReport Type = "GET_FBA_FULFILLMENT_REMOVAL_SHIPMENT_DETAIL_DATA" // FBA Small and Light Reports FBASmallLightInventoryReport Type = "GET_FBA_UNO_INVENTORY_DATA" //FBA Subscribe and Save reports FBASubscribeAndSaveForecastReport Type = "GET_FBA_SNS_FORECAST_DATA" FBASubscribeAndSavePerformanceReport Type = "GET_FBA_SNS_PERFORMANCE_DATA" )