Giter VIP home page Giter VIP logo

concurdisruptsf's Introduction

What is Concur?

Concur is a travel and expense software solution that lets 25M business travelers book their travel, capture expense, submit expense reports, and more. Concur processes over 55 million transactions every year, representing $50 billion spend on T&E.

What can I do with Concur APIs?

The Travel/Itinerary API (v1.1) lets you access a Concur user's itinerary, including hotel/flight booking info. As an example, you can mash-up the Itinerary API with a restaurant database/API to provide recommendations of places to eat near a COncur user's hotel booking.

The Expense API (v3.0) allows you to get (and push) a Concur user's expense information, including expense line items, their types (e.g. food, lodging), totals, and even receipt images.

Here's an example on how to get an Itinerary List of a Concur user:

curl https://www.concursolutions.com/api/travel/trip/v1.1
-H "Authorization: OAuth <insert your access token here>"

To get an expense summary by using the Expense Report Digest API:

curl https://www.concursolutions.com/api/v3.0/expense/reportdigests
-H "Authorization: OAuth <insert your access token here>"
-H "Accept: application/json"

To get an access token (or learn how to generate one), please click here to advance to the section below.

You can interact with the API using Swagger here

For the Itinerary APIs (v1.1), full API documentation, and apps that use the APIs, please refer to:

https://developer.concur.com/get-started/webservices-overview

Ideas for a Concur-powered business travel app:

Check out the Concur main prize and mashup category prizes in this link

