#48 Added Amazon API model + sample response
This commit is contained in:
544
SampleResponses/AmazonProductAPIModel.json
Normal file
544
SampleResponses/AmazonProductAPIModel.json
Normal file
@@ -0,0 +1,544 @@
|
|||||||
|
{
|
||||||
|
"/products/2020-08-26/products/{productId}/offers": {
|
||||||
|
"get": {
|
||||||
|
"produces": ["application/json"],
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "The Amazon Standard Item Identifier (ASIN) for the product.",
|
||||||
|
"in": "path",
|
||||||
|
"name": "productId",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The region where the customer wants to purchase the product.",
|
||||||
|
"enum": ["DE", "FR", "UK", "IT", "ES", "US", "CA", "JP"],
|
||||||
|
"x-docgen-enum-table-extension": [
|
||||||
|
{
|
||||||
|
"value": "DE",
|
||||||
|
"description": "Germany"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "FR",
|
||||||
|
"description": "France"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "UK",
|
||||||
|
"description": "United Kingdom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "IT",
|
||||||
|
"description": "Italy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "ES",
|
||||||
|
"description": "Spain"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "US",
|
||||||
|
"description": "United States of America"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "CA",
|
||||||
|
"description": "Canada"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "JP",
|
||||||
|
"description": "Japan"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"in": "query",
|
||||||
|
"name": "productRegion",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "This field determines the region where to ship the product based on the value in the shippingPostalCode.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "shippingRegion",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The locale of the request, in the form of an IETF language tag. Each ProductRegion supports one or more locales. This value should comply with java.util.Locale.",
|
||||||
|
"pattern": "^[-_]+$",
|
||||||
|
"in": "query",
|
||||||
|
"name": "locale",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The shipping postal or zip code for customer's request. This parameter doesn't hold geocode.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "shippingPostalCode",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The zero-based number of the page being requested. If not specified, a default value of 0 will be used. When passed, the value must be equal or greater than zero, and less than the number of pages returned in the response.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "pageNumber",
|
||||||
|
"required": false,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The number of items desired for each page in the response. If not specified, a default value of 24 will be used. Maximum items that can be fetched in single request is 24.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "pageSize",
|
||||||
|
"required": false,
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "A value that identifies the group within the business account that a customer belongs to. The customer can set this in Amazon Business account information. GroupTag is necessary only if the customer account belongs to more than one group.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "groupTag",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collectionFormat": "csv",
|
||||||
|
"description": "A list of filter ids for use to query results.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "filterIds",
|
||||||
|
"required": false,
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The number of units the customer intends to purchase. This helps Amazon Business determines quantity-based discounts if an eligible offer is present. Defaults to 1.",
|
||||||
|
"in": "query",
|
||||||
|
"name": "quantity",
|
||||||
|
"required": false,
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The email address of the customer requesting this resource",
|
||||||
|
"in": "header",
|
||||||
|
"name": "x-amz-user-email",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collectionFormat": "csv",
|
||||||
|
"description": "A list specifying the offer fields for inclusion in the response object. Excluding this query parameter results in the response including all inclusions.",
|
||||||
|
"enum": [
|
||||||
|
"ALL",
|
||||||
|
"availability",
|
||||||
|
"buyingGuidance",
|
||||||
|
"buyingRestrictions",
|
||||||
|
"condition",
|
||||||
|
"fulfillmentType",
|
||||||
|
"merchant",
|
||||||
|
"price",
|
||||||
|
"productCondition",
|
||||||
|
"productConditionNote",
|
||||||
|
"quantityLimits",
|
||||||
|
"quantityPrice",
|
||||||
|
"taxExclusivePrice",
|
||||||
|
"deliveryInformation",
|
||||||
|
"listPrice",
|
||||||
|
"shippingOptions"
|
||||||
|
],
|
||||||
|
"in": "query",
|
||||||
|
"name": "inclusionsForOffers",
|
||||||
|
"required": false,
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-example": "/path?inclusionsForOffers=FOO,BAR"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Search success",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/OffersResult"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-amazon-spds-sandbox-behaviors": [
|
||||||
|
{
|
||||||
|
"request": {
|
||||||
|
"parameters": {
|
||||||
|
"productRegion": {
|
||||||
|
"value": "DE"
|
||||||
|
},
|
||||||
|
"locale": {
|
||||||
|
"value": "es_US"
|
||||||
|
},
|
||||||
|
"productId": {
|
||||||
|
"value": "B07VDJ5RVF"
|
||||||
|
},
|
||||||
|
"pageNumber": {
|
||||||
|
"value": "1"
|
||||||
|
},
|
||||||
|
"pageSize": {
|
||||||
|
"value": "12"
|
||||||
|
},
|
||||||
|
"filterIds": {
|
||||||
|
"value": ["NEW", "PRIME"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": {
|
||||||
|
"offerCount": 2,
|
||||||
|
"numberOfPages": 1,
|
||||||
|
"featuredOffer": {
|
||||||
|
"availability": "[availability]",
|
||||||
|
"buyingGuidance": "NONE",
|
||||||
|
"deliveryInformation": "[deliveryInformation]",
|
||||||
|
"fulfillmentType": "AMAZON_FULFILLMENT",
|
||||||
|
"offerId": "[offerId]",
|
||||||
|
"merchant": {
|
||||||
|
"name": "[merchantName]",
|
||||||
|
"merchantId": "[merchantId]",
|
||||||
|
"meanFeedbackRating": 5.0,
|
||||||
|
"totalFeedbackCount": 1
|
||||||
|
},
|
||||||
|
"price": {
|
||||||
|
"value": {
|
||||||
|
"amount": 1.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"priceType": "NEW"
|
||||||
|
},
|
||||||
|
"listPrice": {
|
||||||
|
"value": {
|
||||||
|
"amount": 2.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"priceType": "NEW"
|
||||||
|
},
|
||||||
|
"taxExclusivePrice": {
|
||||||
|
"taxExclusiveAmount": {
|
||||||
|
"amount": 1.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"displayString": "[taxExclusivePriceDisplayString]",
|
||||||
|
"label": "[taxExclusivePriceLabel]"
|
||||||
|
},
|
||||||
|
"quantityLimits": {
|
||||||
|
"minQuantity": 1,
|
||||||
|
"maxQuantity": 6
|
||||||
|
},
|
||||||
|
"quantityPrice": {
|
||||||
|
"quantityPriceTiers": [
|
||||||
|
{
|
||||||
|
"quantityDisplay": "string",
|
||||||
|
"unitPrice": {
|
||||||
|
"amount": 0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"minQuantity": 0,
|
||||||
|
"price": {
|
||||||
|
"value": {
|
||||||
|
"amount": 0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"priceType": "NEW"
|
||||||
|
},
|
||||||
|
"savingMessage": "string",
|
||||||
|
"taxExclusivePrice": {
|
||||||
|
"taxExclusiveAmount": {
|
||||||
|
"amount": 0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"displayString": "[taxExclusivePriceDisplayString]",
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"label": "[taxExclusivePriceLabel]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"productCondition": "NEW",
|
||||||
|
"productConditionNote": "[productConditionNote]",
|
||||||
|
"condition": {
|
||||||
|
"conditionValue": "NEW",
|
||||||
|
"conditionNote": "string",
|
||||||
|
"subCondition": "ACCEPTABLE"
|
||||||
|
},
|
||||||
|
"buyingRestrictions": [],
|
||||||
|
"shippingOptions": [
|
||||||
|
{
|
||||||
|
"shippingCost": {
|
||||||
|
"value": {
|
||||||
|
"amount": 9.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"deliveryRange": {
|
||||||
|
"max": "2022-01-01T00:00:01.000Z",
|
||||||
|
"min": "2022-01-01T00:00:01.000Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"offers": [
|
||||||
|
{
|
||||||
|
"offerId": "[offerId]",
|
||||||
|
"merchant": {
|
||||||
|
"name": "[merchantName]",
|
||||||
|
"merchantId": "[merchantId]",
|
||||||
|
"meanFeedbackRating": 5.0,
|
||||||
|
"totalFeedbackCount": 1
|
||||||
|
},
|
||||||
|
"deliveryInformation": "[deliveryInformation]",
|
||||||
|
"price": {
|
||||||
|
"value": {
|
||||||
|
"amount": 1.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"priceType": "NEW"
|
||||||
|
},
|
||||||
|
"listPrice": {
|
||||||
|
"value": {
|
||||||
|
"amount": 2.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"priceType": "NEW"
|
||||||
|
},
|
||||||
|
"taxExclusivePrice": {
|
||||||
|
"taxExclusiveAmount": {
|
||||||
|
"amount": 1.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"displayString": "[taxExclusivePriceDisplayString]",
|
||||||
|
"label": "[taxExclusivePriceLabel]"
|
||||||
|
},
|
||||||
|
"quantityLimits": {
|
||||||
|
"minQuantity": 1,
|
||||||
|
"maxQuantity": 6
|
||||||
|
},
|
||||||
|
"quantityPrice": {
|
||||||
|
"quantityPriceTiers": [
|
||||||
|
{
|
||||||
|
"quantityDisplay": "string",
|
||||||
|
"unitPrice": {
|
||||||
|
"amount": 0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"minQuantity": 0,
|
||||||
|
"price": {
|
||||||
|
"value": {
|
||||||
|
"amount": 0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"priceType": "NEW"
|
||||||
|
},
|
||||||
|
"savingMessage": "string",
|
||||||
|
"taxExclusivePrice": {
|
||||||
|
"taxExclusiveAmount": {
|
||||||
|
"amount": 0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
},
|
||||||
|
"displayString": "[taxExclusivePriceDisplayString]",
|
||||||
|
"formattedPrice": "[formattedPrice]",
|
||||||
|
"label": "[taxExclusivePriceLabel]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"productCondition": "NEW",
|
||||||
|
"productConditionNote": "[productConditionNote]",
|
||||||
|
"condition": {
|
||||||
|
"conditionValue": "NEW",
|
||||||
|
"conditionNote": "string",
|
||||||
|
"subCondition": "ACCEPTABLE"
|
||||||
|
},
|
||||||
|
"availability": "[availability]",
|
||||||
|
"fulfillmentType": "THIRD_PARTY",
|
||||||
|
"buyingGuidance": "NONE",
|
||||||
|
"buyingRestrictions": [],
|
||||||
|
"shippingOptions": [
|
||||||
|
{
|
||||||
|
"shippingCost": {
|
||||||
|
"value": {
|
||||||
|
"amount": 9.0,
|
||||||
|
"currencyCode": "USD"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"deliveryRange": {
|
||||||
|
"max": "2022-01-01T00:00:01.000Z",
|
||||||
|
"min": "2022-01-01T00:00:01.000Z"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filterGroups": [
|
||||||
|
{
|
||||||
|
"displayName": "[displayName]",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"displayName": "[itemDisplayName]",
|
||||||
|
"id": "[itemId]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "The service was unable to process the request. Reasons for the error are described in an error response object.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-amazon-spds-sandbox-behaviors": [
|
||||||
|
{
|
||||||
|
"request": {
|
||||||
|
"parameters": {
|
||||||
|
"productRegion": {
|
||||||
|
"value": "US"
|
||||||
|
},
|
||||||
|
"productId": {
|
||||||
|
"value": "B07VDJ5RVF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"response": {
|
||||||
|
"errors": [
|
||||||
|
{
|
||||||
|
"code": "INVALID_REQUEST_PARAMETER",
|
||||||
|
"message": "Missing required request parameters: [locale]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "The request's authorization header isn't formatted correctly or doesn't contain a valid authorization input.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "The resource specified doesn't exist.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"429": {
|
||||||
|
"description": "The frequency of requests was greater than allowed.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Encountered an unexpected condition which prevented the server from fulfilling the request.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"503": {
|
||||||
|
"description": "Temporary overloading or maintenance of the server.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/ErrorResponse"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"x-amzn-RateLimit-Limit": {
|
||||||
|
"description": "The rate limit (requests per second) for this operation.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"x-amzn-requestid": {
|
||||||
|
"description": "A unique request reference identifier.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": ["search"],
|
||||||
|
"description": "Search for offers of a specific product.",
|
||||||
|
"operationId": "searchOffersRequest",
|
||||||
|
"summary": "Paginated and filtered search for offers of a specific product."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user