PwsSaveExpenseDocumentCostCard
Overview
This web service inserts or updates cost cards based on a detailed cost card structure (PwsCostCardDetail). The service returns the identity (PwsCostCardRef) of the cost card that has been inserted or updated. The caller can optionally request that the full cost card detail (PwsCostCardElement) be included in the response.
Request Format
- PwsSaveExpenseDocumentCostCard
- serviceRequest: PwsSaveExpenseDocumentCostCardRq
- RequestId: Int32
- SessionTicket: String
- Comments: String
- CostCard: PwsCostCardDetail *** deprecated ***
- DeleteReceipts: PwsReceiptRef[]
- ExpenseDocumentIdentity: PwsExpenseDocumentRef
- ExpenseDocumentTimestamp: String
- FullDetailFlag: Boolean
- InsertReceiptsIfNotFoundOnUpdateFlag: Boolean
- ResourceIdentity: PwsResourceRef *** deprecated ***
- SaveReceipts: PwsReceiptDetail[]
- UpdateReceiptsIfFoundOnInsertFlag: Boolean *** deprecated ***
- PreserveCostCardStatusFlag: Boolean *** deprecated ***
- CostCards: PwsCostCardDetail[]
- serviceRequest: PwsSaveExpenseDocumentCostCardRq
Request Elements
Element | Data Type | Required? | Default | Description | Sample Data |
---|---|---|---|---|---|
RequestId | Int32 | No | Click here for more information. | 1 | |
SessionTicket | String | Yes | Click here for more information. | AfMtiadjKEErha/5LNfifA== | |
Comments | String | No | Cost Card save / update comments. | Cost Card Creation | |
CostCard | deprecated | *** This field has been deprecated *** | |||
DeleteReceipts | No | The receipts to be deleted. | |||
ExpenseDocumentIdentity | On Insert: yes On Update: No | The expense document associated with the cost card. | |||
ExpenseDocumentTimestamp | String | No | This is a Base64 encoded timestamp utilized for expense document locking. To protect against overwriting other changes, you may optionally echo back the timestamp returned by a call to PwsGetExpenseDocumentCostCard (or a prior call to PwsSaveExpenseDocumentCostCard). This will cause the request to fail if any change has been made between invocations of PwsGetExpenseDocumentCostCard and PwsSaveExpenseDocumentCostCard. | ||
FullDetailFlag | Boolean | No | false | If set to 'true', include full detailed cost card element in response | true |
InsertReceiptsIfNotFoundOnUpdateFlag | Boolean | No | If set to 'true', specified receipts that are not found during an update will instead be inserted. | false | |
ResourceIdentity | deprecated | ** This field has been deprecated ** | |||
SaveReceipts | On Insert: No On Update: No | The receipt details to be inserted or updated | |||
UpdateReceiptsIfFoundOnInsertFlag | Boolean | deprecated | ** This field has been deprecated ** | ||
PreserveCostCardStatusFlag | Boolean | deprecated | ** This field has been deprecated ** | ||
CostCards | On Insert: Yes On Update: No | The cost card details of a new cost card |
Request Usage Example(s)
Response Format
- PwsSaveExpenseDocumentCostCardResponse
- PwsSaveExpenseDocumentCostCardResult: PwsSaveExpenseDocumentCostCardRs
- Messages: PwsMessage[]
- ResponseId: Int32
- Status: RequestStatus
- ServerTimestampUtc: DateTime
- CostCard: PwsCostCardElement
- CostCardIdentity: PwsCostCardRef
- CostCardResult: PwsSaveCostCardResult
- ExpenseDocumentTimestamp: String
- Location: PwsLocationSummary
- ReceiptResults: PwsSaveReceiptResult[]
- SaveSucceededFlag: Boolean
- CostCardIdentities: PwsCostCardRef[]
- CostCards: PwsCostCardElement[]
- PwsSaveExpenseDocumentCostCardResult: PwsSaveExpenseDocumentCostCardRs
Response Elements
Element | Data Type | Description | Sample Data |
---|---|---|---|
Messages | The web service response status and message. Click here for more information. | ||
ResponseId | Int32 | Click here for more information. | 1 |
Status | Click here for more information. | Ok | |
ServerTimestampUtc | DateTime | Click here for more information. | 2018-03-21T16:29:51.9180181Z |
CostCard | The details of the existing cost card. Applies if FullDetailFlag specified on input. If multiple cost cards saved, this is the first cost card. Maintained for backward compatibility. | ||
CostCardIdentity | The key fields of the updated or inserted cost card. If multiple cost cards saved, this is the first cost card. Maintained for backward compatibility. | ||
CostCardResult | The error details of a failed cost card save. | ||
ExpenseDocumentTimestamp | String | This is a Base64 encoded timestamp utilized for expense document locking. See Request Elements above for details. | AAAAAA64T1w= |
Location | The cost card location. If multiple cost cards saved, this is the location of the first cost card. Maintained for backward compatibility. | ||
ReceiptResults | The error details for receipts that failed to be inserted or updated. | ||
SaveSucceededFlag | Boolean | If set to 'true', the save has succeeded. | true |
CostCardIdentities | The key fields of the inserted cost cards. | ||
CostCards | The details of the new cost cards. Applies if FillDetailFlag specified on input. |
Response Usage Example(s)
PwsSaveExpenseDocumentCostCard - Common Errors and Warnings
- For all errors and warnings please refer to the Complete List of Errors and Warnings
ErrorNumber | ErrorCode | ErrorText |
---|---|---|
137 | CostCardDescriptionTruncated | The specified cost card description exceeded the maximum length of 4000 characters and was truncated. |
19001 | CostCardErrors | One or more cost cards could not be saved. The expense document was not created. Check CostCardResults for specific errors. |
19012 | NewCostCardProjectIdentityRequired | New project identity is required for the cost card transfer. |
19020 | ExpenseDocumentNotSpecifiedForSaveCostCard | No expense document was specified. |
19033 | InvalidValueForCostCardIncurredDate | The value specified for the cost card incurred date is invalid. Dates must be specified in UTC, with no time component (e.g. midnight UTC). |
19038 | CostCardIdentityRequiredForReceiptCostCard | Cost card identity is required. |
19045 | CostCardIdentitiesRequired | One or more cost card identities must be specified. |
19059 | CostCardIdentityRequired | A cost card identity must be specified. |
65152 | UnexpectedCostCardUdfValue | Unexpected UDF value provided (UDF metadata may have changed) |
65153 | CostCardIncurredDateRangeNotValid | Specified incurred date outside the supported date range. |
65196 | ReceiptsMayNotBeAssociatedWithIndividualCostCards | Account is configured not to allow receipts to be attached to individual cost cards. |
65200 | CostCardHasBeenChanged | Cost card has been changed by another user. |
65336 | CannotChangeSubmittedCostCardsApClosed | Cannot save changes to submitted cost card because the accounting period is closed for expenses. |
65374 | CostCardHasBeenDeleted | One or more referenced cost card(s) have been deleted. |
65379 | SaveCardCostCardHasBeenDeleted | Referenced cost card has been deleted. |
65385 | SaveReceiptCostCardHasBeenDeleted | Referenced cost card has been deleted. |
65393 | SelectCardCostCardHasBeenDeleted | Referenced cost card has been deleted. |
65470 | SpecifiedCostCardDoesNotBelongToSpecifiedExpenseDocument | Cost card/expense document mismatch |
65487 | LocationInactiveOrNotEnabledForCostCards | Specified location is inactive or not enabled for cost cards. |
65489 | CostCardRefInvalid | CostCardRef is required |
65491 | CostCardNotFound | CostCard not found |
65492 | ExpenseDocumentRefInvalid | ExpenseDocumentRef is required |
65494 | ExpenseDocumentNotFound | Expense document not found |
65495 | ExpenseDocumentHasBeenUpdatedByAnotherUser | Expense document has been changed. |
65502 | ReceiptRefInvalid | ReceiptRef is required |
65504 | ReceiptNotFound | Receipt not found |
65510 | ReceivedFlagIsRequired | Received flag must not be null |
65519 | CostCardAlreadyApproved | This cost card cannot be saved because it is already approved |
65520 | IncurredDateIsRequiredForNewCostCards | Incurred date is required for new cost cards |
65521 | TotalAmountDisbursedCurrencyIsRequiredForNewCostCards | Total amount in disbursed currency is required for new cost cards |
65522 | IncurredAmountIsRequiredForNewFxCostCards | Incurred amount is required for new cost cards with differing incurred and disbursed currencies |
65523 | IncurredAndDisbursedAmountMismatch | Incurred/disbursed total amount mismatch |
65525 | UserDefinedFieldValueUnavailable | Specified user defined field value is unavailable on at least one selected cost card. |
65529 | ExpenseReportResourceMustMatchCostCardResource | Expense report resource must match cost card resource |