Remove region disclaimer from FBA Inventory

This commit is contained in:
Jack Evoniuk 2022-04-08 14:35:42 -07:00
commit f50fe16f66
18 changed files with 964 additions and 129 deletions

View File

@ -59,7 +59,7 @@ namespace Amazon.SellingPartnerAPIAA
canonicalizedRequest.AppendFormat("{0}\n", restRequest.Method); canonicalizedRequest.AppendFormat("{0}\n", restRequest.Method);
//CanonicalURI //CanonicalURI
canonicalizedRequest.AppendFormat("{0}\n", AwsSignerHelper.ExtractCanonicalURIParameters(restRequest.Resource)); canonicalizedRequest.AppendFormat("{0}\n", AwsSignerHelper.ExtractCanonicalURIParameters(restRequest));
//CanonicalQueryString //CanonicalQueryString
canonicalizedRequest.AppendFormat("{0}\n", AwsSignerHelper.ExtractCanonicalQueryString(restRequest)); canonicalizedRequest.AppendFormat("{0}\n", AwsSignerHelper.ExtractCanonicalQueryString(restRequest));

View File

@ -38,10 +38,11 @@ namespace Amazon.SellingPartnerAPIAA
/// <summary> /// <summary>
/// Returns URI encoded version of absolute path /// Returns URI encoded version of absolute path
/// </summary> /// </summary>
/// <param name="resource">Resource path(absolute path) from the request</param> /// <param name="request">RestRequest</param>
/// <returns>URI encoded version of absolute path</returns> /// <returns>URI encoded version of absolute path</returns>
public virtual string ExtractCanonicalURIParameters(string resource) public virtual string ExtractCanonicalURIParameters(IRestRequest request)
{ {
string resource = request.Resource;
string canonicalUri = string.Empty; string canonicalUri = string.Empty;
if (string.IsNullOrEmpty(resource)) if (string.IsNullOrEmpty(resource))
@ -54,6 +55,17 @@ namespace Amazon.SellingPartnerAPIAA
{ {
canonicalUri = Slash; canonicalUri = Slash;
} }
IDictionary<string, string> pathParameters = request.Parameters
.Where(parameter => ParameterType.UrlSegment.Equals(parameter.Type))
.ToDictionary(parameter => parameter.Name.Trim().ToString(), parameter => parameter.Value.ToString());
// Replace path parameter with actual value.
// Ex: /products/pricing/v0/items/{Asin}/offers -> /products/pricing/v0/items/AB12CD3E4Z/offers
foreach (string parameter in pathParameters.Keys)
{
resource = resource.Replace("{" + parameter + "}", pathParameters[parameter]);
}
//Split path at / into segments //Split path at / into segments
IEnumerable<string> encodedSegments = resource.Split(new char[] { '/' }, StringSplitOptions.None); IEnumerable<string> encodedSegments = resource.Split(new char[] { '/' }, StringSplitOptions.None);
@ -76,12 +88,12 @@ namespace Amazon.SellingPartnerAPIAA
{ {
IDictionary<string, string> queryParameters = request.Parameters IDictionary<string, string> queryParameters = request.Parameters
.Where(parameter => ParameterType.QueryString.Equals(parameter.Type)) .Where(parameter => ParameterType.QueryString.Equals(parameter.Type))
.ToDictionary(header => header.Name.Trim().ToString(), header => header.Value.ToString()); .ToDictionary(parameter => parameter.Name.Trim().ToString(), parameter => parameter.Value.ToString());
SortedDictionary<string, string> sortedqueryParameters = new SortedDictionary<string, string>(queryParameters); SortedDictionary<string, string> sortedQueryParameters = new SortedDictionary<string, string>(queryParameters);
StringBuilder canonicalQueryString = new StringBuilder(); StringBuilder canonicalQueryString = new StringBuilder();
foreach (var key in sortedqueryParameters.Keys) foreach (var key in sortedQueryParameters.Keys)
{ {
if (canonicalQueryString.Length > 0) if (canonicalQueryString.Length > 0)
{ {
@ -89,7 +101,7 @@ namespace Amazon.SellingPartnerAPIAA
} }
canonicalQueryString.AppendFormat("{0}={1}", canonicalQueryString.AppendFormat("{0}={1}",
Utils.UrlEncode(key), Utils.UrlEncode(key),
Utils.UrlEncode(sortedqueryParameters[key])); Utils.UrlEncode(sortedQueryParameters[key]));
} }
return canonicalQueryString.ToString(); return canonicalQueryString.ToString();

View File

@ -43,7 +43,7 @@ namespace Amazon.SellingPartnerAPIAATests
string expectedStringToSign = "testStringToSign"; string expectedStringToSign = "testStringToSign";
mockAWSSignerHelper.Setup(signerHelper => signerHelper.InitializeHeaders(request, TestHost)) mockAWSSignerHelper.Setup(signerHelper => signerHelper.InitializeHeaders(request, TestHost))
.Returns(signingDate); .Returns(signingDate);
mockAWSSignerHelper.Setup(signerHelper => signerHelper.ExtractCanonicalURIParameters(request.Resource)) mockAWSSignerHelper.Setup(signerHelper => signerHelper.ExtractCanonicalURIParameters(request))
.Returns("testURIParameters"); .Returns("testURIParameters");
mockAWSSignerHelper.Setup(signerHelper => signerHelper.ExtractCanonicalQueryString(request)) mockAWSSignerHelper.Setup(signerHelper => signerHelper.ExtractCanonicalQueryString(request))
.Returns("testCanonicalQueryString"); .Returns("testCanonicalQueryString");
@ -63,7 +63,7 @@ namespace Amazon.SellingPartnerAPIAATests
IRestRequest actualRestRequest = sigV4SignerUnderTest.Sign(request, TestHost); IRestRequest actualRestRequest = sigV4SignerUnderTest.Sign(request, TestHost);
mockAWSSignerHelper.Verify(signerHelper => signerHelper.InitializeHeaders(request, TestHost)); mockAWSSignerHelper.Verify(signerHelper => signerHelper.InitializeHeaders(request, TestHost));
mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractCanonicalURIParameters(request.Resource)); mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractCanonicalURIParameters(request));
mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractCanonicalQueryString(request)); mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractCanonicalQueryString(request));
mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractCanonicalHeaders(request)); mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractCanonicalHeaders(request));
mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractSignedHeaders(request)); mockAWSSignerHelper.Verify(signerHelper => signerHelper.ExtractSignedHeaders(request));

