Gure Gipuzkoa Services
API Documentation
|
Upload
Uploads the photo to the GG application with the given details. Photos should be POSTed to the bewlow mentioned
URL along with the other parameters.
Request URL
http://api.guregipuzkoa.net/services/upload/
Authentication
User must use GG authentication using http://api.guregipuzkoa.net/services/rest/?method=gg.auth.getToken
Arguments
token (Required)
- Authentication token.
key (Required)
- Your API application key.
photo (Required)
- Photo to be uploaded (should be posted in a mutipart form-data format).
province_id (Optional)
- Province where the photo belongs to.
municipality_id (Optional)
- Municipality where the photo belongs to.
album_id (Optional)
- This parameter is depricated and will be ignored in the upload process.
We strogly recommended not to use / remove this parameter
folder_id (Optional)
- Folder where this photo needs to be added.
license_id (Required)
- Valid license for the photo getting uploaded.
source_id (Optional)
- Source id
title (Optional)
- Title of the photo getting uploaded. HTML text is not supported.
This will be stored in title_es if locale is es, stored in title_eu if locale is eu. If not, this will
be stored in title_es and title_eu.
description (Optional)
- Description of the photo getting uploaded. HTML text is not supported.
This will be stored in description_es if locale is es, stored in description_eu if locale is eu. If not, this will
be stored in description_es and description_eu.
title_es (Optional)
- This takes the precedence over the title
description_es (Optional)
- This takes the precedence over the description
title_eu (Optional)
- This takes the precedence over the title
description_eu (Optional)
- This takes the precedence over the description
date (Optional)
- Date when the photo was taken. Date format must be DD/MM/YYYY , DD-MM-YYYY or YYYY-MM-DD , YYYY/MM/DD
is_date_uncertain (Optional)
- If the given date is not accurate, send true otherwise false. If not mentioned it is false.
photographer (Optional)
- Photographer who took the photo.
signature (Optional)
- Signature of the photo.
time (Optional)
- Time when the photo was taken.
start_date (Optional)
- Start date range of the photo (under re-consideration). Date format must be DD/MM/YYYY , DD-MM-YYYY or YYYY-MM-DD , YYYY/MM/DD
end_date (Optional)
- End date range of the photo (under re-consideration). Date format must be DD/MM/YYYY , DD-MM-YYYY or YYYY-MM-DD , YYYY/MM/DD
latitude (Optional)
- Latitude value of the photo location.
longitude (Optional)
- Longitude value of the photo location.
language (Optional)
- The language of the photo title and description to be displayed. Supported : es / eu. Default : both.
tags (Optional)
- The tag name to be added for the photo, can also add multiple tags with delimiter (delimited by comma).
Example Response
<rsp stat="ok">
<photo id="123456" />
</rsp>
Error Codes
300 - Invalid Photo ID
- The photo_id sent is not valid
301 - Invalid Image Type
- The uploaded image type is not supported by the application
302 - Image file size is too big
- Uploaded image size is bigger than the maximum allowable size
302 - Image file upload failed
- The image upload failed due to some server processing
304 - Invalid folder ID
- The image upload failed due to Invalid folder ID
305 - Unauthorized folder ID
- The image upload failed due to Unauthorized folder ID
700 - Invalid credentials
- The given authentication values (Token or API) is invalid.
203 - Insufficient parameters
- The required arguments are missing