Fetch BP Record List

POST /ws/rest/service/v1/bp/records/{project_number}

Purpose:

Get all list of record in of a specific BP in a shell based on shell number or from Company level if project/shell number is not provided.

The input JSON shall provide various options to be considered for fetching the data.

Input:

All parameters should be URL encoded.

Path Parameter

project_number: Specify the Project number in which the records exists, if not provided then records are considered to be fetched from Company Level.

filter_condition

{

"bpname" : "Vendors",

"lineitem" : "yes",

"lineitem_fields" : " uuu_tab_id;title",

"filter_condition" : "status=Active",

"record_fields" : "uuu_user_id;uuu_record_last_update_date"

}

POST body is a JSON, POST call has input & output both as JSON in the body.

The "bpname" is mandatory.

The "record_fields" (optional) is list of fields. That is to state: The data element names in the record upper form , only those fields (along with record_no) will be listed out in result.

The "lineitem_fields"(optional) is list of fields in the record lineitem form (only those fields will be listed out in the result).

The "lineitem" values "yes' or "no", default "yes," if not provided. If "no," then the record lineitem details will not be fetched in the result.

The "filter_condition" (optional) is the condition on the record level. The records which satisfy that criteria will be fetched. Only the "=" (equal) condition is supported.

Filter Criteria

BP Record list can be filtered further using filter_criteria,

"filter_criteria" should be added in POST data.

filter_criteria

{

"bpname" : "Vendors",

"lineitem" : "yes",

"lineitem_fields" : "uuu_tab_id;title",

"record_fields" : "uuu_user_id;uuu_record_last_update_date",

"filter_criteria":{

"join":"OR",

"filter":[

{

"field":"record_no",

"value":"VEN",

"condition_type":"like"

},

{

"field":"status",

"value":"Active",

"condition_type":"eq"

},

{

"field":"uuu_file_title",

"value":"first document title",

"condition_type":"like"

},

{

"field":"uuu_file_issue_date",

"value":"12-07-2017 07:54:00",

"value2":"05-07-2018",

"condition_type":"range"

}

]

}

}

filter_criteria key Definitions:

  1. The "join": (optional) Specify if the filter condition has to be combined using OR or AND operator. Default is AND.
  2. The "filter": List of filter conditions. Each condition will have "field", "value" ("value2" if condition_type is range) and condition_type.
    • The "field": BP form DE name for which the filter condition has to be applied.
    • The "value": value for the DE to filter the data.
    • The "value2": second value for the range condition. Not required to be specified for other conditions.
    • The "condition_type": the filter condition that needs to be applied.

Possible value for condition_type:

condition_type

Notes

Supported Data Element Types

like

For string data types. The value can contain the SQL wildcard characters when like is specified.

Text (String)

eq

For string, numeric and date data type. Will perform the exact match.

Text (String), Number, Cost, Date

lt

For numeric values. Will perform less than value.

Number, Cost, Date

gt

For numeric values. Will perform greater than value.

Number, Cost, Date

lteq

For numeric values. Will perform less than or equal value.

Number, Cost, Date

gteq

For numeric values. Will perform greater than or equal value.

Number, Cost, Date

neq

For numeric values. Will perform not equal value.

Text (String), Number, Cost, Date

range

Numeric, Date values. Will perform range search between value and value2.

Number, Cost, Date

Note: The Input Date fields should be provided in "MM-dd-yyyy HH:mm:ss" or ""MM-dd-yyyy" format in filter_criteria.

Earlier "filter_condition" (optional) is still supported, and it is the condition on the record level, records which satisfy that criteria will be fetched.

If both "filter_condition" and "filter_criteria" are provided together then It will be "AND" condition between "filter_condition" and "filter_criteria".

Output:

JSON object containing 'status', 'data', 'message'

A message will be present if status is not 200 otherwise it will be "success".

The below funding details for general spends, payment application, or generic cost BPs will be present in the response

Get BP list Sample Response

{

"data":

[

{

"uuu_user_id":"a@abc.com",

"uuu_record_last_update_date":"2018/04/23 11:06",

"_bp_lineitems":

[

{

"uuu_tab_id":"List of Contacts",

"li_num":1,

"title":"t"

}

],

"record_no":"VEN-0023"

},

{

"uuu_user_id":"a@abc.com",

"uuu_record_last_update_date":"2018/05/28 04:34",

"_bp_lineitems":

[

{

"uuu_tab_id":"List of Contacts",

"li_num":1,

"title":"t"

},

{

"uuu_tab_id":"List of Contacts",

"li_num":2,

"title":"t"

}

],

"record_no":"VEN-0024"

}

],

"message":

[ "success"

],

"status":200

}

Sample response with fund details

// For lineitem and CBS assignment rule

{

"data": [

{

"amount": 140,

"_bp_lineitems": [

{

"uuu_quantity": 1,

"amount": 10,

"group_id": 0,

"bItemID": "1_D_D~~1_D_D",

"uuu_tab_id": "Standard",

"uuu_unit_price": 10,

"short_desc": "a1",

"li_num": 1,

"unassigned_amount":20.30

"funds": [

{

"code": "City Funding",

"fund_balance": 790,

"assigned_amount":20

},

{

"code": "State Funding",

"fund_balance": 3500,

"assigned_amount":560

}

]

},

{

"uuu_quantity": 2,

"amount": 40,

"group_id": 0,

"bItemID": "2_D_D~~2_D_D",

"uuu_tab_id": "Standard",

"uuu_unit_price": 20,

"short_desc": "a2",

"li_num": 2

},

{

"uuu_quantity": 3,

"amount": 90,

"group_id": 0,

"bItemID": "1_D_D~~1_D_D",

"uuu_tab_id": "Standard",

"uuu_unit_price": 30,

"short_desc": "a3",

"li_num": 3

}

],

"record_no": "uxcost5-0010",

"due_date": null,

"title": "multiple li 2",

"status": "Pending"

}

],

"message": [

"success"

],

"status": 200

}

//For record level assignment rule

{

"data": [

{

"amount": 51600,

"unassigned_amount":7000,

"funds": [

{

"code": "City Funding",

"fund_balance": 3500,

"assigned_amount":560

},

{

"code": "State Funding",

"fund_balance": 3500,

"assigned_amount":560

}

],

"_bp_lineitems": [

{

"uuu_quantity": 50,

"amount": 50000,

"uuu_effective_date": null,

"group_id": 0,

"bItemID": "1_D_D~~1_D_D",

"uuu_tab_id": "Standard",

"upaItemUnitPrice": 1000,

"short_desc": "short desc 1",

"li_num": 1

},

{

"uuu_quantity": 4,

"amount": 1600,

"uuu_effective_date": null,

"group_id": 0,

"bItemID": "1_D_D~~1_D_D",

"uuu_tab_id": "Standard",

"upaItemUnitPrice": 400,

"short_desc": "short desc 2",

"li_num": 2

}

],

"record_no": "uxcost4-0004",

"due_date": null,

"refid": "uxcost1-0001",

"title": null,

"status": "Approved"

}

],

"message": [

"success"

],

"status": 200

}



Legal Notices | Your Privacy Rights
Copyright © 1998, 2022

Last Published Tuesday, February 8, 2022