View File

@ -34,35 +34,57 @@ namespace Amazon.SellingPartnerAPIAATests
public void TestExtractCanonicalURIParameters() public void TestExtractCanonicalURIParameters()
{ {
IRestRequest request = new RestRequest(TestResourcePath, Method.GET); IRestRequest request = new RestRequest(TestResourcePath, Method.GET);
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(request.Resource); string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(request);
Assert.Equal("/iam/user", result); Assert.Equal(Slash + TestResourcePath, result);
}
[Fact]
public void TestExtractCanonicalURIParameters_UrlSegments()
{
IRestRequest request = new RestRequest("products/pricing/v0/items/{Asin}/offers/{SellerSKU}", Method.GET);
request.AddUrlSegment("Asin", "AB12CD3E4Z");
request.AddUrlSegment("SellerSKU", "1234567890");
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(request);
Assert.Equal("/products/pricing/v0/items/AB12CD3E4Z/offers/1234567890", result);
}
[Fact]
public void TestExtractCanonicalURIParameters_IncorrectUrlSegment()
{
IRestRequest request = new RestRequest("products/pricing/v0/items/{Asin}/offers", Method.GET);
request.AddUrlSegment("asin", "AB12CD3E4Z");
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(request);
Assert.Equal("/products/pricing/v0/items/%257BAsin%257D/offers", result);
} }
[Fact] [Fact]
public void TestExtractCanonicalURIParameters_ResourcePathWithSpace() public void TestExtractCanonicalURIParameters_ResourcePathWithSpace()
{ {
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters("iam/ user"); IRestRequest request = new RestRequest("iam/ user", Method.GET);
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(request);
Assert.Equal("/iam/%2520user", result); Assert.Equal("/iam/%2520user", result);
} }
[Fact] [Fact]
public void TestExtractCanonicalURIParameters_EmptyResourcePath() public void TestExtractCanonicalURIParameters_EmptyResourcePath()
{ {
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(string.Empty); IRestRequest request = new RestRequest(string.Empty, Method.GET);
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(request);
Assert.Equal(Slash, result); Assert.Equal(Slash, result);
} }
[Fact] [Fact]
public void TestExtractCanonicalURIParameters_NullResourcePath() public void TestExtractCanonicalURIParameters_NullResourcePath()
{ {
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(null); string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(new RestRequest());
Assert.Equal(Slash, result); Assert.Equal(Slash, result);
} }
[Fact] [Fact]
public void TestExtractCanonicalURIParameters_SlashPath() public void TestExtractCanonicalURIParameters_SlashPath()
{ {
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(Slash); IRestRequest request = new RestRequest(Slash, Method.GET);
string result = awsSignerHelperUnderTest.ExtractCanonicalURIParameters(request);
Assert.Equal(Slash, result); Assert.Equal(Slash, result);
} }

View File

@ -1,7 +1,7 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.\n\nFor more information, see the [Catalog Items API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/catalog-items-api-use-case-guide/catalog-items-api-use-case-guide_2020-12-01.md).", "description": "The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog.\n\nFor more information, see the [Catalog Items API Use Case Guide](doc:catalog-items-api-v2020-12-01-use-case-guide).",
"version": "2020-12-01", "version": "2020-12-01",
"title": "Selling Partner API for Catalog Items", "title": "Selling Partner API for Catalog Items",
"contact": { "contact": {
@ -29,7 +29,7 @@
"tags": [ "tags": [
"catalog" "catalog"
], ],
"description": "Search for and return a list of Amazon catalog items and associated information.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 5 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Search for and return a list of Amazon catalog items and associated information.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 5 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "searchCatalogItems", "operationId": "searchCatalogItems",
"consumes": [ "consumes": [
"application/json" "application/json"
@ -570,7 +570,7 @@
"tags": [ "tags": [
"catalog" "catalog"
], ],
"description": "Retrieves details for an item in the Amazon catalog.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 5 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Retrieves details for an item in the Amazon catalog.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 5 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "getCatalogItem", "operationId": "getCatalogItem",
"consumes": [ "consumes": [
"application/json" "application/json"

View File

@ -466,6 +466,7 @@
"FBA_INB_0100", "FBA_INB_0100",
"FBA_INB_0103", "FBA_INB_0103",
"FBA_INB_0104", "FBA_INB_0104",
"FBA_INB_0197",
"UNKNOWN_INB_ERROR_CODE" "UNKNOWN_INB_ERROR_CODE"
], ],
"x-docgen-enum-table-extension": [ "x-docgen-enum-table-extension": [
@ -617,6 +618,10 @@
"value": "FBA_INB_0104", "value": "FBA_INB_0104",
"description": "Item Requires Manufacturer Barcode. Only NEW products can be stored in our fulfillment centers without product labels." "description": "Item Requires Manufacturer Barcode. Only NEW products can be stored in our fulfillment centers without product labels."
}, },
{
"value": "FBA_INB_0197",
"description": "Item requires safety and compliance documentation. Orders for this product cannot be fulfilled by FBA without required safety and compliance documentation."
},
{ {
"value": "UNKNOWN_INB_ERROR_CODE", "value": "UNKNOWN_INB_ERROR_CODE",
"description": "Unknown Ineligibility Reason." "description": "Unknown Ineligibility Reason."

View File

@ -671,4 +671,4 @@
} }
} }
} }
} }

View File

@ -1623,7 +1623,7 @@
}, },
"FeedOptions": { "FeedOptions": {
"type": "object", "type": "object",
"description": "Additional options to control the feed. For feeds that use the feedOptions parameter, you can find the parameter values in the feed description in [feedType values](https://github.com/amzn/selling-partner-api-docs/blob/main/references/feeds-api/feedtype-values.md).", "description": "Additional options to control the feed. For feeds that use the feedOptions parameter, you can find the parameter values in the feed description in [feedType values](doc:feed-type-values).",
"additionalProperties": { "additionalProperties": {
"type": "string" "type": "string"
} }

View File

@ -4941,7 +4941,17 @@
"UNDELIVERABLE", "UNDELIVERABLE",
"DELAYED", "DELAYED",
"AVAILABLE_FOR_PICKUP", "AVAILABLE_FOR_PICKUP",
"CUSTOMER_ACTION" "CUSTOMER_ACTION",
"UNKNOWN",
"OUT_FOR_DELIVERY",
"DELIVERY_ATTEMPTED",
"PICKUP_SUCCESSFUL",
"PICKUP_CANCELLED",
"PICKUP_ATTEMPTED",
"PICKUP_SCHEDULED",
"RETURN_REQUEST_ACCEPTED",
"REFUND_ISSUED",
"RETURN_RECEIVED_IN_FC"
], ],
"x-docgen-enum-table-extension": [ "x-docgen-enum-table-extension": [
{ {
@ -4975,6 +4985,46 @@
{ {
"value": "CUSTOMER_ACTION", "value": "CUSTOMER_ACTION",
"description": "Requires customer action." "description": "Requires customer action."
},
{
"value": "UNKNOWN",
"description": "Unknown Status Code was returned."
},
{
"value": "OUT_FOR_DELIVERY",
"description": "Out for Delivery."
},
{
"value": "DELIVERY_ATTEMPTED",
"description": "Delivery Attempted."
},
{
"value": "PICKUP_SUCCESSFUL",
"description": "Pickup Successful."
},
{
"value": "PICKUP_CANCELLED",
"description": "Pickup Cancelled."
},
{
"value": "PICKUP_ATTEMPTED",
"description": "Pickup Attempted."
},
{
"value": "PICKUP_SCHEDULED",
"description": "Pickup Scheduled."
},
{
"value": "RETURN_REQUEST_ACCEPTED",
"description": "Return Request Accepted."
},
{
"value": "REFUND_ISSUED",
"description": "Refund Issued."
},
{
"value": "RETURN_RECEIVED_IN_FC",
"description": "Return Received In FC."
} }
] ]
}, },

View File

