Adding mileage via API

Options
DaveSpadea
DaveSpadea Expensify Customer Posts: 2
I would like to create mileage expenses which include the nice Google maps receipt, as one might do through the web site, but I could see no clear way of doing that through the integrations api. I looked into how the web site is doing it, and I notice two things right off the bat:

1. The web site does not use the documented integrations api. It's using an api at expensify.com/api, which does not seem to work the same as the "public" one.

2. Maybe I'm wrong (I hope I am), but it seems like it's the web site generating the maps from google maps, essentially printing it to pdf in the browser, and then uploading that as a receipt. In order to get the same effect, I'd have to rebuild that functionality.

So I guess my questions are:

1. Is there another API I should be using? Or is the one documented at the below link the one we are supposed to be using?


2. Is there a way to send an API request to expensify, have it calculate the distance and reimbursement based on the currently configured rate, and generate a map receipt? Or are those separate bits logic I'd have to reimplement? The latter sounds really painful.

Best Answer

  • Jenna Hay
    Jenna Hay Expensify Customer, Expensify Team, Expensify Student Ambassador Posts: 73 Expensify Team
    Answer ✓
    Options
    Hi @DaveSpadea
    Sadly our API does not currently support creating mileage expenses nor uploading image files.  When other customers have wanted to build this kind of functionality, the way they did it was to use the Expense Creator job which creates a regular expense in Expensify and then include the mileage details within the expense details field.
    Another option would be to create a PDF "receipt" of the trip (e.g. a map, trip details plus the date and amount) which is then emailed to us and then we can SmartScan it and again create a regular expense with the merchant, date and amount.  The plus about this approach is that you would also be able to have the map added to the expense.
    Of course, the alternative to all this is to just use our mobile app or web mileage tracking functionality.
    Sorry, this probably isn't the answer you want to hear but hopefully clears things up for you.  Let me know if I can help with anything else.

Answers

  • DaveSpadea
    DaveSpadea Expensify Customer Posts: 2
    Options
    Thank you, Jenna. I'm trying to do an automated straight-through-processing type system for my company based on the day's activity log. Using the mobile app/web app is what I'm trying to get away from, because people are really bad about actually doing the data entry in a timely manner.

    I will probably just go with the first option of creating a regular expense with the details in the regular fields. It'll work well enough for tracking purposes, I guess. It's a little disappointing, though. It's going to look completely different on reports, and some of the web site's reporting features will undoubtedly work differently depending on the method of data entry. I'll also have to maintain the mileage rate and distance calculations in my system, which seems crazy as I'm using a service that already has all that implemented.

    Anyway, thanks again. I appreciate you taking the time to answer, even if it wasn't the answer I was hoping for.