Documentation ¶
Overview ¶
Package attribution provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT.
Index ¶
- func NewGetAdvertisersByProfileRequest(server string, params *GetAdvertisersByProfileParams) (*http.Request, error)
- func NewGetAttributionTagsByCampaignRequest(server string, params *GetAttributionTagsByCampaignParams, ...) (*http.Request, error)
- func NewGetAttributionTagsByCampaignRequestWithBody(server string, params *GetAttributionTagsByCampaignParams, contentType string, ...) (*http.Request, error)
- func NewGetPublisherAttributionTagTemplateRequest(server string, params *GetPublisherAttributionTagTemplateParams) (*http.Request, error)
- func NewGetPublisherMacroAttributionTagRequest(server string, params *GetPublisherMacroAttributionTagParams) (*http.Request, error)
- func NewGetPublishersRequest(server string, params *GetPublishersParams) (*http.Request, error)
- type Advertiser
- type AdvertiserResponse
- type AttributionTagMap
- type AttributionTagResponse
- type Client
- func (c *Client) GetAdvertisersByProfile(ctx context.Context, params *GetAdvertisersByProfileParams) (*http.Response, error)
- func (c *Client) GetAttributionTagsByCampaign(ctx context.Context, params *GetAttributionTagsByCampaignParams, ...) (*http.Response, error)
- func (c *Client) GetAttributionTagsByCampaignWithBody(ctx context.Context, params *GetAttributionTagsByCampaignParams, ...) (*http.Response, error)
- func (c *Client) GetPublisherAttributionTagTemplate(ctx context.Context, params *GetPublisherAttributionTagTemplateParams) (*http.Response, error)
- func (c *Client) GetPublisherMacroAttributionTag(ctx context.Context, params *GetPublisherMacroAttributionTagParams) (*http.Response, error)
- func (c *Client) GetPublishers(ctx context.Context, params *GetPublishersParams) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetAdvertisersByProfileWithResponse(ctx context.Context, params *GetAdvertisersByProfileParams) (*GetAdvertisersByProfileResp, error)
- func (c *ClientWithResponses) GetAttributionTagsByCampaignWithBodyWithResponse(ctx context.Context, params *GetAttributionTagsByCampaignParams, ...) (*GetAttributionTagsByCampaignResp, error)
- func (c *ClientWithResponses) GetAttributionTagsByCampaignWithResponse(ctx context.Context, params *GetAttributionTagsByCampaignParams, ...) (*GetAttributionTagsByCampaignResp, error)
- func (c *ClientWithResponses) GetPublisherAttributionTagTemplateWithResponse(ctx context.Context, params *GetPublisherAttributionTagTemplateParams) (*GetPublisherAttributionTagTemplateResp, error)
- func (c *ClientWithResponses) GetPublisherMacroAttributionTagWithResponse(ctx context.Context, params *GetPublisherMacroAttributionTagParams) (*GetPublisherMacroAttributionTagResp, error)
- func (c *ClientWithResponses) GetPublishersWithResponse(ctx context.Context, params *GetPublishersParams) (*GetPublishersResp, error)
- type ClientWithResponsesInterface
- type GetAdvertisersByProfileParams
- type GetAdvertisersByProfileResp
- type GetAttributionTagsByCampaignJSONRequestBody
- type GetAttributionTagsByCampaignParams
- type GetAttributionTagsByCampaignResp
- type GetPublisherAttributionTagTemplateParams
- type GetPublisherAttributionTagTemplateResp
- type GetPublisherMacroAttributionTagParams
- type GetPublisherMacroAttributionTagResp
- type GetPublishersParams
- type GetPublishersResp
- type HttpRequestDoer
- type MaaSError
- type Publisher
- type PublishersResponse
- type ReportEntry
- type ReportRequestBody
- type ReportRequestBodyGroupBy
- type ReportResponse
- type RequestEditorFn
- type ResponseEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetAdvertisersByProfileRequest ¶
func NewGetAdvertisersByProfileRequest(server string, params *GetAdvertisersByProfileParams) (*http.Request, error)
NewGetAdvertisersByProfileRequest generates requests for GetAdvertisersByProfile
func NewGetAttributionTagsByCampaignRequest ¶
func NewGetAttributionTagsByCampaignRequest(server string, params *GetAttributionTagsByCampaignParams, body GetAttributionTagsByCampaignJSONRequestBody) (*http.Request, error)
NewGetAttributionTagsByCampaignRequest calls the generic GetAttributionTagsByCampaign builder with application/json body
func NewGetAttributionTagsByCampaignRequestWithBody ¶
func NewGetAttributionTagsByCampaignRequestWithBody(server string, params *GetAttributionTagsByCampaignParams, contentType string, body io.Reader) (*http.Request, error)
NewGetAttributionTagsByCampaignRequestWithBody generates requests for GetAttributionTagsByCampaign with any type of body
func NewGetPublisherAttributionTagTemplateRequest ¶
func NewGetPublisherAttributionTagTemplateRequest(server string, params *GetPublisherAttributionTagTemplateParams) (*http.Request, error)
NewGetPublisherAttributionTagTemplateRequest generates requests for GetPublisherAttributionTagTemplate
func NewGetPublisherMacroAttributionTagRequest ¶
func NewGetPublisherMacroAttributionTagRequest(server string, params *GetPublisherMacroAttributionTagParams) (*http.Request, error)
NewGetPublisherMacroAttributionTagRequest generates requests for GetPublisherMacroAttributionTag
func NewGetPublishersRequest ¶
func NewGetPublishersRequest(server string, params *GetPublishersParams) (*http.Request, error)
NewGetPublishersRequest generates requests for GetPublishers
Types ¶
type Advertiser ¶
type Advertiser struct { AdvertiserId *string `json:"advertiserId,omitempty"` AdvertiserName *string `json:"advertiserName,omitempty"` }
Advertiser defines model for advertiser.
type AdvertiserResponse ¶
type AdvertiserResponse struct {
Advertisers *[]Advertiser `json:"advertisers,omitempty"`
}
AdvertiserResponse defines model for AdvertiserResponse.
type AttributionTagMap ¶
AttributionTagMap An object representing the association between a publisher identifier and an attribution tag.
type AttributionTagResponse ¶
type AttributionTagResponse map[string]AttributionTagMap
AttributionTagResponse A list of advertisers and associated attribution tags.
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn // A callback for modifying response which are generated after receive from the network. ResponseEditors []ResponseEditorFn // The user agent header identifies your application, its version number, and the platform and programming language you are using. // You must include a user agent header in each request submitted to the sales partner API. UserAgent string }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetAdvertisersByProfile ¶
func (*Client) GetAttributionTagsByCampaign ¶
func (c *Client) GetAttributionTagsByCampaign(ctx context.Context, params *GetAttributionTagsByCampaignParams, body GetAttributionTagsByCampaignJSONRequestBody) (*http.Response, error)
func (*Client) GetAttributionTagsByCampaignWithBody ¶
func (*Client) GetPublisherAttributionTagTemplate ¶
func (*Client) GetPublisherMacroAttributionTag ¶
func (*Client) GetPublishers ¶
type ClientInterface ¶
type ClientInterface interface { // GetAdvertisersByProfile request GetAdvertisersByProfile(ctx context.Context, params *GetAdvertisersByProfileParams) (*http.Response, error) // GetPublishers request GetPublishers(ctx context.Context, params *GetPublishersParams) (*http.Response, error) // GetAttributionTagsByCampaignWithBody request with any body GetAttributionTagsByCampaignWithBody(ctx context.Context, params *GetAttributionTagsByCampaignParams, contentType string, body io.Reader) (*http.Response, error) GetAttributionTagsByCampaign(ctx context.Context, params *GetAttributionTagsByCampaignParams, body GetAttributionTagsByCampaignJSONRequestBody) (*http.Response, error) // GetPublisherAttributionTagTemplate request GetPublisherAttributionTagTemplate(ctx context.Context, params *GetPublisherAttributionTagTemplateParams) (*http.Response, error) // GetPublisherMacroAttributionTag request GetPublisherMacroAttributionTag(ctx context.Context, params *GetPublisherMacroAttributionTagParams) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithResponseEditorFn ¶ added in v0.0.2
func WithResponseEditorFn(fn ResponseEditorFn) ClientOption
WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetAdvertisersByProfileWithResponse ¶
func (c *ClientWithResponses) GetAdvertisersByProfileWithResponse(ctx context.Context, params *GetAdvertisersByProfileParams) (*GetAdvertisersByProfileResp, error)
GetAdvertisersByProfileWithResponse request returning *GetAdvertisersByProfileResp
func (*ClientWithResponses) GetAttributionTagsByCampaignWithBodyWithResponse ¶
func (c *ClientWithResponses) GetAttributionTagsByCampaignWithBodyWithResponse(ctx context.Context, params *GetAttributionTagsByCampaignParams, contentType string, body io.Reader) (*GetAttributionTagsByCampaignResp, error)
GetAttributionTagsByCampaignWithBodyWithResponse request with arbitrary body returning *GetAttributionTagsByCampaignResp
func (*ClientWithResponses) GetAttributionTagsByCampaignWithResponse ¶
func (c *ClientWithResponses) GetAttributionTagsByCampaignWithResponse(ctx context.Context, params *GetAttributionTagsByCampaignParams, body GetAttributionTagsByCampaignJSONRequestBody) (*GetAttributionTagsByCampaignResp, error)
func (*ClientWithResponses) GetPublisherAttributionTagTemplateWithResponse ¶
func (c *ClientWithResponses) GetPublisherAttributionTagTemplateWithResponse(ctx context.Context, params *GetPublisherAttributionTagTemplateParams) (*GetPublisherAttributionTagTemplateResp, error)
GetPublisherAttributionTagTemplateWithResponse request returning *GetPublisherAttributionTagTemplateResp
func (*ClientWithResponses) GetPublisherMacroAttributionTagWithResponse ¶
func (c *ClientWithResponses) GetPublisherMacroAttributionTagWithResponse(ctx context.Context, params *GetPublisherMacroAttributionTagParams) (*GetPublisherMacroAttributionTagResp, error)
GetPublisherMacroAttributionTagWithResponse request returning *GetPublisherMacroAttributionTagResp
func (*ClientWithResponses) GetPublishersWithResponse ¶
func (c *ClientWithResponses) GetPublishersWithResponse(ctx context.Context, params *GetPublishersParams) (*GetPublishersResp, error)
GetPublishersWithResponse request returning *GetPublishersResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetAdvertisersByProfileWithResponse request GetAdvertisersByProfileWithResponse(ctx context.Context, params *GetAdvertisersByProfileParams) (*GetAdvertisersByProfileResp, error) // GetPublishersWithResponse request GetPublishersWithResponse(ctx context.Context, params *GetPublishersParams) (*GetPublishersResp, error) // GetAttributionTagsByCampaignWithBodyWithResponse request with any body GetAttributionTagsByCampaignWithBodyWithResponse(ctx context.Context, params *GetAttributionTagsByCampaignParams, contentType string, body io.Reader) (*GetAttributionTagsByCampaignResp, error) GetAttributionTagsByCampaignWithResponse(ctx context.Context, params *GetAttributionTagsByCampaignParams, body GetAttributionTagsByCampaignJSONRequestBody) (*GetAttributionTagsByCampaignResp, error) // GetPublisherAttributionTagTemplateWithResponse request GetPublisherAttributionTagTemplateWithResponse(ctx context.Context, params *GetPublisherAttributionTagTemplateParams) (*GetPublisherAttributionTagTemplateResp, error) // GetPublisherMacroAttributionTagWithResponse request GetPublisherMacroAttributionTagWithResponse(ctx context.Context, params *GetPublisherMacroAttributionTagParams) (*GetPublisherMacroAttributionTagResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetAdvertisersByProfileParams ¶
type GetAdvertisersByProfileParams struct { // AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account. AmazonAdvertisingAPIClientId string `json:"Amazon-Advertising-API-ClientId"` // AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` }
GetAdvertisersByProfileParams defines parameters for GetAdvertisersByProfile.
type GetAdvertisersByProfileResp ¶
type GetAdvertisersByProfileResp struct { Body []byte HTTPResponse *http.Response JSON200 *AdvertiserResponse }
func ParseGetAdvertisersByProfileResp ¶
func ParseGetAdvertisersByProfileResp(rsp *http.Response) (*GetAdvertisersByProfileResp, error)
ParseGetAdvertisersByProfileResp parses an HTTP response from a GetAdvertisersByProfileWithResponse call
func (GetAdvertisersByProfileResp) Status ¶
func (r GetAdvertisersByProfileResp) Status() string
Status returns HTTPResponse.Status
func (GetAdvertisersByProfileResp) StatusCode ¶
func (r GetAdvertisersByProfileResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAttributionTagsByCampaignJSONRequestBody ¶
type GetAttributionTagsByCampaignJSONRequestBody = ReportRequestBody
GetAttributionTagsByCampaignJSONRequestBody defines body for GetAttributionTagsByCampaign for application/json ContentType.
type GetAttributionTagsByCampaignParams ¶
type GetAttributionTagsByCampaignParams struct { // AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account. AmazonAdvertisingAPIClientId string `json:"Amazon-Advertising-API-ClientId"` // AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` }
GetAttributionTagsByCampaignParams defines parameters for GetAttributionTagsByCampaign.
type GetAttributionTagsByCampaignResp ¶
type GetAttributionTagsByCampaignResp struct { Body []byte HTTPResponse *http.Response JSON200 *ReportResponse JSON400 *MaaSError JSON403 *MaaSError JSON500 *MaaSError }
func ParseGetAttributionTagsByCampaignResp ¶
func ParseGetAttributionTagsByCampaignResp(rsp *http.Response) (*GetAttributionTagsByCampaignResp, error)
ParseGetAttributionTagsByCampaignResp parses an HTTP response from a GetAttributionTagsByCampaignWithResponse call
func (GetAttributionTagsByCampaignResp) Status ¶
func (r GetAttributionTagsByCampaignResp) Status() string
Status returns HTTPResponse.Status
func (GetAttributionTagsByCampaignResp) StatusCode ¶
func (r GetAttributionTagsByCampaignResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPublisherAttributionTagTemplateParams ¶
type GetPublisherAttributionTagTemplateParams struct { // PublisherIds A list of publisher identifiers for which to request tags. PublisherIds []string `form:"publisherIds" json:"publisherIds"` // AdvertiserIds List of advertiser identifiers for which to request tags. // If no values are passed, all advertisers are returned. AdvertiserIds *[]int64 `form:"advertiserIds,omitempty" json:"advertiserIds,omitempty"` // AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account. AmazonAdvertisingAPIClientId string `json:"Amazon-Advertising-API-ClientId"` // AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` }
GetPublisherAttributionTagTemplateParams defines parameters for GetPublisherAttributionTagTemplate.
type GetPublisherAttributionTagTemplateResp ¶
type GetPublisherAttributionTagTemplateResp struct { Body []byte HTTPResponse *http.Response JSON200 *AttributionTagResponse JSON400 *MaaSError JSON401 *MaaSError JSON403 *MaaSError JSON429 *MaaSError JSON500 *MaaSError }
func ParseGetPublisherAttributionTagTemplateResp ¶
func ParseGetPublisherAttributionTagTemplateResp(rsp *http.Response) (*GetPublisherAttributionTagTemplateResp, error)
ParseGetPublisherAttributionTagTemplateResp parses an HTTP response from a GetPublisherAttributionTagTemplateWithResponse call
func (GetPublisherAttributionTagTemplateResp) Status ¶
func (r GetPublisherAttributionTagTemplateResp) Status() string
Status returns HTTPResponse.Status
func (GetPublisherAttributionTagTemplateResp) StatusCode ¶
func (r GetPublisherAttributionTagTemplateResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPublisherMacroAttributionTagParams ¶
type GetPublisherMacroAttributionTagParams struct { // PublisherIds A list of publisher identifiers for which to request tags. PublisherIds []string `form:"publisherIds" json:"publisherIds"` // AdvertiserIds List of advertiser identifiers for which to request tags. // If no values are passed, all advertisers are returned. AdvertiserIds *[]string `form:"advertiserIds,omitempty" json:"advertiserIds,omitempty"` // AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account. AmazonAdvertisingAPIClientId string `json:"Amazon-Advertising-API-ClientId"` // AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` }
GetPublisherMacroAttributionTagParams defines parameters for GetPublisherMacroAttributionTag.
type GetPublisherMacroAttributionTagResp ¶
type GetPublisherMacroAttributionTagResp struct { Body []byte HTTPResponse *http.Response JSON200 *AttributionTagResponse JSON400 *MaaSError JSON401 *MaaSError JSON403 *MaaSError JSON429 *MaaSError JSON500 *MaaSError }
func ParseGetPublisherMacroAttributionTagResp ¶
func ParseGetPublisherMacroAttributionTagResp(rsp *http.Response) (*GetPublisherMacroAttributionTagResp, error)
ParseGetPublisherMacroAttributionTagResp parses an HTTP response from a GetPublisherMacroAttributionTagWithResponse call
func (GetPublisherMacroAttributionTagResp) Status ¶
func (r GetPublisherMacroAttributionTagResp) Status() string
Status returns HTTPResponse.Status
func (GetPublisherMacroAttributionTagResp) StatusCode ¶
func (r GetPublisherMacroAttributionTagResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPublishersParams ¶
type GetPublishersParams struct { // AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account. AmazonAdvertisingAPIClientId string `json:"Amazon-Advertising-API-ClientId"` // AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` }
GetPublishersParams defines parameters for GetPublishers.
type GetPublishersResp ¶
type GetPublishersResp struct { Body []byte HTTPResponse *http.Response JSON200 *PublishersResponse }
func ParseGetPublishersResp ¶
func ParseGetPublishersResp(rsp *http.Response) (*GetPublishersResp, error)
ParseGetPublishersResp parses an HTTP response from a GetPublishersWithResponse call
func (GetPublishersResp) Status ¶
func (r GetPublishersResp) Status() string
Status returns HTTPResponse.Status
func (GetPublishersResp) StatusCode ¶
func (r GetPublishersResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type MaaSError ¶
type MaaSError struct { // Code The HTTP status code of the response. Possible value of code is "200", "207", "400", "401", "429", "403", or "500". Code *string `json:"code,omitempty"` // Details A human-readable description of the response. Details *string `json:"details,omitempty"` }
MaaSError The error response object.
type Publisher ¶
type Publisher struct { // Id The identifier of a publisher. Id *string `json:"id,omitempty"` // MacroEnabled Set to 'true' if Amazon Attribution provides macro tags for the given publisher. MacroEnabled *bool `json:"macroEnabled,omitempty"` // Name The name of the publisher. Name *string `json:"name,omitempty"` }
Publisher defines model for Publisher.
type PublishersResponse ¶
type PublishersResponse struct { // Publishers A list of publishers. Publishers *[]Publisher `json:"publishers,omitempty"` }
PublishersResponse defines model for PublishersResponse.
type ReportEntry ¶
type ReportEntry struct { // AdGroupId An ad group external identifier. Applies to `PERFORMANCE` and `PRODUCTS` reportType. AdGroupId *string `json:"adGroupId,omitempty"` // AdvertiserName Name of advertiser. Applies to `PERFORMANCE` and `PRODUCTS` reportType. AdvertiserName *string `json:"advertiserName,omitempty"` // BrandName Name of the advertiser's brand. Applies only to `PRODUCTS` reportType. BrandName *string `json:"brandName,omitempty"` // CampaignId A campaign external identifier. Applies to `PERFORMANCE` and `PRODUCTS` reportType. CampaignId *string `json:"campaignId,omitempty"` // CreativeId A creative external identifier. Applies only to `PERFORMANCE` reportType CreativeId *string `json:"creativeId,omitempty"` // Date Date on which the events took place. Applies to `PERFORMANCE` and `PRODUCTS` reportType. Date *string `json:"date,omitempty"` // Marketplace The Amazon-owned site the product is sold on. Applies only to `PRODUCTS` reportType. Marketplace *string `json:"marketplace,omitempty"` // ProductAsin A unique block of letters and/or numbers that identify all products sold on Amazon. Applies only to `PRODUCTS` reportType. ProductAsin *string `json:"productAsin,omitempty"` // ProductCategory A classification for the type of product being sold which determines its place in the Amazon retail catalog. Contains categories of products. Applies only to `PRODUCTS` reportType. ProductCategory *string `json:"productCategory,omitempty"` // ProductConversionType The conversion type describes whether the conversion happened on a promoted or a brand halo ASIN. Applies only to `PRODUCTS` reportType. ProductConversionType *string `json:"productConversionType,omitempty"` // ProductGroup A distinct product grouping distinguishing products like watches from video games from toys. Contains groups of products. Applies only to `PRODUCTS` reportType. ProductGroup *string `json:"productGroup,omitempty"` // ProductName The name of the product. Applies only to `PRODUCTS` reportType. ProductName *string `json:"productName,omitempty"` // ProductSubcategory A classification for the type of product being sold which determines its place in the Amazon retail catalog. Contains subcategories of products. Applies only to `PRODUCTS` reportType ProductSubcategory *string `json:"productSubcategory,omitempty"` // Publisher The publisher name. Applies to `PERFORMANCE` and `PRODUCTS` reportType Publisher *string `json:"publisher,omitempty"` }
ReportEntry Report entry object in GetReport reports list.
type ReportRequestBody ¶
type ReportRequestBody struct { // AdvertiserIds One or more advertiser Ids to filter reporting by. If requesting reporting for multiple advertiser Ids, input via a comma-delimited list. AdvertiserIds *string `json:"advertiserIds,omitempty"` // Count The number of entries to include in the report. Count *int `json:"count,omitempty"` // CursorId The value of `cursorId` must be set to `null` without `""`, or set to `""` for the first request. For each following request, the value of `cursorId` from the previous response must be included in the current request. Note that for the cursorId values the `"` character must be escaped with `\`. CursorId *string `json:"cursorId,omitempty"` // EndDate The end date for the report, form as "YYYYMMDD" EndDate *string `json:"endDate,omitempty"` // GroupBy For Performance report only - controls level of aggregation. Value can be `CAMPAIGN`, `ADGROUP`, or `CREATIVE`. Default is `CREATIVE`. GroupBy *ReportRequestBodyGroupBy `json:"groupBy,omitempty"` // Metrics A comma-delimited list of metrics to include in the report. In the report, each metric’s value reflects the events which took place on the row’s date; in other words, events are reported on the date they occurred, not on the date of the attributed click. Attribution is calculated using a 14-day last-click model. For more detail on attribution methodology, see the [Measurement](https://advertising.amazon.com/API/docs/en-us/amazon-attribution/how-to#measurement) section of the API guide. View the list of available metrics for each report type below."Promoted products" refers to products associated with the campaign. // |Metrics for reportType`PERFORMANCE`| // |-------------------| // // |Metric |Description| // |--------|-----------| // |Click-throughs|Ad clicks.| // |attributedDetailPageViewsClicks14d|Ad click-attributed detail page views for promoted product.| // |attributedAddToCartClicks14d|Ad click-attributed add to carts for promoted products.| // |attributedPurchases14d|Ad click-attributed purchases for promoted products.| // |unitsSold14d|Ad click-attributed units sold for promoted products.| // |attributedSales14d|Ad click-attributed sales for promoted products in local currency.| // |attributedTotalDetailPageViewsClicks14d|Ad click-attributed detail page views for promoted products plus brand halo products.| // |attributedTotalAddToCartClicks14d|Ad click-attributed add to carts for promoted products plus brand halo products.| // |attributedTotalPurchases14d|Ad click-attributed purchases for promoted products plus brand halo products.| // |totalUnitsSold14d|Ad click-attributed units sold for promoted products plus brand halo products.| // |totalAttributedSales14d|Ad click-attributed attributed sales for promoted products plus brand halo products.| // |brb_bonus_amount|Estimated ad-attributed Brand Referral Bonus credit amount in local currency. Will be omitted from response if advertiser is not a BRB-enrolled seller or request does not include a ‘metrics’ list. Requests for this metric must groupBy ADGROUP or CAMPAIGN, or will result in an error 400. Please refer to <https://sellercentral.amazon.com/gp/help/external/L9HPJ34VBFP76HX> to learn more about BRB program.| // |kindleEditionNormalizedPagesRead14d| Number of attributed Kindle edition pages read within 14 days of ad click.| // |kindleEditionNormalizedPagesRoyalties14d|The estimated royalties of attributed estimated Kindle edition normalized pages within 14 days of ad click.| // // |Metrics for reportType`PRODUCTS`| // |-------------------| // // |Metric |Description| // |--------|-----------| // |attributedDetailPageViewsClicks14d|Ad click-attributed detail page views for promoted products.| // |attributedAddToCartClicks14d|Ad click-attributed add to carts for promoted products.| // |attributedPurchases14d|Ad click-attributed purchases for promoted products.| // |unitsSold14d|Ad click-attributed units sold for promoted products.| // |attributedSales14d|Ad click-attributed sales for promoted products in local currency.| // |brandHaloDetailPageViewsClicks14d|Ad click-attributed detail page views for brand halo products.| // |brandHaloAttributedAddToCartClicks14d|Ad click-attributed add to carts for brand halo products.| // |brandHaloAttributedPurchases14d|Ad click-attributed purchases for brand halo products.| // |brandHaloUnitsSold14d|Ad click-attributed units sold for brand halo products.| // |brandHaloAttributedSales14d|Ad click-attributed attributed sales for brand halo products.| // |attributedNewToBrandPurchases14d|Ad click-attributed new-to-brand purchases for promoted products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| // |attributedNewToBrandUnitsSold14d|Ad click-attributed units sold in new-to-brand purchases for promoted products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| // |attributedNewToBrandSales14d|Ad click-attributed sales of new-to-brand purchases for promoted products in local currency. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| // |brandHaloNewToBrandPurchases14d|Ad click-attributed new-to-brand purchases for brand halo products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| // |brandHaloNewToBrandUnitsSold14d|Ad click-attributed units sold in new-to-brand purchases for brand halo products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| // |brandHaloNewToBrandSales14d|Ad click-attributed sales of new-to-brand purchases for brand halo products in local currency. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| // |kindleEditionNormalizedPagesRead14d| The no of pages read attributed to ad click-throughs within 14 days.| // |kindleEditionNormalizedPagesRoyalties14d|The estimated royalties of attributed estimated Kindle edition normalized pages within 14 days of ad click.| Metrics *string `json:"metrics,omitempty"` // ReportType The type of report. Either `PERFORMANCE` or `PRODUCTS`. It is an optional parameter. If not used in request body, default reportType is `PERFORMANCE`. ReportType *string `json:"reportType,omitempty"` // StartDate The start date for the report, in "YYYYMMDD" format. For reportType `PRODUCTS`, startDate can only be within last 90 days from current date. StartDate *string `json:"startDate,omitempty"` }
ReportRequestBody Report request body. Two types of reports are available: Performance or Products - choose by including the `reportType` property. Performance report may be aggregated at any of three levels: campaign, ad group, or creative - choose by including the `groupBy` property. Products report is always aggregated at ad group level - when requesting a Products report, do not include the `groupBy` property or an error will occur.
Pagination is recommended - include the `count` and `cursorId` properties.
Pass a list of metrics to control which metrics appear in the response, or omit this list to receive all available metrics (except brb_bonus_amount).
Dimensions available within each report type and aggregation level: | reportType | groupBy | Dimensions| |-------------|-------------------|-----------| |PERFORMANCE|CREATIVE|campaignId, adgroupId, creativeid, publisher| |PERFORMANCE|ADGROUP|campaignId, adgroupId, publisher| |PERFORMANCE|CAMPAIGN|campaignId| |PRODUCTS|N/A|campaignId, adgroupId, publisher, productName, productGroup, productCategory, productSubcategory, brandName, productAsin, productConversionType| Example requests: ```
# PerformanceReportGroupedAtCampaignLevel { "reportType": "PERFORMANCE", "endDate": "20220601", "count": 1000, "startDate": "20220525", "groupBy":"CAMPAIGN" } # ProductsReport { "reportType": "PRODUCTS", "endDate": "20220601", "count": 1000, "startDate": "20220525" }
```
type ReportRequestBodyGroupBy ¶
type ReportRequestBodyGroupBy string
ReportRequestBodyGroupBy For Performance report only - controls level of aggregation. Value can be `CAMPAIGN`, `ADGROUP`, or `CREATIVE`. Default is `CREATIVE`.
const ( ADGROUP ReportRequestBodyGroupBy = "ADGROUP" CAMPAIGN ReportRequestBodyGroupBy = "CAMPAIGN" CREATIVE ReportRequestBodyGroupBy = "CREATIVE" )
Defines values for ReportRequestBodyGroupBy.
type ReportResponse ¶
type ReportResponse struct { // CursorId The identifier of the pagination cursor. CursorId *string `json:"cursorId,omitempty"` Reports *[]ReportEntry `json:"reports,omitempty"` // Size The size of the report. Size *int `json:"size,omitempty"` }
ReportResponse defines model for ReportResponse.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function