Mash-up Idea
Concur + Yodlee Mashup Yodlee's Aggregation API and Concur's Itinerary API to filter transactions related to the trip. A report can then be generated showing spend trends. (BONUS prize: +1 more free pass worth $99 to The Perfect Trip DevCon)
Concur + Pebble Use Pebble to confirm if purchase is personal or business - see car mileage expense sample code here (BONUS prize: 5 Pebble smartwatches to winning team)
Concur + Twilio Call/SMS a Twilio number to submit your expense (voice through AVR or SMS) (BONUS prize: 3 x Google Chromecast)
Concur + Mashery Mashup Concur with any Mashery API listed in their API Explorer (BONUS prize: $100 Amazon gift card)
Concur + Moxtra Use Moxtra's Clip or Draw modules to add context when sending an image receipt to Concur (e.g. Instead of typing in the total value in an image receipt, user can instead draw a circle around the total value which can then be processed/extracted faster by the receiving backend); Use Moxtra Chat SDK to create space to chat, share images, itinerary, expense reports, etc. with travel group (BONUS prize: Free 1-year Moxtra SDK service if app is commercialized after hackathon)
Concur + Sinch When recommending places to eat near a user's hotel booking, users could click a button to call the restaurant in-app (using Sinch) and make a reservation or ask a question about the food. (BONUS prize: $500 of Sinch calling credit)
Concur + EvoSnap Create a simple POS application that sent the payment/transaction data to EVO Snap* and also to Concur. (BONUS prize: Limited edition EvoSnap jacket)
Concur + Weather Wunderground Predict weather using Concur traveler's destination and date; Cross-match Concur expenses with weather (e.g. Allows company to identify/allocate expense budget based on upcoming weather)
Concur + Esri Use Esri's different mapping layers/functionalities to add visual context to a Concur user's destination (e.g. POIs that match a Concur user's expense habits - coffee shops)
Concur + Evernote Image receipts saved in an Evernote folder are OCR'd and sent to Concur as Quick Expense. Image files are also automatically uploaded to Concur's ReceiptImage API
Concur + Microsoft Use Windows Azure as backend for Concur app
Concur + Clover Display QR code to Clover POS reader to send purchase as expense to Concur
Concur + Spark Use Concur itinerary data to alert IoT devices hooked to Spark Core Kit in hotel room to set themselves according to user's preference (e.g. When person walks in, lights adjust and an automatic request for shaving kit is sent out)
Concur + IBM Bluemix Use IBM Bluemix backend to run Concur apps
Concur + DigitalOcean Use DigitalOcean to power your Concur apps
Concur + Golgi Use Golgi to get realtime updates of a Concur user's Itinerary (e.g. instant notification to a travel app when a Concur user makes a new flight/hotel booking)
Concur + Mastercard Use smartwatch to confirm if Mastercard purchase line item should be sent to Concur as expense (or ignored if personal purchase)
Concur + Nexmo At the end of your business trip, automatically send your boss an email on how much money you saved the company by accepting SMS/calls through your Nexmo number.
Concur + Paypal Provide functionality to pick PayPal purchases and send to Concur as expense
Concur + Twitter
Concur + Yammer Coordinate group travel by pulling Concur itinerary API and dynamically creating a group in Yammer tied to flight date and destination

Find more app ideas here

Prizes

  • Best Use of Concur API -- Up to $2,500 in Amazon Gift Cards – For an app that demonstrates the best use of Concur APIs; prize distribution is $500 to each winning team member.
  • Best Use of Concur API + Co-Sponsor API On-stage - Free passes to The Perfect Trip DevCon 2014 ($99 per ticket) - For teams (2 tickets per team) that demonstrate the best of the Concur API + co-sponsor API onstage. For example, best use of Concur + Yodlee, Best use of Concur + Pebble, and so on. Applies to all Disrupt co-sponsors listed in mashup list above. All contestants can also apply to pitch their app for a shot at $100K in prizes. (https://developer.concur.com/devcon/PerfectTripFundAwards)

Additional Information

The subsections below provide a more detailed information on how to:

Generate an access token

  1. Get your Consumer Key

After logging in to http://concursolutions.com, go to Administration -> Register Partner Application -> Concur Partner Application (Modify). We need the consumer key so we can call the endpoint that would return the access token. (Note: Get your Concur login/password from Chris at the Concur booth or email him at [email protected])

  1. Call the access token request endpoint

Here's what the HTTP call looks like to request for an access token:

    GET https://www.concursolutions.com/net2/oauth2/accesstoken.ashx HTTP 1.1
    Authorization: Basic am9obl9kZXZlbG90bWFpbC5jb206VHJhdmVsJkV4cGVuc2UkMjAxMg==
    X-ConsumerKey: eZByXv2X41cJlC21pSVvRi    

Note that we already have X-ConsumerKey from number 1. To generate the Authorization: Basic value, you need to Base64-encode the login ID, colon and password such that [email protected]:Travel&Expense$2012 becomes am9obl9kZXZlbG90bWFpbC5jb206VHJhdmVsJkV4cGVuc2UkMjAxMg==. If you're not doing this programmatically yet, you can use this nifty web tool to generate that value (remember to choose Encode).

If you're using a Terminal, an equivalent curl statement of the above would be:

    curl https://www.concursolutions.com/net2/oauth2/accesstoken.ashx
    -H "Authorization: Basic am9obl9kZXZlbG90bWFpbC5jb206VHJhdmVsJkV4cGVuc2UkMjAxMg=="
    -H "X-ConsumerKey: eZByXv2X41cJlC21pSVvRi"

If the call is successful, you should get an XML response with a <Token> node. That's your access token. We recommend that you use Postman, a Chrome extension, to help you manage your API calls (not just Concur ones). Here's what the API calls look like in Postman:

  1. Call the APIs to pull expense report items

After getting an access token, we can pull dummy data from the Expense Report Digest, like so (in Terminal):

    curl https://www.concursolutions.com/api/v3.0/expense/reportdigests
    -H "Authorization: OAuth <insert your access token here>"

This would return an Expense Report response, with a field called ID. We need this ID to extract the expense line items we created in the app earlier. To liven things up a bit, let's use the Swagger documentation of the "Entries" API to get the individual expense line items:

We highlighted two things here, the (oval) field where you put in your access token, and the (rectangle) field where you put in the ID we got from the previous API call. Note that we can do this same call in curl, or in any fashion you want. Swagger just provides us a consolidated way to make the API calls.

To execute the call, click the "Try it out!" button. You should get a response like this below:

Note: The steps demonstrated above follow the OAuth Native Flow. If you prefer something similar to a Facebook login experience, you can check out the OAuth Web Flow here

Back to Top

POST/GET dummy data to/from Concur - the API or app

  1. Pushing dummy data to Concur using the API
POST a dummy Itinerary to Concur:

      Request Type = POST
      Authorization = OAuth <your access token>
      URI = https://www.concursolutions.com/api/travel/trip/v1.1/
      ContentType = Application/XML
      Body = 
       <?xml version="1.0"?>
       <Itinerary xmlns="http://www.concursolutions.com/api/travel/trip/2010/06">
       <TripName>TechCrunch Disrupt Concur</TripName>
       <StartDateLocal>2014-10-30T03:47:14</StartDateLocal>
       <EndDateLocal>2014-11-06T03:47:14</EndDateLocal>
       <Bookings>
        <Booking>
         <Segments>
             <Hotel>
                 <Status>HK</Status>
                 <StartCityCode>SFO</StartCityCode>
                 <StartDateLocal>2014-10-30T07:47:14</StartDateLocal>
                 <EndDateLocal>2014-11-06T03:47:14</EndDateLocal>
                 <Name>Times Square Hilton New York</Name>
                 <RecordLocator>Hotel Locator</RecordLocator>
                 <RoomDescription>1 KING BED ACCESSIBLE ROOM - K1RRC</RoomDescription>
                 <Currency>USD</Currency>
                 <CancellationPolicy>Cxl 1 day prior to Arrival</CancellationPolicy>
                 <DailyRate>240.3500</DailyRate>
                 <NumRooms>1</NumRooms>
                 <NumPersons>1</NumPersons>
                 <RateCode>LV4</RateCode>
                 <Charges>
                     <Rate>
                         <Currency>USD</Currency>
                         <Amount>10.00</Amount>
                         <StartDatelocal>2014-05-30T07:47:14</StartDatelocal>
                         <IsPrimary>false</IsPrimary>
                         <SemanticsCode>ROOMRATE</SemanticsCode>
                         <PerUnit>DAY</PerUnit>
                         <NumUnits>3.00</NumUnits>
                     </Rate>
                 </Charges>
             </Hotel>
         </Segments>
         <RecordLocator>Disrupt123</RecordLocator>
         <BookingSource>Sample Itin for Disrupt</BookingSource>
         <DateBookedLocal>2014-10-30T03:47:14</DateBookedLocal>
       </Booking>
       <Booking>
         <Segments>
             <Air>
                 <Vendor>AA</Vendor>
                 <FlightNumber>425</FlightNumber>
                 <StartCityCode>SFO</StartCityCode>
                 <StartDateLocal>2014-10-30T03:47:14</StartDateLocal>
                 <EndCityCode>NYC</EndCityCode>
                 <EndDateLocal>2014-11-30T07:47:14</EndDateLocal>
                 <Cabin>O</Cabin>
                 <ClassOfService>O</ClassOfService>
             </Air>
         </Segments>
         <RecordLocator>Air Locator</RecordLocator>
         <BookingSource>Sample Itin for Disrupt</BookingSource>
         <DateBookedLocal>2014-10-30T03:47:14</DateBookedLocal>
       </Booking>
     </Bookings>
     </Itinerary>

**Hack tip :** More details on the Itinerary API v1.1. [here](https://developer.concur.com/api-documentation/web-services/itinerary/itinerary-resource/itinerary-resource-get)
     
POST Expense Report Header to Concur: 

     Request Type = POST
     Authorization = OAuth <your access token>
     URI = https://www.concursolutions.com/api/expense/expensereport/v1.1/report
     ContentType = Application/XML
     Body = 
     <Report xmlns="http://www.concursolutions.com/api/expense/expensereport/2011/03">
         <Name>Disrupt Hackathon NYC Trip</Name>
         <Purpose>All Hackathon Expenses</Purpose>
         <Comment>Includes hotel and meals.</Comment>
         <OrgUnit1>US</OrgUnit1>
         <OrgUnit3>Bellevue</OrgUnit3>
         <Custom1>Client</Custom1>
         <Custom2>Local</Custom2>
         <UserDefinedDate>2014-05-01 15:15:07.0</UserDefinedDate>
     </Report>
**Hack tip 1:** You can POST using JSON by setting the header to `Content-Type:application/json` and checking out a sample JSON body in our [Swagger](https://www.concursolutions.com/api/docs/index.html#!/Entries) doc.  Note that the examples here use v1.1, and those shown in Swagger use v3.0.

**Hack tip 2**: You need to generate a report header to be able to submit an expense entry.  A collection of entries is a report.
    
*Click [here](https://developer.concur.com/api-documentation/web-services/expense-report) to view the relationship of an Expense Report Header to an Expense Report Entry and search for **Expense Report Processes**.   *

GET Expense Report Details:

     Request Type = GET
     Authorization = OAuth <your access token>
     URI = https://www.concursolutions.com/api/expense/expensereport/v2.0/Reports/?reportcountry=US
     ContentType = Application/JSON

POSTing Expense Report Entry:

     Request Type = POST
     Authorization = OAuth <your access token>
     URI = https://www.concursolutions.com/api/expense/expensereport/v1.1/report/B6F4FD62FB424911A3B8/entry
     ContentType = Application/XML
     Body = 
     <ReportEntries xmlns="http://www.concursolutions.com/api/expense/expensereport/2011/03">
     <Expense>
         <CrnCode>USD</CrnCode>
         <ExpKey>BRKFT</ExpKey>
         <Description>Starbucks for Breakfast</Description>
         <TransactionDate>2014-05-01</TransactionDate>
         <TransactionAmount>15.54</TransactionAmount>
         <Comment>Breakfast meeting</Comment>
         <VendorDescription>Starbucks</VendorDescription>
         <IsPersonal>N</IsPersonal>
     </Expense>
     </ReportEntries> 
  1. Pushing dummy expense data to Concur using the app

You can access the web version of Concur at http://concursolutions.com/ or get the mobile app from App Store or Google Play.

You can view/add new expenses (and even add a receipt image!) to have a variety of data to pull for your API calls. After adding expenses, you can create a report to associate it with by tapping the "Add to Report" button (in the last screenshot above).

Back to Top

Sample code

Example apps

All app integrations with Concur can be found in the App Center. Below are just two examples that would hopefully give you an idea on what to build:

  • TravelText - TravelText allows you to text your expenses right into Concur. No more paper receipts and Excel sheet mayhem! Check out their video demo here.

  • Trover - it's travel photography + business travel integration in one great app. Quoting from this article, what they get for integrating with Concur is "being able to tap into Concur’s experience, knowledge and “great visibility into travel patterns”".

Challengepost also lists Concur API integrations from previous hackathons. Definitely worth checking out!

Back to Top

concurdisruptsf's People

Contributors

ismaelc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.