workday.expense
Module workday.expense
API
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_workday.expense_1.5.0.png)
ballerinax/workday.expense Ballerina library
Overview
This is a generated connector for WorkDay Expense REST API v1 OpenAPI specification.
This API enables applications to access operations to extend the functionality of Workday Expenses.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a workday application in the Credential Administrator console
- Obtain tokens by following this guide
Clients![](/images/permalink.svg)
workday.expense: Client![](/images/permalink.svg)
This is a generated connector for WorkDay Expense REST API v1 OpenAPI specification. This API enables applications to access operations to extend the functionality of Workday Expenses.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials. Follow this guide and obtain tokens.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string - URL of the target service
getExpenseItemInstance![](/images/permalink.svg)
function getExpenseItemInstance(string id) returns ExpenseItemsServiceRepresentation|error
Retrieves a single instance of an expense item.
Parameters
- id string - The Workday ID of the resource.
Return Type
- ExpenseItemsServiceRepresentation|error - Successful response. A successful response can return no matched data.
getExpenseReportInstance![](/images/permalink.svg)
function getExpenseReportInstance(string id) returns ReportServiceRepresentation|error
Retrieves a single instance of an Expense Report.
Parameters
- id string - The Workday ID of the resource.
Return Type
- ReportServiceRepresentation|error - Successful response. A successful response can return no matched data.
getQuickExpenseInstance![](/images/permalink.svg)
function getQuickExpenseInstance(string id) returns ExpenseEntryServiceRepresentation|error
Retrieves a single instance of a Quick Expense.
Parameters
- id string - The Workday ID of the resource.
Return Type
- ExpenseEntryServiceRepresentation|error - Successful response. A successful response can return no matched data.
updateQuickExpenseInstance![](/images/permalink.svg)
function updateQuickExpenseInstance(string id, EntryServicePUTRepresentation payload) returns EntryServicePUTRepresentation|error
Updates an existing Quick Expense instance.
Return Type
- EntryServicePUTRepresentation|error - Successful response. A successful response can return no matched data. Updating file.
deleteQuickExpenseByID![](/images/permalink.svg)
Deletes a Quick Expense with the specified WID.
Secured by: Self-Service: Expense Report
Scope: Expenses
Parameters
- id string - The Workday ID of the resource.
Return Type
updateQuickExpenseByID![](/images/permalink.svg)
function updateQuickExpenseByID(string id, EntryServicePUTRepresentation payload) returns EntryServicePUTRepresentation|error
Partially updates an existing Quick Expense with the specified WID for the fields provided in the request body.
Secured by: Self-Service: Expense Report
Scope: Expenses
Contains attachment(s)
Return Type
- EntryServicePUTRepresentation|error - Successful response. A successful response can return no matched data. Updating file.
getCollectionOfExpenseReports![](/images/permalink.svg)
function getCollectionOfExpenseReports(string? expenseReportMemo, string[]? expenseReportStatus, string? fromDate, int? 'limit, int? offset, string? toDate) returns InlineResponse200|error
Retrieves a collection of expense reports.
Parameters
- expenseReportMemo string? (default ()) - Memo label to be used for REST API
- expenseReportStatus string[]? (default ()) - Status label to be used for REST API
- fromDate string? (default ()) - Creation Date label to be used for REST API
- 'limit int? (default ()) - The maximum number of objects in a single response. The default is 20. The maximum is 100.
- offset int? (default ()) - The zero-based index of the first object in a response collection. The default is 0. Use offset with the limit parameter to control paging of a response collection. Example: If limit is 5 and offset is 9, the response returns a collection of 5 objects starting with the 10th object.
- toDate string? (default ()) - Creation Date label to be used for REST API
Return Type
- InlineResponse200|error - Successful response. A successful response can return no matched data.
createExpenseReport![](/images/permalink.svg)
function createExpenseReport(ReportPostServiceRepresentation payload, string? expenseReportMemo, string[]? expenseReportStatus, string? fromDate, string? toDate) returns ReportPostServiceRepresentation|error
Creates an expense report.
Secured by: Self-Service: Expense Report
Scope: Expenses
Parameters
- payload ReportPostServiceRepresentation -
- expenseReportMemo string? (default ()) - Memo label to be used for REST API
- expenseReportStatus string[]? (default ()) - Status label to be used for REST API
- fromDate string? (default ()) - Creation Date label to be used for REST API
- toDate string? (default ()) - Creation Date label to be used for REST API
Return Type
- ReportPostServiceRepresentation|error - Resource created.
createCollectionExpenseReportLines![](/images/permalink.svg)
function createCollectionExpenseReportLines(string id, PostExpenseReportLineRepresentation payload) returns PostExpenseReportLineRepresentation|error
Creates a collection of expense report lines.
Return Type
- PostExpenseReportLineRepresentation|error - Resource created.
submitExpenseReportApproval![](/images/permalink.svg)
function submitExpenseReportApproval(string id, SubmitExpenseReportRepresentation payload) returns SubmitExpenseReportRepresentation|error
Submit the Expense Report for approval.
Secured by: Submit Expense Report (REST API)
Scope: Expenses
Return Type
- SubmitExpenseReportRepresentation|error - Resource created.
getCollectionOfQuickExpenses![](/images/permalink.svg)
function getCollectionOfQuickExpenses(string? entryType, string? expenseEntryStatus, string? fromDate, int? 'limit, int? offset, string? toDate) returns InlineResponse2001|error
Retrieves a collection of Quick Expenses.
Parameters
- entryType string? (default ()) - Identifies the class type of the expense instance.
- expenseEntryStatus string? (default ()) - Expense Status
- fromDate string? (default ()) - Date of Expense Entry
- 'limit int? (default ()) - The maximum number of objects in a single response. The default is 20. The maximum is 100.
- offset int? (default ()) - The zero-based index of the first object in a response collection. The default is 0. Use offset with the limit parameter to control paging of a response collection. Example: If limit is 5 and offset is 9, the response returns a collection of 5 objects starting with the 10th object.
- toDate string? (default ()) - Date of Expense Entry
Return Type
- InlineResponse2001|error - Successful response. A successful response can return no matched data.
createQuickExpenseInstance![](/images/permalink.svg)
function createQuickExpenseInstance(EntryServiceRepresentation payload, string? entryType, string? expenseEntryStatus, string? fromDate, string? toDate) returns EntryServiceRepresentation|error
Creates a Quick Expense instance. In the request body, you must specify the required TransactionDate field.
Secured by: Self-Service: Expense Report
Scope: Expenses
Contains attachment(s)
Parameters
- payload EntryServiceRepresentation -
- entryType string? (default ()) - Identifies the class type of the expense instance.
- expenseEntryStatus string? (default ()) - Expense Status
- fromDate string? (default ()) - Date of Expense Entry
- toDate string? (default ()) - Date of Expense Entry
Return Type
- EntryServiceRepresentation|error - Resource created.
createsNewAttachmentsForExpenseEntry![](/images/permalink.svg)
function createsNewAttachmentsForExpenseEntry(string id, ExpenseEntryImage payload) returns ExpenseEntryImage|error
Creates new attachments for the existing expense entry.
Return Type
- ExpenseEntryImage|error - Resource created.
getCollectionOfItems![](/images/permalink.svg)
function getCollectionOfItems(boolean? disallowFixedItems, int? 'limit, int? offset, string? searchString) returns InlineResponse2002|error
Retrieves a collection of expense items.
Parameters
- disallowFixedItems boolean? (default ()) - Is this expense item validated for a fixed amount?
- 'limit int? (default ()) - The maximum number of objects in a single response. The default is 20. The maximum is 100.
- offset int? (default ()) - The zero-based index of the first object in a response collection. The default is 0. Use offset with the limit parameter to control paging of a response collection. Example: If limit is 5 and offset is 9, the response returns a collection of 5 objects starting with the 10th object.
- searchString string? (default ()) - Request string used to retrieve the Expense Items
Return Type
- InlineResponse2002|error - Successful response. A successful response can return no matched data.
Records![](/images/permalink.svg)
workday.expense: ClientHttp1Settings![](/images/permalink.svg)
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
workday.expense: Company![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: ConnectionConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
workday.expense: ContentType![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: CreditCardTransaction![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: EntryServicePUTRepresentation![](/images/permalink.svg)
Fields
- attachments ExpenseEntryImage[]? - CRF for Entries REST operation to expose Attachment related to Optical Character Recognition
- amount record {}? - Amount for Expense Entry
- merchant string? - Expense Merchant Name
- expenseItem ExpenseItem? -
- date string - Date of Expense Entry
- memo string? - Memo for the Entry
- image Image? -
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: EntryServiceRepresentation![](/images/permalink.svg)
Fields
- attachments ExpenseEntryImage[]? - CRF for Entries REST operation to expose Attachment related to Optical Character Recognition
- hasOCRReceipt boolean? - Boolean value indicating whether the Mobile Expense has an OCR image.
- amount record {}? - Amount for Expense Entry
- scanStatus ScanStatus? -
- memo string? - Memo for the Entry
- expenseItem ExpenseItem? -
- date string? - Date of Expense Entry
- merchant string? - Expense Merchant Name
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: EntryType![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: ErrorModelReference![](/images/permalink.svg)
Fields
- 'error string - A description of the error
workday.expense: ExpenseEntryImage![](/images/permalink.svg)
Fields
- fileLength int? - File length of the attachment
- fileName string? - File name of the attachment
- contentType ContentType? -
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: ExpenseEntryServiceRepresentation![](/images/permalink.svg)
Fields
- expenseEntryStatus ExpenseEntryStatus? -
- amount record {}? - Amount for Expense Entry
- memo string? - Memo for the Entry
- entryType EntryType? -
- date string? - Date of Expense Entry
- scanStatus ScanStatus? -
- attachments ExpenseEntryImage[]? - CRF for Entries REST operation to expose Attachment related to Optical Character Recognition
- merchant string? - Expense Merchant Name
- expenseItem ExpenseItem? -
- hasOCRReceipt boolean? - Boolean value indicating whether the Mobile Expense has an OCR image.
- href string? - A link to the instance
- descriptor string? - A preview of the instance
- id string? - Id of the instance
workday.expense: ExpenseEntryStatus![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: ExpenseItem![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: ExpenseItemsServiceRepresentation![](/images/permalink.svg)
Fields
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: ExpenseReport![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: ExpenseReportStatus![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: FacetsModelReferenceInner![](/images/permalink.svg)
This object represents the possible facets for this resource
Fields
- descriptor string? - A description of the facet
- facetParameter string? - The alias used to select the facet
- values ItemValues[]? -
workday.expense: Image![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: InlineResponse200![](/images/permalink.svg)
collection something or other
Fields
- data ReportServiceRepresentation[]? -
- total int? -
workday.expense: InlineResponse2001![](/images/permalink.svg)
collection something or other
Fields
- data ExpenseEntryServiceRepresentation[]? -
- total int? -
workday.expense: InlineResponse2002![](/images/permalink.svg)
collection something or other
Fields
- data ExpenseItemsServiceRepresentation[]? -
- total int? -
workday.expense: InstanceModelReference![](/images/permalink.svg)
Fields
- id string - wid / id / reference id
- descriptor string? - A description of the instance
- href string? - A link to the instance
workday.expense: ItemValues![](/images/permalink.svg)
Fields
- count int? - The number of instances returned by this facet
- id string - wid / id / reference id
- descriptor string? - A description of the facet
- href string? - A link to the instance
workday.expense: MultipleInstanceModelReference![](/images/permalink.svg)
Fields
- total int? -
- data InstanceModelReference[]? -
workday.expense: Payee![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: PostExpenseReportLineRepresentation![](/images/permalink.svg)
Fields
- date string? - Date the Expense Report Line was created
- expenseItem ExpenseItem? -
- travelBookingRecord TravelBookingRecord? -
- memo string? - Memo for the Expense Report Line
- quickExpense QuickExpense? -
- creditCardTransaction CreditCardTransaction? -
- totalAmount record {}? - Total amount to be reimbursed to the requestee
- id string? - Id of the instance
- descriptor string? - A preview of the instance
workday.expense: ProxyConfig![](/images/permalink.svg)
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
workday.expense: QuickExpense![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: ReportPostServiceRepresentation![](/images/permalink.svg)
Fields
- payee Payee? -
- expenseReportMemo string? - Memo label to be used for REST API
- creationDate string? - Creation Date label to be used for REST API
- worktag WorkTag? -
- company Company? -
- descriptor string? - A preview of the instance
- id string? - Id of the instance
workday.expense: ReportServiceRepresentation![](/images/permalink.svg)
Fields
- totalAmount record {}? - Total Amount for the Expense Report
- expenseReportStatus ExpenseReportStatus? -
- creationDate string? - Creation Date label to be used for REST API
- expenseReportMemo string? - Memo label to be used for REST API
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: ScanStatus![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: SubmitExpenseReportRepresentation![](/images/permalink.svg)
Fields
- expenseReport ExpenseReport? -
- id string? - Id of the instance
- descriptor string? - A preview of the instance
workday.expense: TravelBookingRecord![](/images/permalink.svg)
Fields
- Fields Included from *InstanceModelReference
workday.expense: ValidationErrorModelReference![](/images/permalink.svg)
Fields
- Fields Included from *ErrorModelReference
- error string
- anydata...
- errors ErrorModelReference[]? - An array of validation errors
workday.expense: WorkTag![](/images/permalink.svg)
Fields
- Fields Included from *WorkTagsRepresentation
workday.expense: WorkTagsRepresentation![](/images/permalink.svg)
Fields
- descriptor string? - A preview of the instance
- id string? - Id of the instance
Import
import ballerinax/workday.expense;
Metadata
Released date: over 1 year ago
Version: 1.5.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Finance/Accounting
Cost/Paid
Contributors