Upload a photo
POST/api/photo/upload
Upload a photo to the Ownli cloud. All photos used for check-ins need to be uploaded to the Ownli cloud first.
Request
Header Parameters
Partner Id
Client Id
Client Secret
- application/json
Body
required
User defined file name of the photo. You can give a name that makes it easier the URL easier to identify. Also it will be helpful to provide a suffix so tools like a Browser, Finder or explorer can display it automatically.
Base64 encoded string representation of the photo.
Unique identifier of the device on which the photo was taken.
The manufacturer of the device on which the photo was taken. e.g. Apple, Xiaomi, Samsung, OPPO, OnePlus etc.
The model of the device on which the photo was taken. e.g. LM-G900, motorola edge, IPad, IPhone 14
The OS of the device on which the photo was taken. Android 9, iOS 13.2.3 etc.
[takenOn] The timestamp at which the photo was taken. (The date should be in the ISO8601 UTC format YYY-MM-DDThh:mm:ss.SSSZ; eg: 2024-01-01T00:00:00.000Z
Latitude at which photo was taken.
Longitude at which photo was taken.
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Photo object created by the upload.
- application/json
- Schema
- Example (from schema)
Schema
Id of the owner
URL of the photo
Device identifier of the device on which photo was taken
Manufacturer of the device on which photo was taken
Model of the device on which photo was taken
OS of the device on which photo was taken
The timestamp at which the photo was taken
Latitude of the location at which photo was taken
Longitude of the location at which photo was taken
{
"userId": "string",
"photoUrl": "string",
"deviceIdentifier": "string",
"deviceManufacturer": "string",
"deviceModel": "string",
"deviceOS": "string",
"takenOn": "string",
"latitude": 0,
"longitude": 0
}
Invalid parameters. Possible error codes
-
ERROR_INVALID_PARAMETERS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Authorization error e.g. due to an invalid or missing API keys.
Forbidden. Possible error codes
-
ERROR_NO_PERMISSIONS_TO_RESOURCE
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
User not found. Possible error codes
-
ERROR_USER_NOT_FOUND
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Internal error. Possible error codes
-
INTERNAL_SERVER_ERROR
-
ERROR_DECODING_PHOTO,
-
ERROR_UPLOADING_PHOTO
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}