This GET API can be used to retrieve the invoice document details for workbench and othe ruse cases in Quantum.
URL Format: https://api-leouat.gep.com/leo-invoice-elasticsearch/api/v1/InvoiceSearch/InvoiceDetails
https://api-leouat.gep.com/leo-invoice-elasticsearch/api/v1/InvoiceSearch/InvoiceDetails
Payload : {
"invoiceDocumentType": int,
"searchKeyword": "string",
"advanceSearchInput": [
{
"isCustAttr": bool,
"fieldType": "string",
"searchKey": "string",
"value": [
]
}
],
"includes": [],
"filters": [
"from:1",
"to:10"
],
"sort": {
"sortfieldName": "string",
"sortfielddirection": "string"
}
}
{
"returnValue": {
"elementList": [
{
"documentCode": "34add205-494b-43f5-9487-9dc58a68f8fb",
"invoiceDocumentType": 1,
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/34add205-494b-43f5-9487-9dc58a68f8fb"
},
{
"documentCode": "eba35009-5c3e-46b3-8f9c-e7ad49afd435",
"invoiceDocumentType": 1,
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/eba35009-5c3e-46b3-8f9c-e7ad49afd435"
},
{
"documentCode": "eac1059c-2e8d-47e1-b0c3-b5337471701a",
"invoiceDocumentType": 1,
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/eac1059c-2e8d-47e1-b0c3-b5337471701a"
},
{
"documentCode": "78d8cd3f-21d9-4b9b-9e23-37c29b9dccd2",
"invoiceDocumentType": 1,
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/78d8cd3f-21d9-4b9b-9e23-37c29b9dccd2"
},
{
"documentCode": "497bd3ac-4f09-409d-ba65-d5ce4da53378",
"invoiceDocumentType": 1,
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/497bd3ac-4f09-409d-ba65-d5ce4da53378"
},
{
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"documentCode": "d7dbbadf-4930-4b2e-9826-d828c6c8974a",
"invoiceDocumentType": 1,
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/d7dbbadf-4930-4b2e-9826-d828c6c8974a"
},
{
"invoiceDocumentType": 1,
"documentCode": "5310329d-41f0-40d3-a934-214c3db7f118",
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/5310329d-41f0-40d3-a934-214c3db7f118"
},
{
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"documentCode": "5bfa4c4c-456b-4653-b719-61b9f3eabcc2",
"invoiceDocumentType": 1,
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/5bfa4c4c-456b-4653-b719-61b9f3eabcc2"
},
{
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"invoiceDocumentType": 1,
"documentCode": "ce01fdae-1394-4fde-bd82-147387f3072c",
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/ce01fdae-1394-4fde-bd82-147387f3072c"
},
{
"subTypeAppId": "5fcc8aaf-c4d4-4a4c-8097-534517095bd3",
"documentCode": "2c1891dd-1d0b-4c4c-bb44-56a72fb8f20c",
"invoiceDocumentType": 1,
"Url": "https://nexxeqc.gep.com/LeoSMB/v3/#/supp-po-invoice-edit/2c1891dd-1d0b-4c4c-bb44-56a72fb8f20c"
}
],
"totalRows": 13,
"invoiceAggregation": []
},
"isSuccess": true,
"errors": null,
"exception": null,
"errorMessage": null,
"errorCode": null,
"correlationId": "0HN54RKEH1CJO:00000001"
}
Payload/Request | ||||
Property | Required? | Data type | Description | Validations / Exceptions |
invoiceDocumentType | No | int | Invoice Document Type is used to filter the documents on elastic search. If we’re not provided in the payload all invoice/ credit memo documents will fetch in the response. For Invoice we need to provide values like 1 – Supplier PO Invoice, 2 – Supplier Non Invoice, 4 – Customer PO Invoice, 5 – Customer Non Po Invoice, 7 – Supplier Contract Invoice | |
searchKeyword | No | String | Search Keyword will be used to filter documents. If we provided this keyword will apply filter on all fields | |
advanceSearchInput | No | Object | Array of search conditions we can provide here. Check Advance Search Input data element. | |
includes | No | Object | Array of fields (strings) we can provide here. This field will be used as projection for response data. | |
filters | Yes | Object | Array of string we should provide with from and to count. This field will be used as page nation for the response data. | If we’re not providing filters, response data will be empty. |
sort | Yes | Object | Sort object contains field name and direction. This is required to apply sorting on response data. | If we’re not providing sort, API will fail. |
Advance Search Input | ||||
Property | Required? | Data type | Description | Validations / Exceptions |
isCustAttr | Yes | boolean | This flag is required when applying filter on any field. | |
fieldType | Yes | String | We can apply different search criteria on fields like Exact, Contains, LogicalOpererator, Date range etc. | |
searchKey | Yes | String | Field Name on which we want to apply filter/search. | |
value | Yes | Object | Array of field values we can provide here. Data type of values may vary based on the search key. |
Sort | ||||
Property | Required? | Data type | Description | Validations / Exceptions |
sortfieldName | Yes | String | Field Name on which we want to apply sorting. | |
sortfielddirection | Yes | String | Sort direction we need to specify here. E.g. asc, desc |
Invoice Details Response | ||||
Property | Required? | Data type | Description | Validations / Exceptions |
returnValue | Object | Its an object that contains actual response data from API | ||
isSuccess | boolean | It’s a Boolean flag that defines API is successfully executed or not | ||
exception | Object | It’s provide stack trace if any exception occurred at API level | ||
errorMessage | string | It will just show as Exception Occurred if any |
Return Value | ||||
Property | Required? | Data type | Description | Validations / Exceptions |
elementList | Object | An array of invoice details comes in response specific to filters given in payload. Fields in this list may vary based on include fields list in the payload. | ||
totalRows | int | Total count of documents fetching for applied filters | ||
invoiceAggregations | Object | This list will give if any aggregations applied in the payload |