Log into the API using the same credentials you would to log into Assure Expenses online. You will be provided with a LoginResponse. The properties of this response should be included in the header of all subsequent requests.
| Name | Description | Additional information |
|---|---|---|
| request | Provide a fully populated LoginRequest object. |
Define this parameter in the request body. |
{
"Username": "sample string 1",
"Password": "sample string 2",
"Company": "sample string 3"
}
<LoginRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Requests"> <Company>sample string 3</Company> <Password>sample string 2</Password> <Username>sample string 1</Username> </LoginRequest>
Sample not available.
{
"AuthToken": "sample string 1",
"CanAccessCheckAndPay": true,
"NumberOfClaimsAwaitingApproval": 3,
"AllowMultipleStepJourneys": true,
"MandatoryPostcodeForAddresses": true,
"HasActiveJourneys": true,
"HasElectronicDeclaration": true,
"ApproveDeclarationMessage": "sample string 8",
"ClaimantDeclarationMessage": "sample string 9",
"SingleClaimOnly": true,
"AllowReceiptsForExpenseItems": true,
"HasCreditCard": true,
"HasPurchaseCard": true,
"BankAccountRequiredForExpense": true,
"BankAccountElementAccessPermissions": null,
"AllowClaimantsToAddManualAddresses": true,
"IsAddressNameMandatory": true,
"ReceiptServiceEnabled": true,
"ValidationServiceEnabled": true,
"WhetherExcludeExpiredVehicles": true,
"IsHomeToOfficeEnabled": true,
"UserMayEditDetails": true,
"CostcodeBreakdownSettings": {
"UseDepartmentCodes": true,
"DepartmentsOn": true,
"UseDepartmentCodeDescription": true,
"UseDeptOnGenDetails": true,
"UseCostCodes": true,
"CostCodesOn": true,
"UseCostCodeDescription": true,
"UseCostCodeOnGenDetails": true,
"UseProjectCodes": true,
"ProjectCodesOn": true,
"UseProjectCodeDescription": true,
"UseProjectCodeOnGenDetails": true,
"UseDefaultAllocation": true
},
"CanNotifyAdminOfChanges": true,
"IsNHSCustomer": true,
"UserMayAddVehicles": true,
"UserMaySelectVehicleRates": true,
"UserCanSpecifyVehicleStartDate": true,
"StartDateMandatoryWhenAddingVehicle": true,
"ActivateCarOnUserAdd": true,
"ShowFullHomeAddressOnClaims": true,
"HomeAddressKeyword": "sample string 30",
"ActiveVehicleCount": 31,
"PostCodeAnywhereKey": "sample string 32",
"UseDateOfExpenseForDutyOfCareChecks": true,
"ShowHolidays": true,
"EsrAssignmentRequriedForExpense": true,
"ShowMyAdvances": true,
"IsMapsEnabled": true,
"ShowAdvances": true,
"AccountLockedMessage": "sample string 39",
"AccountCurrentlyLockedMessage": "sample string 40",
"CanAskForReviews": true,
"EmployeeId": 42,
"VehicleLookup": true,
"OcrServiceEnabled": true,
"ResponseInformation": {
"Errors": [
{
"ErrorCode": "sample string 1",
"Message": "sample string 2"
},
{
"ErrorCode": "sample string 1",
"Message": "sample string 2"
},
{
"ErrorCode": "sample string 1",
"Message": "sample string 2"
}
],
"Status": 0,
"Links": [
{
"Rel": "sample string 1",
"Href": "sample string 2",
"Title": "sample string 3",
"IsTemplated": true
},
{
"Rel": "sample string 1",
"Href": "sample string 2",
"Title": "sample string 3",
"IsTemplated": true
},
{
"Rel": "sample string 1",
"Href": "sample string 2",
"Title": "sample string 3",
"IsTemplated": true
}
]
}
}
<LoginResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Responses">
<ResponseInformation xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Common">
<Errors>
<ApiErrorDetail>
<ErrorCode>sample string 1</ErrorCode>
<Message>sample string 2</Message>
</ApiErrorDetail>
<ApiErrorDetail>
<ErrorCode>sample string 1</ErrorCode>
<Message>sample string 2</Message>
</ApiErrorDetail>
<ApiErrorDetail>
<ErrorCode>sample string 1</ErrorCode>
<Message>sample string 2</Message>
</ApiErrorDetail>
</Errors>
<Links>
<Link>
<Href>sample string 2</Href>
<IsTemplated>true</IsTemplated>
<Rel>sample string 1</Rel>
<Title>sample string 3</Title>
</Link>
<Link>
<Href>sample string 2</Href>
<IsTemplated>true</IsTemplated>
<Rel>sample string 1</Rel>
<Title>sample string 3</Title>
</Link>
<Link>
<Href>sample string 2</Href>
<IsTemplated>true</IsTemplated>
<Rel>sample string 1</Rel>
<Title>sample string 3</Title>
</Link>
</Links>
<Status>Failure</Status>
</ResponseInformation>
<AccountCurrentlyLockedMessage>sample string 40</AccountCurrentlyLockedMessage>
<AccountLockedMessage>sample string 39</AccountLockedMessage>
<ActivateCarOnUserAdd>true</ActivateCarOnUserAdd>
<ActiveVehicleCount>31</ActiveVehicleCount>
<AllowClaimantsToAddManualAddresses>true</AllowClaimantsToAddManualAddresses>
<AllowMultipleStepJourneys>true</AllowMultipleStepJourneys>
<AllowReceiptsForExpenseItems>true</AllowReceiptsForExpenseItems>
<ApproveDeclarationMessage>sample string 8</ApproveDeclarationMessage>
<AuthToken>sample string 1</AuthToken>
<BankAccountElementAccessPermissions i:nil="true" />
<BankAccountRequiredForExpense>true</BankAccountRequiredForExpense>
<CanAccessCheckAndPay>true</CanAccessCheckAndPay>
<CanAskForReviews>true</CanAskForReviews>
<CanNotifyAdminOfChanges>true</CanNotifyAdminOfChanges>
<ClaimantDeclarationMessage>sample string 9</ClaimantDeclarationMessage>
<CostcodeBreakdownSettings xmlns:d2p1="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types">
<d2p1:CostCodesOn>true</d2p1:CostCodesOn>
<d2p1:DepartmentsOn>true</d2p1:DepartmentsOn>
<d2p1:ProjectCodesOn>true</d2p1:ProjectCodesOn>
<d2p1:UseCostCodeDescription>true</d2p1:UseCostCodeDescription>
<d2p1:UseCostCodeOnGenDetails>true</d2p1:UseCostCodeOnGenDetails>
<d2p1:UseCostCodes>true</d2p1:UseCostCodes>
<d2p1:UseDefaultAllocation>true</d2p1:UseDefaultAllocation>
<d2p1:UseDepartmentCodeDescription>true</d2p1:UseDepartmentCodeDescription>
<d2p1:UseDepartmentCodes>true</d2p1:UseDepartmentCodes>
<d2p1:UseDeptOnGenDetails>true</d2p1:UseDeptOnGenDetails>
<d2p1:UseProjectCodeDescription>true</d2p1:UseProjectCodeDescription>
<d2p1:UseProjectCodeOnGenDetails>true</d2p1:UseProjectCodeOnGenDetails>
<d2p1:UseProjectCodes>true</d2p1:UseProjectCodes>
</CostcodeBreakdownSettings>
<EmployeeId>42</EmployeeId>
<EsrAssignmentRequriedForExpense>true</EsrAssignmentRequriedForExpense>
<HasActiveJourneys>true</HasActiveJourneys>
<HasCreditCard>true</HasCreditCard>
<HasElectronicDeclaration>true</HasElectronicDeclaration>
<HasPurchaseCard>true</HasPurchaseCard>
<HomeAddressKeyword>sample string 30</HomeAddressKeyword>
<IsAddressNameMandatory>true</IsAddressNameMandatory>
<IsHomeToOfficeEnabled>true</IsHomeToOfficeEnabled>
<IsMapsEnabled>true</IsMapsEnabled>
<IsNHSCustomer>true</IsNHSCustomer>
<MandatoryPostcodeForAddresses>true</MandatoryPostcodeForAddresses>
<NumberOfClaimsAwaitingApproval>3</NumberOfClaimsAwaitingApproval>
<OcrServiceEnabled>true</OcrServiceEnabled>
<PostCodeAnywhereKey>sample string 32</PostCodeAnywhereKey>
<ReceiptServiceEnabled>true</ReceiptServiceEnabled>
<ShowAdvances>true</ShowAdvances>
<ShowFullHomeAddressOnClaims>true</ShowFullHomeAddressOnClaims>
<ShowHolidays>true</ShowHolidays>
<ShowMyAdvances>true</ShowMyAdvances>
<SingleClaimOnly>true</SingleClaimOnly>
<StartDateMandatoryWhenAddingVehicle>true</StartDateMandatoryWhenAddingVehicle>
<UseDateOfExpenseForDutyOfCareChecks>true</UseDateOfExpenseForDutyOfCareChecks>
<UserCanSpecifyVehicleStartDate>true</UserCanSpecifyVehicleStartDate>
<UserMayAddVehicles>true</UserMayAddVehicles>
<UserMayEditDetails>true</UserMayEditDetails>
<UserMaySelectVehicleRates>true</UserMaySelectVehicleRates>
<ValidationServiceEnabled>true</ValidationServiceEnabled>
<VehicleLookup>true</VehicleLookup>
<WhetherExcludeExpiredVehicles>true</WhetherExcludeExpiredVehicles>
</LoginResponse>