en en en en en en en en en en fr en en en en en en en en en en en en en en en en en en en en en ms ur en en en en en nl en en en en nl en en en en en en en en en es es id fi en en en
Once you confirm a swap, we will share with your partner your voting preferences and email address, so they know who you are. We may send this information by email or text message.
We will never share anything with anyone else or post to your feed without your permission.
Find out more in our Privacy Policy and FAQ.
Swap My Vote does not have a conventional REST API, but we do have a single end point to pre-populate some of the fields that a user can choose.
This should be ideal for tactical voting campaigns which want to encourage voters to follow their recommendations, and indeed we would be very happy to see tactical voting sites integrate with Swap My Vote. The below documentation is probably sufficient, but if you need assistance then please get in touch.
The party that the user is willing to vote for, say tactically.
The party that the user would ideally like to vote for, say if all votes counted equally nationally.
The name of the default constituency for the user post-login. This is useful if you want to refer a user for tactical voting and you know in which constituency they are registered to vote, as it will save them manually selecting that constituency. The name must match one of the constituencies in the PCON18NM field of this data set.
The same as for constituency_name above, except that rather than the name, it's the ONS id of the constituency listed in the PCON18CD field of the data set.
For example if a tactical voting site wishes to recommend a user to vote for (randomly chosen) Liberal Democrats candidate in the Aberdeen North constituency, they could use this outbound link:
This one would also work, but rather than specify the tactical vote, instead specifies the user’s preferred party (randomly chosen) Liberal Democrats . This time their constituency is York Outer (specified by ONS code).
Preferred party and willing party can be used singly or in combination.
The party names should be lowercased and use underscores instead of spaces; here are the available options:
The constituencies for this by election are
Note that any parameters set are "sticky" and will apply even after the page is reloaded. They can be "unstuck" by adding ?clear to the end of the URL.