Donate using PayPal

CycleStreets API (v2)

  • Details for:
  • API overview
  • Obtain API key
  • Usage policy
  • Uptime policy

Like photo

This API call enables a user to 'Like' a Photomap location.

The call requires that the client generates a token which that application creates as unique to the user, e.g. a session token.

Likes do not require a user account. Accordingly, the value for a location should be treated as indicative.

If the client's user has already set a Like for the location, the Like will be removed; i.e. the API call acts as a toggle.


Example which sets (or unsets) a Like for a location.

	[id] => 80
	[token] => 5ea10c55a203a436436eaf940b0c5716


    "id": 80,
    "likes": 8,
    "liked": true,

A repeat request would then remove the Like, resulting in the following response:

    "id": 80,
    "likes": 7,
    "liked": false,

Request parameters - required

id int
The location ID.
notes string, max 255 characters
A string, which the client application needs to generate, which acts as an anonymous identifier, unique to the client application, for the user.

Request parameters - optional



JSON object as above, showing the number of likes so far, now including the one being submitted.

No cookie/session is created or issued.

Error response

JSON object containing an error key and a text string.

Example error (text string will vary):

    "error": "An error occurred while adding the Like."

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *

Your comments: *
URL of page: *
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.