Skip to main content
Question

UK EPC Certificate Download API


ingalla
Contributor
Forum|alt.badge.img+10

In the UK we are able to download energy performance certificates from the following government website. Energy Performance of Buildings Data England and Wales (opendatacommunities.org)

Unfortunately you need to register to gain access but its very straightforward.

Within there is access to an api, which I have tried to use within FME to automate the downloading of these certificates for a local authority area, but always get a failure.

Can anyone else connect to this API and download certificates and if so how.

Sorry i cant paste the API but it changes for each user...

 

Regards

16 replies

kailinatsafe
Safer
Forum|alt.badge.img+21

Hello @ingalla​, thanks for posting to the FME Community! It looks like the API requirements can be found here if you haven't come across them yet!

 

Are you using the HTTPCaller to connect to the API in FME Form? If so, would you be able to share a screenshot of your HTTPCaller parameters?

 

Also, apologies, are you able to elaborate on what is meant by 'failure' (eg. 404, 401, 500 error, etc.)? or a logfile would be awesome!

 

Have you been able to connect/pull from this API outside of FME Form? For example, with Postman or similar? Happy to help, Kailin.


Forum|alt.badge.img

Hi we seem to be having an issue downloading the certificate using https://epc.opendatacommunities.org/api/v1/domestic/certificate/:lmk-key

we have our APi and can pull in the LMK-key to the specific address but we arent able to download the certificate, ideally we need the URL to the cert and be able to download these docs to our CRM is this possible?


Forum|alt.badge.img
kailinatsafe wrote:

Hello @ingalla​, thanks for posting to the FME Community! It looks like the API requirements can be found here if you haven't come across them yet!

 

Are you using the HTTPCaller to connect to the API in FME Form? If so, would you be able to share a screenshot of your HTTPCaller parameters?

 

Also, apologies, are you able to elaborate on what is meant by 'failure' (eg. 404, 401, 500 error, etc.)? or a logfile would be awesome!

 

Have you been able to connect/pull from this API outside of FME Form? For example, with Postman or similar? Happy to help, Kailin.

Did you find a solution Kailin?


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 19, 2023
craigbramall81 wrote:

Hi we seem to be having an issue downloading the certificate using https://epc.opendatacommunities.org/api/v1/domestic/certificate/:lmk-key

we have our APi and can pull in the LMK-key to the specific address but we arent able to download the certificate, ideally we need the URL to the cert and be able to download these docs to our CRM is this possible?

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file


Forum|alt.badge.img
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

Ok Great, do you now how to pull in the URL link / certificate number ?

 

https://find-energy-certificate.service.gov.uk/energy-certificate/9998-5054-7261-7320-0294


kailinatsafe
Safer
Forum|alt.badge.img+21
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

Hello @craigbramall81​, sorry I am late to the game here! Take a look at the attached workspace. You'll need to replace the header value for authorization in the Header parameters of the HTTPCaller as well as the output file path:

imagePlease replace <your authorization token> with the appropriate value, but leave "Basic" Infront of the value. Let me know if you're still unable to download a certificate!


Forum|alt.badge.img
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

Hi, is it possible to retrieve the certificate number or the URL to the certificate?


Forum|alt.badge.img
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

as showing here https://find-energy-certificate.service.gov.uk/energy-certificate/9998-5054-7261-7320-0294


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 19, 2023
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

It doesn't look like the certificate number is returned by the api (although parts of it appear to form the lmk-key)


ingalla
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • September 19, 2023
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

Hi I have just picked this up again and changed the URL to bring back all local authority certs as csv, however, it only brings back 25 records and not the whole set. Andy

ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 19, 2023
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

That is expected, see the API docs linked above

Pagination

Without any additional query parameters the API will return the first page of of all the domestic certificates, with a default page size of 25 results. Additional pages can be requested by changing the pagination offset with the from and size query string parameters.


Forum|alt.badge.img

there seems to be a way of pulling in the URL link as I've seen lead gen providers, populate the URL when providing leads, this seems to be the missing part to the puzzle,


kailinatsafe
Safer
Forum|alt.badge.img+21
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

Hello @ingalla​, if we take a look at the API documentation, there are some notes on this under the "Pagination" section:

 

"Without any additional query parameters the API will return the first page of of all the domestic certificates, with a default page size of 25 results. Additional pages can be requested by changing the pagination offset with the from and size query string parameters."

 

I think you'll need to add ?size=<value>&from=<value> to the request URL. It also mentions the limits of records that can be returned by the API. Hope this helps, Kailin.


Forum|alt.badge.img
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

there seems to be a way of pulling the URL from somewhere as the leads that are provided to us come with the link https://find-energy-certificate.service.gov.uk/energy-certificate/9998-5054-7261-7320-0294 so they must be pulling it from somewhere 😩


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 19, 2023
ebygomm wrote:

To simply download a certificate you should just be able to make a get request using the lmk-keyimageand choose to save the response body to file

The first 4 digits and the last 8 digits are contained within the lmk-key, no idea about the second and third quadruplets

image


kailinatsafe
Safer
Forum|alt.badge.img+21
craigbramall81 wrote:

there seems to be a way of pulling in the URL link as I've seen lead gen providers, populate the URL when providing leads, this seems to be the missing part to the puzzle,

I wonder if you could rebuild the URL using using the information returned? They all seem to be formatted similarly. I thought maybe LOG_DEBUG would share the URL, but it does not.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings