To run the client SDK tests, create a default.json file in the config folder which contains the credentials of the Concur account to test with.
Template.json can be used as a template. You need to have a file named default.json under the config file with this object

//This will update the entry given by the entryId, and you can use any field support by entries from the link above.
var entry = {
'Comment': 'Test put',
};
var options = {
oauthToken:oauthToken,
contentType:'application/json',
id:entryId,
};
concur.entries.put(options)
.then(function(data){
//Contains the response code 204, for a successful resource update
})
.fail(function (error) {
// Error will contain the error returned by the server
});

Returns the Lists available to the oauth token used. Also allows you to add and updating existing lists. Lists are a grouping of related items.
For example a School has departments and those could be a list, and the courses under departments are the list items.

Gets a collection of Opportunities API for a specified trip or for all trips that fall within a date range.
Specify values for fromUtc and toUtc to get Opportunities API for a range of trips. Specify only tripId to get opportunities for a single trip.
Specify OpportunityType to filter results by the specified opportunity types.

Enables the client to interact with the receipt and
eReceipt Web services. Using this in the
SDK will also allow you to add receipts to any resource in Concur that allows receipts. For example entries and reports.

var concur = require('concur');
//If you have the image locally, this will post it to Concur.
var options = {
oauthToken:oauthToken,
image:image, //base 64 encoded
contentType:'image/png'
}
// Sending a receipt
concur.receipt.send(options)
.then(function(receiptID) {
//receiptID is returned on success
})
.fail(function(error) {
// error will contain the error message returned
});
//If you have a link to the image, using this will get the image, then post it to Concur.
options = {
oauthToken:oauthToken,
imageURL:'http://upload.wikimedia.org/wikipedia/commons/2/22/Turkish_Van_Cat.jpg'
};
concur.receipt.send(options)
.then(function(imageId) {
//receiptID is returned on success
})
.fail(function(error) {
//error will contain the error message returned
});
//If you have an [Expense Entry ID](#get-entries) this will add the image to the Entry.
options = {
oauthToken:oauthToken,
entryId:entryId,
image:image //base64 encoded image
};
concur.receipt.send(options)
.then(function(imageId) {
//receiptID is returned on success
})
.fail(function(error) {
//error will contain the error message returned
});
//If you have an [Expense Report ID](#get-reports) this will add the image to the Report.
options = {
oauthToken:oauthToken,
reportId:reportId,
image:image //base64 encoded image
};
concur.receipt.send(options)
.then(function(imageId) {
//receiptID is returned on success
})
.fail(function(error) {
//error will contain the error message returned
});

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.