{"openapi":"3.0.0","info":{"version":"1.0.0","title":""},"paths":{"/billing/paymentMethods":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","x-amazon-advertising-product":"Advertising Billing","x-amazon-advertising-stage":["beta","gamma","prod"],"get":{"x-advertising-documentation-access-control":"1p","operationId":"getPaymentMethods","tags":["Payment Method"],"summary":"Retrieves the list of active payment-methods of an advertising entity","parameters":[{"$ref":"#/components/parameters/API-ClientId"},{"$ref":"#/components/parameters/API-Scope"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentMethodsResponse"}}}},"400":{"description":"Bad Request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"401":{"description":"Unauthorized. The request failed because the user is not authenticated or is not allowed to invoke the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"403":{"description":"Forbidden. The request failed because user does not have access to a specified resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"422":{"description":"Unprocessable entity. The server understood the request, but was unable to process the instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"429":{"description":"Too Many Requests. The request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"500":{"description":"Internal Server Error. Something went wrong on the server. Retry later and report an error if unresolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}}}}},"/billing/promotions":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","x-amazon-advertising-product":"Advertising Billing","x-amazon-advertising-stage":["beta","gamma","prod"],"get":{"x-advertising-documentation-access-control":"1p","operationId":"getPromotions","tags":["Promotions"],"summary":"Retrieves the list of redeemed promotions of an advertising entity","parameters":[{"$ref":"#/components/parameters/API-ClientId"},{"$ref":"#/components/parameters/API-Scope"},{"name":"pageSize","in":"query","description":"Represents the size of the page","schema":{"type":"integer","default":50,"minimum":10,"maximum":100}},{"name":"pageNumber","in":"query","description":"Represents the number of the page","schema":{"type":"integer","default":1,"minimum":1}},{"name":"sortBy","in":"query","description":"Represents the field name to be sorted","schema":{"type":"string","enum":["type","status","startDate","endDate","awardedAmount","balanceAmount"],"default":"startDate"}},{"name":"sortOrder","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Represents the sorting order\n * `asc`: - Ascending \n * `desc`: - Descending"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPromotionsResponse"}}}},"400":{"description":"Bad Request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"401":{"description":"Unauthorized. The request failed because the user is not authenticated or is not allowed to invoke the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"403":{"description":"Forbidden. The request failed because user does not have access to a specified resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"422":{"description":"Unprocessable entity. The server understood the request, but was unable to process the instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"429":{"description":"Too Many Requests. The request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"500":{"description":"Internal Server Error. Something went wrong on the server. Retry later and report an error if unresolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}}}}},"/billing/summaries":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","x-amazon-advertising-product":"Advertising Billing","x-amazon-advertising-stage":["beta","gamma","prod"],"get":{"x-advertising-documentation-access-control":"1p","operationId":"getBillingSummaries","tags":["Billing Summary"],"summary":"Represents the model of summarised billing information of advertising entity","parameters":[{"$ref":"#/components/parameters/API-ClientId"},{"$ref":"#/components/parameters/API-Scope"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBillingSummariesResponse"}}}},"400":{"description":"Bad Request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"401":{"description":"Unauthorized. The request failed because the user is not authenticated or is not allowed to invoke the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"403":{"description":"Forbidden. The request failed because user does not have access to a specified resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"422":{"description":"Unprocessable entity. The server understood the request, but was unable to process the instruction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"429":{"description":"Too Many Requests. The request was rate-limited. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}},"500":{"description":"Internal Server Error. Something went wrong on the server. Retry later and report an error if unresolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingErrorResponse"}}}}}}}},"components":{"parameters":{"API-ClientId":{"name":"Amazon-Advertising-API-ClientId","in":"header","description":"The identifier of a client associated with a \"Login with Amazon\" account. This is a required header for advertisers and integrators using the Advertising API.","required":true,"schema":{"type":"string"}},"API-Scope":{"name":"Amazon-Advertising-API-Scope","in":"header","description":"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. This is a required header for advertisers and integrators using the Advertising API.","required":true,"schema":{"type":"string"}}},"schemas":{"InvoiceStatus":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"string","title":"Invoice Status","description":"* `ISSUED`: An invoice is issued when its charges are finalized and tax is computed on the total amount. \n* `PAID_IN_PART`: When a partial payment is received, the invoice status will change to paid in part.\n* `PAID_IN_PART`: One full payment has been received, the invoice will be paid in full.\n* `WRITTEN_OFF`: If an invoice is written off because of an error, the status will be updated to written off.\n","enum":["ISSUED","PAID_IN_PART","PAID_IN_FULL","WRITTEN_OFF"]},"Date":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"string","description":"Date in YYYYMMDD format"},"InvoiceSummary":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","title":"Invoice Summary","type":"object","required":["id","status","paymentMethod","purchaseOrderNumber","fromDate","toDate","invoiceDate","dueDate","amountDue","taxAmountDue","remainingAmountDue","remainingTaxAmountDue"],"properties":{"id":{"type":"string","title":"Invoice Id"},"status":{"$ref":"#/components/schemas/InvoiceStatus"},"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"},"purchaseOrderNumber":{"type":"string","title":"Sponsored Ads only. Account-level purchase order number."},"fromDate":{"$ref":"#/components/schemas/Date"},"toDate":{"$ref":"#/components/schemas/Date"},"invoiceDate":{"$ref":"#/components/schemas/Date"},"dueDate":{"$ref":"#/components/schemas/Date"},"amountDue":{"$ref":"#/components/schemas/BillingCurrency"},"taxAmountDue":{"$ref":"#/components/schemas/BillingCurrency"},"remainingAmountDue":{"$ref":"#/components/schemas/BillingCurrency"},"remainingTaxAmountDue":{"$ref":"#/components/schemas/BillingCurrency"}}},"BillingSummary":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Represents the object model of a billing summary","properties":{"entityIdentifier":{"$ref":"#/components/schemas/EntityIdentifier"},"totalAmountDue":{"$ref":"#/components/schemas/BillingCurrency"},"accumulatedCharges":{"$ref":"#/components/schemas/BillingCurrency"},"paymentMethods":{"$ref":"#/components/schemas/PaymentMethods"},"activePromotions":{"type":"array","description":"A list of promotions redeemed by this entity which are currently active","items":{"$ref":"#/components/schemas/Promotion"},"maxItems":5},"unpaidInvoiceSummaries":{"type":"array","description":"Represents the unpaid invoices of this advertising entity","items":{"$ref":"#/components/schemas/InvoiceSummary"},"maxItems":25}}},"GetBillingSummariesResponse":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Object model of a billing summaries response","properties":{"summaries":{"type":"array","items":{"$ref":"#/components/schemas/BillingSummary"}}}},"BillingCurrency":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","properties":{"value":{"type":"number","description":"Represent the value of the currency"},"currencyCode":{"type":"string","description":"Represents a three digit counrty code. It follows the ISO-4217 standard","example":"USD"}}},"PromotionDuration":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","properties":{"startDate":{"type":"string","description":"Represents the date when the promotion will be available for consumption. It takes the format YYYYMMDD","example":"20201201"},"endDate":{"type":"string","description":"Represents the date when the promotion will be expired. It takes the format YYYYMMDD","example":"20201225"}}},"Promotion":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Represents a redeemed promotion","properties":{"entityIdentifier":{"$ref":"#/components/schemas/EntityIdentifier"},"promotionDetails":{"type":"object","description":"Represents the detailed model of a redeemed promotion","properties":{"id":{"type":"string","description":"Identifier of the promotion"},"type":{"type":"string","description":"Type of the promotion"},"status":{"type":"string","description":"Status of the promotion","enum":["Expired","Spent","Future","Active"]},"description":{"type":"string","description":"A human-readable description of a promotion"},"promoCode":{"type":"string","description":"Redeemed promo code of this promotion"},"amount":{"type":"object","properties":{"awarded":{"allOf":[{"$ref":"#/components/schemas/BillingCurrency"},{"description":"Amount awarded for this promotion"}]},"consumed":{"allOf":[{"$ref":"#/components/schemas/BillingCurrency"},{"description":"Amount consumed by advertising"}]},"balance":{"allOf":[{"$ref":"#/components/schemas/BillingCurrency"},{"description":"Remaining balance available to spend"}]}}},"duration":{"$ref":"#/components/schemas/PromotionDuration"}}}}},"GetPromotionsResponse":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","properties":{"promotions":{"type":"array","description":"A list of promotions redeemed by this entity","items":{"$ref":"#/components/schemas/Promotion"},"maxItems":100}}},"PaymentMethods":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"array","description":"A list of payment methods associated with this entity","items":{"anyOf":[{"$ref":"#/components/schemas/CreditCard"},{"$ref":"#/components/schemas/DirectDebit"},{"$ref":"#/components/schemas/UnifiedBilling"},{"$ref":"#/components/schemas/DeductFromPayment"},{"$ref":"#/components/schemas/ElectronicFundsTransfer"}],"discriminator":{"propertyName":"name","mapping":{"CREDIT_CARD":"#/components/schemas/CreditCard","ELECTRONIC_FUNDS_TRANSFER":"#/components/schemas/ElectronicFundsTransfer","DEDUCT_FROM_PAYMENT":"#/components/schemas/DeductFromPayment","UNIFIED_BILLING":"#/components/schemas/UnifiedBilling","DIRECT_DEBIT":"#/components/schemas/DirectDebit"}},"maxItems":25}},"GetPaymentMethodsResponse":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","properties":{"paymentMethods":{"$ref":"#/components/schemas/PaymentMethods"}}},"EntityType":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"string","description":"Represents the advertising entity type","enum":["ACCOUNT"]},"BaseEntityIdentifier":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Represents a basic identifier of an advertising entity ","properties":{"entityType":{"$ref":"#/components/schemas/EntityType"}}},"AccountEntityIdentifier":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","allOf":[{"$ref":"#/components/schemas/BaseEntityIdentifier"},{"type":"object","properties":{"accountId":{"type":"string","description":"Identifier of the Amazon advertising account"},"marketplaceId":{"type":"string","description":"Identifier of the marketplace"}}}]},"EntityIdentifier":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Identifier of the Advertising entity","oneOf":[{"$ref":"#/components/schemas/AccountEntityIdentifier"}],"discriminator":{"propertyName":"entityType","mapping":{"ACCOUNT":"#/components/schemas/AccountEntityIdentifier"}}},"PaymentMethod":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","properties":{"entityIdentifier":{"$ref":"#/components/schemas/EntityIdentifier"},"name":{"type":"string","description":"Name of the payment method","enum":["CREDIT_CARD","ELECTRONIC_FUNDS_TRANSFER","DEDUCT_FROM_PAYMENT","UNIFIED_BILLING","DIRECT_DEBIT"]}}},"CreditCard":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"type":"object","description":"Represents the credit card associated with this entity","properties":{"details":{"$ref":"#/components/schemas/CreditCardDetails"}}}]},"DirectDebit":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"type":"object","description":"Represents the direct debit payment method to pay advertising charges","properties":{"details":{"$ref":"#/components/schemas/DirectDebitDetails"}}}]},"UnifiedBilling":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"type":"object","description":"Represents the linked seller account to pay the advertising charges"}]},"ElectronicFundsTransfer":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"type":"object","description":"Represents the electronic fund transfer as payment method to pay the advertising charges"}]},"DeductFromPayment":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"type":"object","description":"Represents the deduct from payment as payment method to pay the advertising charges","properties":{"details":{"$ref":"#/components/schemas/DeductFromPaymentDetails"}}}]},"DeductFromPaymentDetails":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Deduct from payment account details","properties":{"vendorCode":{"type":"string","description":"Represents the vendor code linked with this payment method"},"vendorCodeGroupName":{"type":"string","description":"Represents the group name of the linked vendor code."}}},"DirectDebitDetails":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Bank account details","properties":{"tail":{"type":"integer","description":"Last 3 digits of the account","format":"int32"}}},"CreditCardDetails":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Credit card details","properties":{"issuer":{"type":"string","description":"Issuer of the card"},"tail":{"type":"integer","description":"Last 4 digits of the card","format":"int32"},"validity":{"$ref":"#/components/schemas/CardValidity"}}},"CardValidity":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"Represents the validity of the card","properties":{"month":{"type":"integer","format":"int32","description":"Represents the month starting from January through December.","minimum":1,"maximum":12},"year":{"type":"integer","format":"int32","description":"Represents the year in the format-YYYY For e.g-2020"}}},"BillingErrorResponse":{"x-amazon-advertising-package":"AdvertisingBillingAPISwagger","type":"object","description":"The Error Response Object.","properties":{"code":{"type":"string","description":"An enumerated error code for machine use."},"details":{"type":"string","description":"A human-readable description of the response."}}}}}}