concurreceiptsreceipts
Module concurreceiptsreceipts
API
Definitions
edotco/concurreceiptsreceipts
SAP Concur concurreceiptsreceipts Connector
A Ballerina connector for SAP Concur concurreceiptsreceipts API.
Overview
This connector provides integration with SAP Concur's concurreceiptsreceipts service.
Usage
import ballerinax/sap.concur.concurreceiptsreceipts;
Generated from official SAP Concur OpenAPI specification.
Clients
concurreceiptsreceipts: Client
Version 4.0 of the Receipts API offers features such as a wider variety of receipt types, the ability to automatically generate e-receipts in the end user's preferred language, and the capability for partners to provide detailed tax information.
Constructor
Gets invoked to initialize the connector.
init (ApiKeysConfig apiKeyConfig, ConnectionConfig config, string serviceUrl)- apiKeyConfig ApiKeysConfig - API keys for authorization
- config ConnectionConfig {} - The configurations to be used when initializing the
connector
- serviceUrl string "https://hostname/" - URL of the target service
postReceiptsV4Status
function postReceiptsV4Status(v4_status_body payload, map<string|string[]> headers) returns inline_response_200[]|errorBulk status
Parameters
- payload v4_status_body - Either receiptIds or forwardIds. Include only receiptIds OR forwardIds, but not both. Limitations of Swagger 2.0 mean that the oneOf directive can't be used to properly model these parameters.
Return Type
- inline_response_200[]|error - Bulk status results
getReceiptsV4DigitizedImage
Digitized image by ID
Parameters
- receiptId string - The ID of the receipt.
Return Type
- error? - The digitized (certified) copy of the image, complete with any accompanying PDF metadata
getReceiptsV4DigitizedImages
function getReceiptsV4DigitizedImages(map<string|string[]> headers, *GetReceiptsV4DigitizedImagesQueries queries) returns error?Digitized image by alternate query parameters
Parameters
- queries *GetReceiptsV4DigitizedImagesQueries - Queries to be sent with the request
Return Type
- error? - The digitized (certified) copy of the image, complete with any accompanying PDF metadata
getReceiptsV4ImageOnlyReceipts
function getReceiptsV4ImageOnlyReceipts(string receiptId, map<string|string[]> headers) returns imageOnlyReceipt|errorImage-only receipt by ID
Parameters
- receiptId string - The ID of the receipt
Return Type
- imageOnlyReceipt|error - JSON representing a receipt and its associated metadata.
getReceiptsV4ImageOnlyReceiptsImage
function getReceiptsV4ImageOnlyReceiptsImage(string receiptId, map<string|string[]> headers) returns error?Image by ID
Parameters
- receiptId string - The ID of the receipt
Return Type
- error? - The v4 image file associated with the receiptId. This is not the Imaging Service copy of the image but might be visually similar.
getReceiptsV4
function getReceiptsV4(map<string|string[]> headers) returns linkObject[]|errorService index
Return Type
- linkObject[]|error - A list of Receipts API endpoints available in this environment
getReceiptsV4ById
Receipt by ID
Parameters
- receiptId string - The ID of the receipt
getReceiptsV4Image
Image by ID
Parameters
- receiptId string - The ID of the receipt
Return Type
- error? - The v4 image file associated with the receiptId. This is not the Imaging Service copy of the image but might be visually similar.
getReceiptsV4Status
Receipt status
Parameters
- receiptId string - The ID of the receipt
Return Type
- error? - Status information about the receipt, including logs about the back-end processing of the receipt.
getReceiptsV4States
function getReceiptsV4States(string receiptId, map<string|string[]> headers) returns inline_response_200_1|errorReceipt by ID
Parameters
- receiptId string - The ID of the receipt
Return Type
- inline_response_200_1|error - JSON representing an E-receipt and its associated metadata.
getReceiptsSchemas
function getReceiptsSchemas(map<string|string[]> headers) returns inline_response_200_2|errorSchema index
Return Type
- inline_response_200_2|error - A list of JSON schemas
getReceiptsSchemasById
function getReceiptsSchemasById(string schemaId, map<string|string[]> headers) returns record {}|errorSchema by ID
Parameters
- schemaId string - The ID of the schema
Return Type
- record {}|error - A single JSON schema
getReceiptsV4Sdr
SDR
Parameters
- receiptId string - The ID of the receipt
postReceiptsV4Sdr
function postReceiptsV4Sdr(string receiptId, receiptId_sdr_body payload, PostReceiptsV4SdrHeaders headers) returns error?Create SDR
Parameters
- receiptId string - The ID of the receipt
- payload receiptId_sdr_body - JSON representation of SDR data to be updated. Nested JSON objects/arrays (supplierAddress and taxes) must also have at least one key value pair from the associated schema. For updates of a field, object, or array a non empty value must be provided. For deletion of a field, object, or array the value must be null. rateType is the only exception to this rule. To delete data associated with a tax rate, set the rateType to one of the allowed values and set any other related fields to null. Empty objects or values will not be accepted.
- headers PostReceiptsV4SdrHeaders (default {}) - Headers to be sent with the request
Return Type
- error? - The SDR has been accepted for processing.
getReceiptsV4SdrExtracts
function getReceiptsV4SdrExtracts(map<string|string[]> headers, *GetReceiptsV4SdrExtractsQueries queries) returns error?SDR extract
Parameters
- queries *GetReceiptsV4SdrExtractsQueries - Queries to be sent with the request
Return Type
- error? - Zip file containing all SDR records for the company during the specified fiscal period
getReceiptsV4UsersImageOnlyReceipts
function getReceiptsV4UsersImageOnlyReceipts(string userId, "consumed"|"consumable"|"discarded" state, map<string|string[]> headers) returns inline_response_200_3|errorReceipts for a user by state
Parameters
- userId string - UUID (not login ID) of the user
- state "consumed"|"consumable"|"discarded" - Desired state for the set of returned receipts. Valid states are consumable (not attached to an expense report), consumed (attached), and discarded (deleted by the user). Not to be confused with "status", which refers to the processing status of the receipt, not the state of the receipt within Expense.
Return Type
- inline_response_200_3|error - JSON representing the receipts owned by this user. If no receipts are found for this user, an empty array of receipts is returned.
getReceiptsV4UsersByIdImageOnlyReceipts
function getReceiptsV4UsersByIdImageOnlyReceipts(string userId, map<string|string[]> headers) returns inline_response_200_4|errorImage-only receipts by userId
Parameters
- userId string - UUID (not login ID) of the user
Return Type
- inline_response_200_4|error - JSON representing the image-only receipts owned by this user. If no receipts are found for this user, an empty array of receipts is returned.
postReceiptsV4UsersImageOnlyReceipts
function postReceiptsV4UsersImageOnlyReceipts(string userId, userId_imageonlyreceipts_body payload, map<string|string[]> headers) returns error?New image-only receipt
Return Type
- error? - The receipt has been accepted and will be processed soon.
getReceiptsV4Users
function getReceiptsV4Users(string userId, "consumed"|"consumable"|"discarded" state, map<string|string[]> headers) returns inline_response_200_5|errorReceipts for a user by state
Parameters
- userId string - UUID (not login ID) of the user
- state "consumed"|"consumable"|"discarded" - Desired state for the set of returned receipts. Valid states are consumable (not attached to an expense report), consumed (attached), and discarded (deleted by the user). Not to be confused with "status", which refers to the processing status of the receipt, not the state of the receipt within Expense.
Return Type
- inline_response_200_5|error - JSON representing the receipts owned by this user. If no receipts are found for this user, an empty array of receipts is returned.
postReceiptsV4Users
function postReceiptsV4Users(string userId, "consumed"|"consumable"|"discarded" state, receiptIdObject payload, map<string|string[]> headers) returns error?Receipt state
Parameters
- userId string - UUID (not login ID) of the user
- state "consumed"|"consumable"|"discarded" - Desired state for the set of returned receipts. Valid states are consumable (not attached to an expense report), consumed (attached), and discarded (deleted by the user). Not to be confused with "status", which refers to the processing status of the receipt, not the state of the receipt within Expense.
- payload receiptIdObject - An object containing the id of the receipt to be modified
Return Type
- error? - The state change request has been accepted. The new state might not be reflected immediately.
getReceiptsV4UsersById
function getReceiptsV4UsersById(string userId, map<string|string[]> headers) returns inline_response_200_5|errorReceipts by userId
Parameters
- userId string - UUID (not login ID) of the user
Return Type
- inline_response_200_5|error - JSON representing the receipts owned by this user. If no receipts are found for this user, an empty array of receipts is returned.
postReceiptsV4UsersById
function postReceiptsV4UsersById(string userId, PostReceiptsV4UsersByIdHeaders headers, users_userId_body payload) returns error?New E-receipt
Parameters
- userId string - UUID (not login ID) of the user
- headers PostReceiptsV4UsersByIdHeaders - Headers to be sent with the request
- payload users_userId_body -
Return Type
- error? - The receipt has been accepted and will be processed soon.
Records
concurreceiptsreceipts: ApiKeysConfig
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- Authorization string -
concurreceiptsreceipts: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache CacheConfig(default {}) - 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
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nilvalues are treated as optional, and absent fields are handled asnilabletypes. Enabled by default.
concurreceiptsreceipts: eReceipt
Fields
- modifiedAt? string - Timestamp corresponding to the last time the receipt record was modified
- companyId? string - UUID of the company that the receipt owner belongs to
- dateTimeReceived? string - Timestamp corresponding to when the receipt was saved to the system
- entityId? string - Expense entityId of the company that the receipt owner belongs to
- validationSchema? "http://schema.concursolutions.com/general-receipt.schema.json"|"http://schema.concursolutions.com/air-receipt.schema.json"|"http://schema.concursolutions.com/car-rental-receipt.schema.json"|"http://schema.concursolutions.com/ground-transport-receipt.schema.json"|"http://schema.concursolutions.com/hotel-receipt.schema.json"|"http://schema.concursolutions.com/jpt-ic-card-receipt.schema.json"|"http://schema.concursolutions.com/rail-receipt.schema.json" - The JSON schema used to validate the E-receipt data
- receipt? record {} - The actual data of the E-receipt
- image? string - Link to the v4 copy of the image that corresponds to this E-receipt.
- userId? string - The UUID of the user to whom the receipt belongs
- id? string - An opaque string identifier for this receipt
- digitizationStatus? "NO_PROCESSING_REQUIRED"|"PROCESSING"|"PROCESSED"|"FAILED" - Status of any back-end processing related to the digitization of a physical paper receipt.
- forwardId? record {} - The forwardId, if one was submitted with the original POST request to create this receipt
- self? string - Self-link for this receipt
- template? string - URL template for this resource
concurreceiptsreceipts: GetReceiptsV4DigitizedImagesQueries
Represents the Queries record for the operation: getReceiptsV4DigitizedImages
Fields
- forwardId? string - The forwardId submitted along with the original receipt POST request
concurreceiptsreceipts: GetReceiptsV4SdrExtractsQueries
Represents the Queries record for the operation: getReceiptsV4SdrExtracts
Fields
- company\-id string - Company UUID
- fiscal\-period string - One month fiscal period in the format YYYY-MM
concurreceiptsreceipts: imageOnlyReceipt
Fields
- modifiedAt? string - Timestamp corresponding to the last time the receipt record was modified
- companyId? string - UUID of the company that the receipt owner belongs to
- dateTimeReceived? string - Timestamp corresponding to when the receipt was saved to the system
- entityId? string - Expense entityId of the company that the receipt owner belongs to
- digitizationData? imageOnlyReceipt_digitizationData -
- image? string - Link to the v4 copy of the receipt image
- userId? string - The UUID of the user to whom the receipt belongs
- id? string - An opaque string identifier for this receipt
- digitizationStatus? "NO_PROCESSING_REQUIRED"|"ACCEPTED"|"PROCESSING"|"PROCESSED"|"FAILED" - Status of any back-end processing related to the digitization of a physical paper receipt.
- forwardId? record {} - The forwardId, if one was submitted with the original POST request to create this receipt
- self? string - Self-link for this receipt
- template? string - URL template for this resource
concurreceiptsreceipts: imageOnlyReceipt_digitizationData
Fields
- captureMethod? "expenseItCapture"|"mobileCapture" - The method used to capture this image of a paper receipt for digitization
- hashCode? string - SHA-512 hash of the image. Used to verify the provenance of the image.
concurreceiptsreceipts: inline_response_200
Fields
- receiptId? string - The v4 receiptId
- responseCode? decimal - The response code associated with the status entry for this individual receipt. When calling for status of multiple receipts at once, some statuses might come back with a 200, but other might fail with a different status code, such as 404. In these cases, the failed status results will include the response code and the receiptId, but no status information.
- receiptStatus? receiptsv4status_receiptStatus -
- receiptEventLogs? string - Link to the detailed status entries for this individual receipt.
concurreceiptsreceipts: inline_response_200_2
Fields
- receiptSchemas linkObject[] -
concurreceiptsreceipts: inline_response_200_3
Fields
- imageOnlyReceipts? eReceipt[] -
- next? string - Link to the next page of receipts, if the response included the maximum of 50 receipts. The next page of receipts is available at this URL. If the next page also contains 50 receipt, it will also contain a next page link, and so on.
concurreceiptsreceipts: inline_response_200_4
Fields
- imageOnlyReceipts? imageOnlyReceipt[] -
- next? string - Link to the next page of receipts, if the response included the maximum of 50 receipts. The next page of receipts is available at this URL. If the next page also contains 50 receipt, it will also contain a next page link, and so on.
concurreceiptsreceipts: inline_response_200_5
Fields
- receipts? eReceipt[] -
- next? string - Link to the next page of receipts, if the response included the maximum of 50 receipts. The next page of receipts is available at this URL. If the next page also contains 50 receipt, it will also contain a next page link, and so on.
concurreceiptsreceipts: linkObject
Fields
- rel? string - HATEOAS "relationship" to the current resource
- href? string - URI template for this resource
- method? string - HTTP method to use against this resource
concurreceiptsreceipts: PostReceiptsV4SdrHeaders
Represents the Headers record for the operation: postReceiptsV4Sdr
Fields
- link? "<http://schema.concursolutions.com/spain-sdr.schema.json>;rel=describedBy" - A link to the SDR schema to be used to validate the incoming E-receipt data. Currently, Spain is the only locality supported for SDR.
concurreceiptsreceipts: PostReceiptsV4UsersByIdHeaders
Represents the Headers record for the operation: postReceiptsV4UsersById
Fields
- link "<http://schema.concursolutions.com/general-receipt.schema.json>;rel=describedBy"|"<http://schema.concursolutions.com/car-rental-receipt.schema.json>;rel=describedBy"|"<http://schema.concursolutions.com/air-receipt.schema.json>;rel=describedBy"|"<http://schema.concursolutions.com/ground-transport-receipt.schema.json>;rel=describedBy"|"<http://schema.concursolutions.com/hotel-receipt.schema.json>;rel=describedBy"|"<http://schema.concursolutions.com/rail-receipt.schema.json>;rel=describedBy" - A link to the E-receipt schema to be used to validate the incoming E-receipt data. Retrieve the list of schemas from the GET schemas route.
concurreceiptsreceipts: receiptId_sdr_body
Fields
- sdrData? sdr -
concurreceiptsreceipts: receiptIdObject
Fields
- id? string - v4 receipt ID
concurreceiptsreceipts: receiptsv4status_receiptStatus
Fields
- status? "ACCEPTED"|"PROCESSING"|"PROCESSED"|"FAILED" - The overall processing status of the receipt.
- digitizationStatus? "NO_PROCESSING_REQUIRED"|"ACCEPTED"|"PROCESSING"|"PROCESSED"|"FAILED" - Status of any back-end processing related to the digitization of a physical paper receipt.
concurreceiptsreceipts: sdr
Fields
- invoiceNumber? string -
- invoiceType? "FA"|"FC"|"OT" - Invoice Types for Spain. FA, FC, & OT represent a Simplified Invoice, a Full Invoice, and Other respectively
- supplierName? string -
- supplierTaxId? string -
- supplierAddress? sdr_supplierAddress -
- transactionDate? string -
- issueDate? string -
- taxes? record {||}[] -
concurreceiptsreceipts: sdr_supplierAddress
Fields
- streetAddress? string -
- addressLocality? string -
- addressRegion? string -
- addressCountry? string - 2-character country code
- postalCode? string -
concurreceiptsreceipts: userId_imageonlyreceipts_body
Fields
- image record { fileContent byte[], fileName string } - The receipt image
- clientData? record { fileContent byte[], fileName string } - Metadata about the capture of a paper receipt. Required for special GRDC processing rules to take effect. This parameter should be JSON. Please see the model for clientData for more details.
- forwardId? string - A user provided string of up to 40 characters used to identify a receipt submission. Should be unique from the perspective of the client application. If a receipt is submitted with a forwardId that already exists in the system for that particular client, the request will be rejected with a 304 Not Modified response. This helps prevent duplicate receipt submissions from mobile clients.
concurreceiptsreceipts: users_userId_body
Fields
- receipt string - The JSON data for the receipt
- image? record { fileContent byte[], fileName string } - The image for this E-receipt. If no image is submitted, one will be generated automatically based on the JSON data.
concurreceiptsreceipts: v4_status_body
Fields
- receiptIds? string[] - Array of up to 50 receiptIds to retrieve status for
- forwardIds? string[] - Array of forwardIds (max 50) associated with receipts. When using forwardIds receipts will only be retrievable if the caller uses the same auth mechanism used to post the receipt. If both a JWT and client cert were used, the JWT will take precedence
Simple name reference types
concurreceiptsreceipts: inline_response_200_1
inline_response_200_1
Import
import edotco/concurreceiptsreceipts;Metadata
Released date: 9 months ago
Version: 1.0.1
Compatibility
Platform: any
Ballerina version: 2201.12.7
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads