selling-partner-api-models/models/uploads-api-model/uploads.json

275 lines
9.4 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "Selling Partner API for Uploads",
"description": "The Selling Partner API for Uploads provides operations that support uploading files.",
"version": "v1",
"contact": {
"name": "Selling Partner API Developer Support",
"url": "https://sellercentral.amazon.com/gp/mws/contactus.html"
},
"license": {
"name": "Apache License 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
},
"host": "sellingpartnerapi-na.amazon.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/uploads/v1/uploadDestinations": {
"post": {
"description": "Creates an upload destination and returns the required information to upload to that destination.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| .1 | 5 |\n\nFor more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.",
"operationId": "createUploadDestination",
"tags": [
"uploads"
],
"responses": {
"201": {
"description": "Successfully created an upload destination.",
"headers": {
"x-amzn-requestId": {
"description": "Unique request reference identifier.",
"type": "string"
},
"Location": {
"description": "The URI of the created destination.",
"type": "string"
}
},
"examples": {
"application/json": {
"payload": {
"uploadDestinationId": "5d4e42b5-1d6e-44e8-a89c-2abfca0625bb",
"url": "https://s3.amazonaws.com/buyer-seller-messaging-test-draft-attachment-namarketplace/%2F067/5d4e42b5-1d6e-44e8-a89c-2abfca0625bb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190701T214102Z&X-Amz-SignedHeaders=content-md5%3Bhost%3Bx-amz-server-side-encryption&X-Amz-Expires=900&X-Amz-Credential=AKIAW5VUA47ENEOYT7RC%2F20190701%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=d4f85c5f1a32a788a8d54e3f00a2a08af45be5b83551cdd81c82ae353dfcdfd4",
"headers": {
"Content-MD5": "5d41402abc4b2a76b9719d911017c592",
"x-amz-server-side-encryption": "aws:kms"
}
}
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"400": {
"description": "Request has missing or invalid parameters and cannot be parsed.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"403": {
"description": "Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"404": {
"description": "The resource specified does not exist.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"413": {
"description": "The request size exceeded the maximum accepted size.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"415": {
"description": "The request payload is in an unsupported format.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"429": {
"description": "The frequency of requests was greater than allowed.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"500": {
"description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
},
"503": {
"description": "Temporary overloading or maintenance of the server.",
"headers": {
"x-amzn-RequestId": {
"description": "Unique request reference identifier.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/CreateUploadDestinationResponse"
}
}
},
"parameters": [
{
"name": "marketplaceIds",
"type": "array",
"in": "query",
"required": true,
"description": "Marketplace identifiers. Specifies the marketplace where the upload will be available. NOTE: Accepts only a single marketplace.",
"items": {
"type": "string"
},
"maxItems": 1
},
{
"name": "Content-MD5",
"description": "An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit.",
"type": "string",
"in": "query",
"required": true
}
]
}
}
},
"definitions": {
"CreateUploadDestinationResponse": {
"description": "The response schema for the createUploadDestination operation.",
"type": "object",
"properties": {
"payload": {
"$ref": "#/definitions/UploadDestination"
},
"errors": {
"$ref": "#/definitions/ErrorList"
}
}
},
"UploadDestination": {
"description": "Information about an upload destination.",
"type": "object",
"properties": {
"uploadDestinationId": {
"description": "The unique identifier to be used by APIs that reference the upload destination.",
"type": "string"
},
"url": {
"description": "The URL to which to upload the file.",
"type": "string"
},
"encryptionDetails": {
"$ref": "#/definitions/EncryptionDetails"
},
"headers": {
"description": "The headers to include in the upload request.",
"type": "object",
"properties": {}
}
}
},
"EncryptionDetails": {
"description": "Encryption details for the required client-side encryption of the upload.",
"type": "object",
"properties": {
"standard": {
"description": "The encryption standard required prior to upload.",
"type": "string",
"enum": [
"AES"
],
"x-docgen-enum-table-extension": [
{
"value": "AES",
"description": "AES"
}
]
},
"initializationVector": {
"type": "string",
"description": "The vector to encrypt the content using Cipher Block Chaining (CBC)."
},
"key": {
"type": "string",
"description": "The encryption key used to encrypt the content."
}
}
},
"ErrorList": {
"description": "A list of error responses returned when a request is unsuccessful.",
"type": "array",
"items": {
"$ref": "#/definitions/Error"
}
},
"Error": {
"description": "Error response returned when the request is unsuccessful.",
"properties": {
"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"
},
"details": {
"description": "Additional details that can help the caller understand or fix the issue.",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
}
}
}