@ -1,7 +1,7 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.\n\nFor more information, see the [Listing Items API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/listings-items-api-use-case-guide/listings-items-api-use-case-guide_2020-09-01.md).", "description": "The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.\n\nFor more information, see the [Listing Items API Use Case Guide](doc:listings-items-api-v2020-09-01-use-case-guide).",
"version": "2020-09-01", "version": "2020-09-01",
"title": "Selling Partner API for Listings Items", "title": "Selling Partner API for Listings Items",
"contact": { "contact": {
@ -29,7 +29,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Delete a listings item for a selling partner.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Delete a listings item for a selling partner.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "deleteListingsItem", "operationId": "deleteListingsItem",
"consumes": [ "consumes": [
"application/json" "application/json"
@ -250,7 +250,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "patchListingsItem", "operationId": "patchListingsItem",
"consumes": [ "consumes": [
"application/json" "application/json"
@ -482,7 +482,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Creates a new or fully-updates an existing listings item for a selling partner.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Creates a new or fully-updates an existing listings item for a selling partner.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "putListingsItem", "operationId": "putListingsItem",
"consumes": [ "consumes": [
"application/json" "application/json"

View File

@ -1,7 +1,7 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.\n\nFor more information, see the [Listings Items API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/listings-items-api-use-case-guide/listings-items-api-use-case-guide_2021-08-01.md).", "description": "The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.\n\nFor more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide).",
"version": "2021-08-01", "version": "2021-08-01",
"title": "Selling Partner API for Listings Items", "title": "Selling Partner API for Listings Items",
"contact": { "contact": {
@ -29,7 +29,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Delete a listings item for a selling partner.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Delete a listings item for a selling partner.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "deleteListingsItem", "operationId": "deleteListingsItem",
"consumes": [ "consumes": [
"application/json" "application/json"
@ -230,7 +230,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Returns details about a listings item for a selling partner.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Returns details about a listings item for a selling partner.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "getListingsItem", "operationId": "getListingsItem",
"consumes": [ "consumes": [
"application/json" "application/json"
@ -562,7 +562,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "patchListingsItem", "operationId": "patchListingsItem",
"consumes": [ "consumes": [
"application/json" "application/json"
@ -774,7 +774,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Creates a new or fully-updates an existing listings item for a selling partner.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Creates a new or fully-updates an existing listings item for a selling partner.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "putListingsItem", "operationId": "putListingsItem",
"consumes": [ "consumes": [
"application/json" "application/json"

View File

@ -2,7 +2,7 @@
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"title": "Selling Partner API for Listings Restrictions", "title": "Selling Partner API for Listings Restrictions",
"description": "The Selling Partner API for Listings Restrictions provides programmatic access to restrictions on Amazon catalog listings.\n\nFor more information, see the [Listings Restrictions API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/listings-restrictions-api-use-case-guide/listings-restrictions-api-use-case-guide_2021-08-01.md).", "description": "The Selling Partner API for Listings Restrictions provides programmatic access to restrictions on Amazon catalog listings.\n\nFor more information, see the [Listings Restrictions API Use Case Guide](doc:listings-restrictions-api-v2021-08-01-use-case-guide).",
"version": "2021-08-01", "version": "2021-08-01",
"contact": { "contact": {
"name": "Selling Partner API Developer Support", "name": "Selling Partner API Developer Support",
@ -247,7 +247,7 @@
"tags": [ "tags": [
"listings" "listings"
], ],
"description": "Returns listing restrictions for an item in the Amazon Catalog. \n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Returns listing restrictions for an item in the Amazon Catalog. \n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "getListingsRestrictions", "operationId": "getListingsRestrictions",
"consumes": [ "consumes": [
"application/json" "application/json"

View File

@ -1,7 +1,7 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.\n\nFor more information, see the [Notifications Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/notifications-api-use-case-guide/notifications-use-case-guide-v1.md)", "description": "The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.\n\nFor more information, see the [Notifications Use Case Guide](doc:notifications-api-v1-use-case-guide)",
"version": "v1", "version": "v1",
"title": "Selling Partner API for Notifications", "title": "Selling Partner API for Notifications",
"contact": { "contact": {
@ -1922,83 +1922,9 @@
"NotificationType": { "NotificationType": {
"name": "notificationType", "name": "notificationType",
"in": "path", "in": "path",
"description": "The type of notification.\n\n For more information about notification types, see [the Notifications API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/notifications-api-use-case-guide/notifications-use-case-guide-v1.md).", "description": "The type of notification.\n\n For more information about notification types, see [the Notifications API Use Case Guide](doc:notifications-api-v1-use-case-guide).",
"required": true, "required": true,
"type": "string", "type": "string"
"enum": [
"ANY_OFFER_CHANGED",
"FEED_PROCESSING_FINISHED",
"FBA_OUTBOUND_SHIPMENT_STATUS",
"FEE_PROMOTION",
"FULFILLMENT_ORDER_STATUS",
"REPORT_PROCESSING_FINISHED",
"BRANDED_ITEM_CONTENT_CHANGE",
"ITEM_PRODUCT_TYPE_CHANGE",
"LISTINGS_ITEM_STATUS_CHANGE",
"LISTINGS_ITEM_ISSUES_CHANGE",
"MFN_ORDER_STATUS_CHANGE",
"B2B_ANY_OFFER_CHANGED",
"ACCOUNT_STATUS_CHANGED",
"PRODUCT_TYPE_DEFINITIONS_CHANGE"
],
"x-docgen-enum-table-extension": [
{
"value": "ANY_OFFER_CHANGED",
"description": "Sent whenever there is a listing change for any of the top 20 offers, by condition (new or used), or if the external price (the price from other retailers) changes for an item listed by the seller. The top 20 offers are determined by the landed price, which is the price plus shipping minus Amazon Points. If multiple sellers are charging the same landed price, the results will be returned in random order.\n\n These notifications are only sent for items for which the seller has active offers. You cannot subscribe to notifications for items for which the seller does not have active offers."
},
{
"value": "FEED_PROCESSING_FINISHED",
"description": "Sent whenever any feed submitted using the Selling Partner API for Feeds reaches a feed processing status of DONE or CANCELLED."
},
{
"value": "FBA_OUTBOUND_SHIPMENT_STATUS",
"description": "Sent whenever Amazon creates or cancels a Fulfillment by Amazon shipment for a seller. This notification is only for FBA Onsite shipments. This notification is available only in the Brazil marketplace."
},
{
"value": "FEE_PROMOTION",
"description": "Sent when a promotion becomes active. Sellers can benefit from time-limited fee promotions. To receive notifications of these fee promotions on behalf of the seller, subscribe to the FEE_PROMOTION notification. All currently active promotions are sent at first, with each promotion sent as a single message. Subsequent notifications are sent when the promotion becomes active."
},
{
"value": "FULFILLMENT_ORDER_STATUS",
"description": "Sent whenever there is a change in the status of a Multi-Channel Fulfillment order.\n\n Multi-Channel Fulfillment is a program where sellers use their FBA inventory to fulfill orders not sold on the retail site."
},
{
"value": "REPORT_PROCESSING_FINISHED",
"description": "Sent whenever any report that you have requested using the Selling Partner API for Reports reaches a report processing status of DONE, CANCELLED, or FATAL."
},
{
"value": "BRANDED_ITEM_CONTENT_CHANGE",
"description": "Sent whenever there is a change to the title, description, or bullet points for any ASIN that the selling partner has a brand relationship with."
},
{
"value": "ITEM_PRODUCT_TYPE_CHANGE",
"description": "Sent whenever there is a change to the product type name of any ASIN that the selling partner has a brand relationship with."
},
{
"value": "LISTINGS_ITEM_STATUS_CHANGE",
"description": "Sent whenever there is a listing status change including buyable transition, discoverable transition, listing create or delete for any SKU that the selling partner has."
},
{
"value": "LISTINGS_ITEM_ISSUES_CHANGE",
"description": "Sent whenever there are issues change for any SKU that the selling partner has."
},
{
"value": "PRODUCT_TYPE_DEFINITIONS_CHANGE",
"description": "Sent whenever there is a new Product Type or a Product Type Version in a marketplace."
},
{
"value": "MFN_ORDER_STATUS_CHANGE",
"description": "Sent whenever there is a change in the status of an MFN order availability."
},
{
"value": "B2B_ANY_OFFER_CHANGED",
"description": "Sent whenever there is a listing change for any of the top 20 B2B offers, by condition (new or used). The top 20 offers are determined by the landed price, which is the price plus shipping minus Amazon Points(applicable only JP). If multiple sellers are charging the same landed price, the results will be returned in random order.\n\n These notifications are only sent for items for which the seller has active offers. Seller cannot receive notifications for items for which the seller does not have active offers."
},
{
"value": "ACCOUNT_STATUS_CHANGED",
"description": "Sent whenever the Account Status changes for the developers subscribed merchant/marketplace pairs. A notification is published whenever the merchant's account status changes between NORMAL, AT_RISK, and DEACTIVATED.\n\n The notification will have a payload with 2 fields: previousAccountStatus and currentAccountStatus to indicate the direction of the change."
}
]
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "The Selling Partner API for Product Type Definitions provides programmatic access to attribute and data requirements for product types in the Amazon catalog. Use this API to return the JSON Schema for a product type that you can then use with other Selling Partner APIs, such as the Selling Partner API for Listings Items, the Selling Partner API for Catalog Items, and the Selling Partner API for Feeds (for JSON-based listing feeds).\n\nFor more information, see the [Product Type Definitions API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/product-type-definitions-api-use-case-guide/definitions-product-types-api-use-case-guide_2020-09-01.md).", "description": "The Selling Partner API for Product Type Definitions provides programmatic access to attribute and data requirements for product types in the Amazon catalog. Use this API to return the JSON Schema for a product type that you can then use with other Selling Partner APIs, such as the Selling Partner API for Listings Items, the Selling Partner API for Catalog Items, and the Selling Partner API for Feeds (for JSON-based listing feeds).\n\nFor more information, see the [Product Type Definitions API Use Case Guide](doc:product-type-api-use-case-guide).",
"version": "2020-09-01", "version": "2020-09-01",
"title": "Selling Partner API for Product Type Definitions", "title": "Selling Partner API for Product Type Definitions",
"contact": { "contact": {
@ -29,7 +29,7 @@
"tags": [ "tags": [
"definitions" "definitions"
], ],
"description": "Search for and return a list of Amazon product types that have definitions available.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Search for and return a list of Amazon product types that have definitions available.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "searchDefinitionsProductTypes", "operationId": "searchDefinitionsProductTypes",
"consumes": [ "consumes": [
"application/json" "application/json"
@ -264,7 +264,7 @@
"tags": [ "tags": [
"definitions" "definitions"
], ],
"description": "Retrieve an Amazon product type definition.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md).", "description": "Retrieve an Amazon product type definition.\n\n**Usage Plans:**\n\n| Plan type | Rate (requests per second) | Burst |\n| ---- | ---- | ---- |\n|Default| 5 | 10 |\n|Selling partner specific| Variable | Variable |\n\nThe x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).",
"operationId": "getDefinitionsProductType", "operationId": "getDefinitionsProductType",
"consumes": [ "consumes": [
"application/json" "application/json"

View File

@ -35,7 +35,7 @@
{ {
"name": "shipmentId", "name": "shipmentId",
"in": "path", "in": "path",
"description": "The identifier for the shipment. Get this value from the FBAOutboundShipmentStatus notification. For information about subscribing to notifications, see the [Notifications API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/notifications-api-use-case-guide/notifications-use-case-guide-v1.md).", "description": "The identifier for the shipment. Get this value from the FBAOutboundShipmentStatus notification. For information about subscribing to notifications, see the [Notifications API Use Case Guide](doc:notifications-api-v1-use-case-guide).",
"required": true, "required": true,
"type": "string" "type": "string"
} }
@ -1132,4 +1132,4 @@
"description": "The response schema for the getInvoiceStatus operation." "description": "The response schema for the getInvoiceStatus operation."
} }
} }
} }

BIN
models/shipping-api-model/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -1,7 +1,7 @@
{ {
"swagger": "2.0", "swagger": "2.0",
"info": { "info": {
"description": "The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified.\n\nFor more information, see the [Tokens API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/tokens-api-use-case-guide/tokens-API-use-case-guide-2021-03-01.md).", "description": "The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified.\n\nFor more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide).",
"version": "2021-03-01", "version": "2021-03-01",
"title": "Selling Partner API for Tokens ", "title": "Selling Partner API for Tokens ",
"contact": { "contact": {
@ -321,7 +321,7 @@
}, },
"dataElements": { "dataElements": {
"type": "array", "type": "array",
"description": "Indicates the type of Personally Identifiable Information requested. This parameter is required only when getting an RDT for use with the getOrder, getOrders, or getOrderItems operation of the Orders API. For more information, see the [Tokens API Use Case Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/tokens-api-use-case-guide/tokens-API-use-case-guide-2021-03-01.md). Possible values include:\n- **buyerInfo**. On the order level this includes general identifying information about the buyer and tax-related information. On the order item level this includes gift wrap information and custom order information, if available.\n- **shippingAddress**. This includes information for fulfilling orders.", "description": "Indicates the type of Personally Identifiable Information requested. This parameter is required only when getting an RDT for use with the getOrder, getOrders, or getOrderItems operation of the Orders API. For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide). Possible values include:\n- **buyerInfo**. On the order level this includes general identifying information about the buyer and tax-related information. On the order item level this includes gift wrap information and custom order information, if available.\n- **shippingAddress**. This includes information for fulfilling orders.\n- **buyerTaxInformation**. This includes information for issuing tax invoices.",
"items": { "items": {
"type": "string" "type": "string"
} }