PwsGetMileageRate
Overview
This web service retrieves one mileage rate using the identity of a resource (PwsResourceRef), the identity of an expense document (PwsExpenseDocumentRef), or both. If both identities are provided, the resources must match or an error is returned in the response.Â
Request Format
- PwsGetMileageRate
- serviceRequest: PwsGetMileageRateRq
- RequestId: Int32
- SessionTicket: String
- DisbursedCurrencyIdentity: PwsCurrencyRef
- EffectiveDate: DateTime
- ExpenseDocumentIdentity: PwsExpenseDocumentRef
- ResourceIdentity: PwsResourceRef
- serviceRequest: PwsGetMileageRateRq
Request Elements
Element | Data Type | Required? | Default | Description | Sample Data |
---|---|---|---|---|---|
RequestId | Int32 | No | Click here for more information. | ||
SessionTicket | String | Yes | Click here for more information. | ARNkL4C1bp7KLtsSXQW6/g== | |
DisbursedCurrencyIdentity | Either DisbursedCurrencyIdentity or ExpenseDocumentIdentity must be provided | The disbursed currency for mileage rate. If both DisbursedCurrencyIdentity and ExpenseDocumentIdentity are provided, the disbursing currency of the expense document must match the specified disbursed currency. Otherwise, an error is returned in the response. If both DisbursedCurrencyIdentity and ResourceIdentity are provided and there is a mismatch between the resource's disbursed currency and the specified currency, a null mileage rate is returned in the response. Click here for more information. | |||
EffectiveDate | DateTime | No | The effective date for which to retrieve the mileage rate. | 2018-03-01z | |
ExpenseDocumentIdentity | See DisbursedCurrencyIdentity above | The identify of the expense document whose resource's location is what the mileage rate is based on. The document's disbursed currency must match the one in DisbursedCurrencyIdentity if provided, and the document's resource must match the one in ResourceIdentity if provided. Otherwise, an error is returned in both cases. Click here for more information. | |||
ResourceIdentity | No | The resource whose mileage rate is requested. If both ExpenseDocumentIdentity and ResourceIdentity are both provided, this resource must match the resource on the expense document. If neither is provided in the request, requesting user/resource is used to locate the mileage rate. If this user is not a resource, an error is returned in the response. Click here for more information. |
Request Usage Example(s)
Response Format
- PwsGetMileageRateResponse
- PwsGetMileageRateResult: PwsGetMileageRateRs
- Messages: PwsMessage[]
- ResponseId: Int32
- Status: RequestStatus
- ServerTimestampUtc: DateTime
- EffectiveEndDate: DateTime
- EffectiveStartDate: DateTime
- MileageRate: Double
- MileageUom: String
- PwsGetMileageRateResult: PwsGetMileageRateRs
Response Elements
Element | Data Type | Description | Sample Data |
---|---|---|---|
Messages | The web service response status and message. Click herefor more information | ||
ResponseId | Int32 | Click here for more information. | 0 |
Status | RequestStatus | Click here for more information | Ok |
ServerTimestampUtc | DateTime | Click here for more information. | 2018-03-08T15:50:59.35176Z |
EffectiveEndDate | DateTime | The mileage rate's effective end date | 9999-12-31T00:00:00Z |
EffectiveStartDate | DateTime | The mileage rate's effective start date | 2013-01-01T00:00:00Z |
MileageRate | Double | The mileage rate for this resource based on resource's location | 0.565 |
MileageUom | String | The unit of the Mileage. 'M' is for miles and 'K' for kilometers. | M |
Response Usage Example(s)
PwsGetMileageRate - Common Errors and Warnings
- For all errors and warnings please refer to the Complete List of Errors and Warnings
ErrorNumber | ErrorCode | ErrorText |
---|---|---|
57545 | ResourceNotFound | The specified resource does not exist. |
65629 | ResourceNotOwnerOfExpenseReport | The specified resource does not match the expense report resource. |
65630 | GivenCurrencyNotSameAsReportCurrency | The specified currency does not match the expense document's disbursed currency. |
65631 | ExpenseDocumentOrDisbursingCurrencyRequired | Either an expense document or a disbursing currency must be specified when retrieving mileage rates. |
65678 | ResourceCannotBeDeterminedForMileageRate | Resource cannot be determined in order to look up mileage rate. (ex. when authenticated user is not a resource ...) |