selling-partner-api-models/models/product-fees-api-model/productFeesV0.json

803 lines
27 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing.",
"version": "v0",
"title": "Selling Partner API for Product Fees V0 Model",
"contact": {
"name": "Selling Partner API Test Support",
"url": "https://github.com/amzn/amazon-marketplace-api-sdk/issues",
"email": "marketplaceapitest@amazon.com"
},
"license": {
"name": "Amazon Software License",
"url": "https://aws.amazon.com/asl/"
}
},
"host": "sellingpartnerapi-na.amazon.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/products/fees/v0/listings/{SellerSKU}/feesEstimate": {
"post": {
"tags": [
"fees"
],
"description": "Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body.\n\nYou can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request.",
"operationId": "getMyFeesEstimateForSKU",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateRequest"
}
},
{
"name": "SellerSKU",
"in": "path",
"description": "Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "Success.",
"x-amazon-spds-sandbox-behaviors": [
{
"request": {
"parameters": {
"body": {
"value": {
"FeesEstimateRequest": {
"MarketplaceId": "ATVPDKIKX0DER",
"IsAmazonFulfilled": false,
"PriceToEstimateFees": {
"ListingPrice": {
"CurrencyCode": "USD",
"Amount": 10
},
"Shipping": {
"CurrencyCode": "USD",
"Amount": 10
},
"Points": {
"PointsNumber": 0,
"PointsMonetaryValue": {
"CurrencyCode": "USD",
"Amount": 0
}
}
},
"Identifier": "UmaS1"
}
}
}
}
},
"response": {
"payload": {
"FeesEstimateResult": {
"Status": "Success",
"FeesEstimateIdentifier": {
"MarketplaceId": "ATVPDKIKX0DER",
"IdType": "ASIN",
"SellerId": "A3TH9S8BH6GOGM",
"SellerInputIdentifier": "UmaS1",
"IsAmazonFulfilled": false,
"IdValue": "B00V5DG6IQ",
"PriceToEstimateFees": {
"ListingPrice": {
"CurrencyCode": "USD",
"Amount": 10
},
"Shipping": {
"CurrencyCode": "USD",
"Amount": 10
},
"Points": {
"PointsNumber": 0,
"PointsMonetaryValue": {
"CurrencyCode": "USD",
"Amount": 0
}
}
}
},
"FeesEstimate": {
"TimeOfFeesEstimation": "Mon Oct 28 18:49:32 UTC 2019",
"TotalFeesEstimate": {
"CurrencyCode": "USD",
"Amount": 3.0
},
"FeeDetailList": []
},
"Error": {
"Type": "",
"Code": "",
"Message": "",
"Detail": []
}
}
}
}
}
],
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"400": {
"description": "Request has missing or invalid parameters and cannot be parsed.",
"x-amazon-spds-sandbox-behaviors": [
{
"request": {
"parameters": {
"body": {
"value": {
"FeesEstimateRequest": {
"MarketplaceId": "WRNGMRKTPLCE"
}
}
}
}
},
"response":{
"errors": [
{
"code": "InvalidInput",
"message": "Incorrect Marketplace ID.",
"details": ""
}
]
}
}
],
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"401": {
"description": "The request's Authorization header is not formatted correctly or does not contain a valid token.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"403": {
"description": "Indicates access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"404": {
"description": "The specified resource does not exist.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"429": {
"description": "The frequency of requests was greater than allowed.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"500": {
"description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"503": {
"description": "Temporary overloading or maintenance of the server.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
}
}
},
"parameters": []
},
"/products/fees/v0/items/{Asin}/feesEstimate": {
"post": {
"tags": [
"fees"
],
"description": "Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body.\n\nYou can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request.",
"operationId": "getMyFeesEstimateForASIN",
"parameters": [
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateRequest"
}
},
{
"name": "Asin",
"in": "path",
"description": "The Amazon Standard Identification Number (ASIN) of the item.",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "Success.",
"x-amazon-spds-sandbox-behaviors": [
{
"request": {
"parameters": {
"body": {
"value": {
"FeesEstimateRequest": {
"MarketplaceId": "ATVPDKIKX0DER",
"IsAmazonFulfilled": false,
"PriceToEstimateFees": {
"ListingPrice": {
"CurrencyCode": "USD",
"Amount": 10
},
"Shipping": {
"CurrencyCode": "USD",
"Amount": 10
},
"Points": {
"PointsNumber": 0,
"PointsMonetaryValue": {
"CurrencyCode": "USD",
"Amount": 0
}
}
},
"Identifier": "UmaS1"
}
}
}
}
},
"response": {
"payload": {
"FeesEstimateResult": {
"Status": "Success",
"FeesEstimateIdentifier": {
"MarketplaceId": "ATVPDKIKX0DER",
"IdType": "ASIN",
"SellerId": "A3TH9S8BH6GOGM",
"SellerInputIdentifier": "UmaS1",
"IsAmazonFulfilled": false,
"IdValue": "B00V5DG6IQ",
"PriceToEstimateFees": {
"ListingPrice": {
"CurrencyCode": "USD",
"Amount": 10
},
"Shipping": {
"CurrencyCode": "USD",
"Amount": 10
},
"Points": {
"PointsNumber": 0,
"PointsMonetaryValue": {
"CurrencyCode": "USD",
"Amount": 0
}
}
}
},
"FeesEstimate": {
"TimeOfFeesEstimation": "Mon Oct 28 18:49:32 UTC 2019",
"TotalFeesEstimate": {
"CurrencyCode": "USD",
"Amount": 3.0
},
"FeeDetailList": []
},
"Error": {
"Type": "",
"Code": "",
"Message": "",
"Detail": []
}
}
}
}
}
],
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"400": {
"description": "Request has missing or invalid parameters and cannot be parsed.",
"x-amazon-spds-sandbox-behaviors": [
{
"request": {
"parameters": {
"body": {
"value": {
"FeesEstimateRequest": {
"MarketplaceId": "WRNGMRKTPLCE"
}
}
}
}
},
"response":{
"errors": [
{
"code": "InvalidInput",
"message": "Incorrect Marketplace ID.",
"details": ""
}
]
}
}
],
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"401": {
"description": "The request's Authorization header is not formatted correctly or does not contain a valid token.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"403": {
"description": "Indicates access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"404": {
"description": "The specified resource does not exist.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"429": {
"description": "The frequency of requests was greater than allowed.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"500": {
"description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
},
"503": {
"description": "Temporary overloading or maintenance of the server.",
"schema": {
"$ref": "#/definitions/GetMyFeesEstimateResponse"
},
"headers": {
"x-amzn-RequestId": {
"type": "string",
"description": "Unique request reference ID."
}
}
}
}
},
"parameters": []
}
},
"definitions": {
"GetMyFeesEstimateRequest": {
"description": "Request schema.",
"type": "object",
"properties": {
"FeesEstimateRequest": {
"$ref": "#/definitions/FeesEstimateRequest"
}
}
},
"FeesEstimateRequest": {
"type": "object",
"required": ["MarketplaceId", "PriceToEstimateFees", "Identifier"],
"properties": {
"MarketplaceId": {
"description": "A marketplace identifier.",
"type": "string"
},
"IsAmazonFulfilled": {
"description": "When true, the offer is fulfilled by Amazon.",
"type": "boolean"
},
"PriceToEstimateFees": {
"description": "The product price that the fee estimate is based on.",
"$ref": "#/definitions/PriceToEstimateFees"
},
"Identifier": {
"description": "The product price on which the fee estimate is based.",
"type": "string"
}
}
},
"GetMyFeesEstimateResponse": {
"type": "object",
"properties": {
"payload": {
"description": "The payload for the getMyFeesEstimate operation.",
"$ref": "#/definitions/GetMyFeesEstimateResult"
},
"errors": {
"description": "One or more unexpected errors occurred during the getMyFeesEstimate operation.",
"$ref": "#/definitions/ErrorList"
}
}
},
"GetMyFeesEstimateResult": {
"description": "Response schema.",
"type": "object",
"properties": {
"FeesEstimateResult": {
"description": "The item's estimated fees.",
"$ref": "#/definitions/FeesEstimateResult"
}
}
},
"Points": {
"type": "object",
"properties": {
"PointsNumber": {
"type": "integer",
"format": "int32"
},
"PointsMonetaryValue": {
"$ref": "#/definitions/MoneyType"
}
}
},
"ErrorList": {
"type": "array",
"description": "A comma-delimited list of error responses returned when a request is unsuccessful.",
"items": {
"$ref": "#/definitions/Error"
}
},
"Error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "An error code that identifies the type of error that occurred."
},
"message": {
"type": "string",
"description": "A message that describes the error condition in a human-readable form."
},
"details": {
"type": "string",
"description": "Additional information that can help the caller understand or fix the issue."
}
}
},
"FeesEstimateResult": {
"description": "An item identifier and the estimated fees for the item.",
"type": "object",
"properties": {
"Status": {
"description": "The status of the fee request. Status values: Success, ClientError, ServiceError.",
"type": "string"
},
"FeesEstimateIdentifier": {
"description": "Information used to identify a fees estimate request.",
"$ref": "#/definitions/FeesEstimateIdentifier"
},
"FeesEstimate": {
"description": "The total estimated fees for an item and a list of details.",
"$ref": "#/definitions/FeesEstimate"
},
"Error": {
"description": "An Error object with a Type, Code, and Message.",
"$ref": "#/definitions/FeesEstimateError"
}
}
},
"FeesEstimateIdentifier": {
"description": "An item identifier, marketplace, time of request, and other details that identify an estimate.",
"type": "object",
"properties": {
"MarketplaceId": {
"description": "A marketplace identifier.",
"type": "string"
},
"SellerId": {
"description": "The seller identifier.",
"type": "string"
},
"IdType": {
"description": "The type of item identifier specified.",
"type": "string"
},
"IdValue": {
"description": "The item identifier.",
"type": "string"
},
"IsAmazonFulfilled": {
"description": "When true, the offer is fulfilled by Amazon.",
"type": "boolean"
},
"PriceToEstimateFees": {
"description": "The item price on which the fee estimate is based.",
"$ref": "#/definitions/PriceToEstimateFees"
},
"SellerInputIdentifier": {
"description": "A unique identifier provided by the caller to track this request.",
"type": "string"
}
}
},
"PriceToEstimateFees": {
"description": "Price information for an item, used to estimate fees.",
"type": "object",
"required": [
"ListingPrice"
],
"properties": {
"ListingPrice": {
"description": "The price of the item.",
"$ref": "#/definitions/MoneyType"
},
"Shipping": {
"description": "The shipping cost.",
"$ref": "#/definitions/MoneyType"
},
"Points": {
"description": "The number of Amazon Points offered with the purchase of an item.",
"$ref": "#/definitions/Points"
}
}
},
"FeesEstimate": {
"description": "The total estimated fees for an item and a list of details.",
"type": "object",
"required": [
"TimeOfFeesEstimation"
],
"properties": {
"TimeOfFeesEstimation": {
"description": "The time for which the fees were estimated. This defaults to the time the request is made.",
"type": "string",
"format": "date-time"
},
"TotalFeesEstimate": {
"description": "Total estimated fees for a given item, price, and fulfillment channel.",
"$ref": "#/definitions/MoneyType"
},
"FeeDetailList": {
"$ref": "#/definitions/FeeDetailList"
}
}
},
"FeeDetailList": {
"description": "A comma-delimited list of other fees that contributes to a given fee.",
"type": "array",
"items": {
"$ref": "#/definitions/FeeDetail"
}
},
"FeesEstimateError": {
"description": "An unexpected error occurred during this operation.",
"type": "object",
"required": [
"Code",
"Detail",
"Message",
"Type"
],
"properties": {
"Type": {
"description": "An error type, identifying either the receiver or the sender as the originator of the error.",
"type": "string"
},
"Code": {
"description": "An error code that identifies the type of error that occurred.",
"type": "string"
},
"Message": {
"description": "A message that describes the error condition in a human-readable form.",
"type": "string"
},
"Detail": {
"$ref": "#/definitions/FeesEstimateErrorDetail"
}
}
},
"FeesEstimateErrorDetail": {
"description": "Additional information that can help the caller understand or fix the issue.",
"type": "array",
"items": {
"type": "object"
}
},
"FeeDetail": {
"description": "The type of fee, fee amount, and other details.",
"type": "object",
"required": [
"FeeType", "FeeAmount", "FinalFee"
],
"properties": {
"FeeType": {
"description": "The type of fee charged to a seller.",
"type": "string"
},
"FeeAmount": {
"description": "The amount charged for a given fee.",
"$ref": "#/definitions/MoneyType"
},
"FeePromotion": {
"description": "The promotion amount for a given fee.",
"$ref": "#/definitions/MoneyType"
},
"TaxAmount": {
"description": "The tax amount for a given fee.",
"$ref": "#/definitions/MoneyType"
},
"FinalFee": {
"description": "The final fee amount for a given fee.",
"$ref": "#/definitions/MoneyType"
},
"IncludedFeeDetailList": {
"$ref": "#/definitions/IncludedFeeDetailList"
}
}
},
"IncludedFeeDetailList": {
"description": "A comma-delimited list of other fees that contribute to a given fee.",
"type": "array",
"items": {
"$ref": "#/definitions/IncludedFeeDetail"
}
},
"IncludedFeeDetail": {
"description": "The type of fee, fee amount, and other details.",
"type": "object",
"required": [
"FeeType", "FeeAmount", "FinalFee"
],
"properties": {
"FeeType": {
"description": "The type of fee charged to a seller.",
"type": "string"
},
"FeeAmount": {
"description": "The amount charged for a given fee.",
"$ref": "#/definitions/MoneyType"
},
"FeePromotion": {
"description": "The promotion amount for a given fee.",
"$ref": "#/definitions/MoneyType"
},
"TaxAmount": {
"description": "The tax amount for a given fee.",
"$ref": "#/definitions/MoneyType"
},
"FinalFee": {
"description": "The final fee amount for a given fee.",
"$ref": "#/definitions/MoneyType"
}
}
},
"MoneyType": {
"type": "object",
"properties": {
"CurrencyCode": {
"description": "The currency code in ISO 4217 format.",
"type": "string"
},
"Amount": {
"description": "The monetary value.",
"type": "number"
}
}
}
}
}