Reserve a photo upload
POST
/api/v1/mediaSigned upload reservation.
Upload the file to uploadUrl within 10 minutes using the returned headers. Send the Authorization header with your Motano key only to the Motano API.
Required scope media:write
Request body
Schema PhotoReservationInput
| Name | Type | Required | Description |
|---|---|---|---|
contentType | "image/jpeg" | "image/png" | "image/webp" | "image/avif" | Yes | "image/jpeg" | "image/png" | "image/webp" | "image/avif" |
sizeBytes | integer | Yes | maximum 10485760 |
category | "osobowe" | "dostawcze" | "ciezarowe" | "motocykle" | "kampery" | "czesci" | Yes | "osobowe" | "dostawcze" | "ciezarowe" | "motocykle" | "kampery" | "czesci" |
JSON Schema
{
"$ref": "#/components/schemas/PhotoReservationInput"
}Responses
201 Signed upload reservation.Location- Path to the created resource.
application/jsonSchema PhotoReservation
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
uploadUrl | string | Yes | format uri |
method | "PUT" | Yes | — |
headers | object | Yes | — |
expiresIn | 600 | Yes | — |
JSON Schema
{
"$ref": "#/components/schemas/PhotoReservation"
}429 Request processing error.application/jsonSchema object
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | — |
message | string | Yes | — |
requestId | string | Yes | — |
issues | object[] | No | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}Other API errors Request processing error.application/jsonSchema object
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | — |
message | string | Yes | — |
requestId | string | Yes | — |
issues | object[] | No | — |
JSON Schema
{
"type": "object",
"required": [
"code",
"message",
"requestId"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object"
}
}
}
}401 A valid API key is required.403 The scope is missing or the production request does not use HTTPS.503 Access is closed or the service is temporarily unavailable. Check code.Related schemas
PhotoReservationInput
{
"type": "object",
"properties": {
"contentType": {
"type": "string",
"enum": [
"image/jpeg",
"image/png",
"image/webp",
"image/avif"
]
},
"sizeBytes": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 10485760
},
"category": {
"type": "string",
"enum": [
"osobowe",
"dostawcze",
"ciezarowe",
"motocykle",
"kampery",
"czesci"
]
}
},
"required": [
"contentType",
"sizeBytes",
"category"
],
"additionalProperties": false
}PhotoReservation
{
"type": "object",
"required": [
"id",
"uploadUrl",
"method",
"headers",
"expiresIn"
],
"properties": {
"id": {
"type": "string"
},
"uploadUrl": {
"type": "string",
"format": "uri"
},
"method": {
"const": "PUT"
},
"headers": {
"type": "object",
"required": [
"Content-Type",
"Content-Length",
"If-None-Match"
],
"properties": {
"Content-Type": {
"type": "string"
},
"Content-Length": {
"type": "string"
},
"If-None-Match": {
"const": "*"
}
}
},
"expiresIn": {
"const": 600
}
}
}