Get a link to the writetothem page for an MP

37 views
Skip to first unread message

david.win...@octoenergy.com

unread,
Jun 14, 2017, 12:19:11 PM6/14/17
to TheyWorkForYou
Hi,

Am building a campaign page where we show information per constituency and would like to link to the writetothem page for the current MP. The TheyWorkForYou API returns details of the MP including a person ID and member ID but doesn't seem to show the ID used in the URLs on the writetothem site (eg the 61830 in https://www.writetothem.com/write?who=61830&pc=EN1+2LZ)

Is there a way of retrieving this ID or the writetothem URL?

Thanks in advance,
David

Matthew Somerville

unread,
Jun 15, 2017, 6:13:26 AM6/15/17
to TheyWorkForYou
Hi,

As per the instructions on
https://www.writetothem.com/about-linktous#types , you should link to
the front page including a=westminstermp as a query string, plus any
other details you may already have gathered, and then it will do the
right thing. Not sure what you mean by "current MP" but presuming that
is "the MP based upon the user's postcode they've already entered",
then that's the way to go, hope that's helpful.

ATB,
Matthew

David Winterbottom

unread,
Jun 15, 2017, 6:16:38 AM6/15/17
to Matthew Somerville, TheyWorkForYou
Thanks Matthew, that's just what I need. Sorry I missed that bit of the docs. 

David

On 15 June 2017 at 11:13, Matthew Somerville <mat...@mysociety.org> wrote:
Hi,

As per the instructions on
https://www.writetothem.com/about-linktous#types , you should link to
the front page including a=westminstermp as a query string, plus any
other details you may already have gathered, and then it will do the
right thing. Not sure what you mean by "current MP" but presuming that
is "the MP based upon the user's postcode they've already entered",
then that's the way to go, hope that's helpful.

ATB,
Matthew

On 14 June 2017 at 17:19,  <david.winterbottom@octoenergy.com> wrote:
> Am building a campaign page where we show information per constituency and
> would like to link to the writetothem page for the current MP. The
> TheyWorkForYou API returns details of the MP including a person ID and
> member ID but doesn't seem to show the ID used in the URLs on the
> writetothem site (eg the 61830 in
> https://www.writetothem.com/write?who=61830&pc=EN1+2LZ)
>
> Is there a way of retrieving this ID or the writetothem URL?

--
You received this message because you are subscribed to a topic in the Google Groups "TheyWorkForYou" group.
To unsubscribe from this topic, visit https://groups.google.com/a/mysociety.org/d/topic/theyworkforyou/dccjI5EDOd4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to theyworkforyou+unsubscribe@mysociety.org.
To post to this group, send email to theywor...@mysociety.org.
Visit this group at https://groups.google.com/a/mysociety.org/group/theyworkforyou/.
To view this discussion on the web visit https://groups.google.com/a/mysociety.org/d/msgid/theyworkforyou/CAKs8PY0BUG_TEQPVCw-b6hA5gqk7q6UEwhyg34cVRLMw24EuVA%40mail.gmail.com.



--

Octopus. Energy reimagined.
octoenergy.com

Call 020 3542 7020 or visit us @ 20-24 Broadwick Street, London, W1F 8HT

This message is private and confidential. If you have received this message in error, please notify the sender and remove it from your system.

Octopus Energy Ltd is a company registered in England and Wales. Registered number: 09263424. Registered office: 33 Holborn, London, EC1N 2HT.

giane...@gmail.com

unread,
May 17, 2018, 10:25:16 AM5/17/18
to TheyWorkForYou, david.win...@octoenergy.com

giane...@gmail.com

unread,
May 17, 2018, 10:25:45 AM5/17/18
to TheyWorkForYou, david.win...@octoenergy.com


On Wednesday, 14 June 2017 17:19:11 UTC+1, david.win...@octoenergy.com wrote:
Reply all
Reply to author
Forward
0 new messages