deleteLocationPhoto

POST public/deleteLocationPhoto

Deletes a photo from a location.

Request syntax

curl https://apiv2.acumera.net/public/deleteLocationPhoto \
  --cookie av_session.txt \
  --data-urlencode "location_image_id=<photo_id>"

The username, password, and tfa_token parameters are also accepted, and are required only if the client hasn't already signed in with login. See Getting started with the SC//AcuVigil API.

Request parameters

The request accepts the following parameters in a form-encoded body.

Parameter Type Description Required Default value
location_image_id Integer The photo's ID. To find photo IDs, use getLocationPhotos. Yes

Response syntax

{
    "success": "string",
    "returnCode": "string",
    "returnMessage": "string"
}

Response parameters

Field Description
success "1" if the photo was deleted.
returnCode IMAGE_DELETED when the photo was deleted.
returnMessage A description of the result.

Errors

If the call fails, success is "0", and returnCode and returnMessage describe the problem. The HTTP status is still 200.

Return code Message Cause
NO_IMAGE_SELECTED No image was selected. location_image_id is missing or isn't a number.
IMAGE_NOT_FOUND The image cannot be located. No photo has that ID, for example because it was already deleted.
AUTH_FAILED_FUNC_NOT_ALLOWED Authorization failed because you are not permitted to access the requested function. You aren't allowed to delete this photo.
INVALID_LOGIN We were unable to log you in. Make sure you entered the correct username, password and 2FA code. You haven't signed in, your session has ended, or the credentials sent with the call are wrong.

Examples

Example: Delete a photo

curl https://apiv2.acumera.net/public/deleteLocationPhoto \
  --cookie av_session.txt \
  --data-urlencode "location_image_id=19130"

Response:

{
    "success": "1",
    "returnCode": "IMAGE_DELETED",
    "returnMessage": "The image has been deleted."
}

Example: Delete a photo that's already been deleted

{
    "success": "0",
    "returnCode": "IMAGE_NOT_FOUND",
    "returnMessage": "The image cannot be located."
}