API reference

Production access is closed · 37 operations

Reserve a photo upload

POST/api/v1/media

Signed 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

Jump to the example

Request body

Schema PhotoReservationInput
NameTypeRequiredDescription
contentType"image/jpeg" | "image/png" | "image/webp" | "image/avif"Yes"image/jpeg" | "image/png" | "image/webp" | "image/avif"
sizeBytesintegerYesmaximum 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/json
Schema PhotoReservation
NameTypeRequiredDescription
idstringYes—
uploadUrlstringYesformat uri
method"PUT"Yes—
headersobjectYes—
expiresIn600Yes—
JSON Schema
{
  "$ref": "#/components/schemas/PhotoReservation"
}
429 Request processing error.
application/json
Schema object
NameTypeRequiredDescription
codestringYes—
messagestringYes—
requestIdstringYes—
issuesobject[]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/json
Schema object
NameTypeRequiredDescription
codestringYes—
messagestringYes—
requestIdstringYes—
issuesobject[]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.

Handle errors and rate limits ↗

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
    }
  }
}