Create BP Record with Attachment

POST /ws/rest/service/v1/bp/record/file/{project_number}

Purpose:

Create a record in 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 from Company Level.

POST body is a JSON

Note: POST call has input & output both as JSON in the body.

{

"options": {

"bpname": "Vendors",

"workflow_details":

{

"workflow_name": "workflow_name",

"user_name" : "first_name last_name",

"action_name" : "action_name"

}

},

"data": [

{

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

"uuu_record_last_update_date": "04-12-2018",

"uveFaxTB16": null,

"uveCertificateNoTB64": null,

"uvePrimaryContactTB64": "a",

"title": "v-00101",

"uveLicenseNoTB16": null,

"uuu_contact_company": "v-00101",

"uveCOIAmoutCA": 0,

"_bp_lineitems": [

{

"uirCntctFstNmTB": "a",

"uuu_user_workphone": null,

"uuu_tab_id": "List of Contacts",

"title": "t",

"ugenAddress1TXT120": null,

"ugenAddress2TXT120": null,

"ugenCountryPD": null,

"ugenCityTXT50": null,

"short_desc": "Vendor Contact",

"uriCntctLstNmTB": "b",

"ugenStatePD": null,

"ugenZipCodeTXT16": null,

"uveEmailTB120": "hello@abc.com",

"ugenAddress3TXT120": null,

"_attachment":[

{

"file_name":"new 1.txt",

"title":"file_title",

"issue_date":"05/06/2018",

"revision_no":"100"

}

]

}

],

"uvePolicyNoTB32": null,

"uveVendorTypePD": "Architect",

"ugenCityTXT50": null,

"uveCoiExpDOP": null,

"uuu_dm_publish_path": "v_path",

"uuu_contact_last_name": "b",

"ugenZipCodeTXT16": null,

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

"ugenAddress3TXT120": null,

"uveReferenceIdTB16": null,

"uuu_creation_date": "04-12-2018",

"ugenRemarksTB4000": null,

"uvePhoneTB64": null,

"uveTaxIDTB16": null,

"uveMinorityBusCB": 0,

"uveInsuranceCoTB32": null,

"ugenExpirationDateDOP": null,

"uveWomanOwnedCB": 0,

"uveVendorNameTB50": "v-00101",

"ugenAddress1TXT120": null,

"uveDisadvantagedBusCB": 0,

"ugenDiscipline": null,

"creator_id": "Company Administrator",

"ugenAddress2TXT120": null,

"ugenCountryPD": null,

"uveVendorIDTB16": "v-00101",

"ugenStatePD": null,

"uuu_contact_first_name": "a",

"status": "Active",

"_attachment":[

{

"file_name":"new 1.txt",

"title":"file_title1",

"issue_date":"05/06/2018",

"revision_no":"300"

},

{

"file_name":"exp1.txt",

"title":"file_title2",

"issue_date":"05/06/2018",

"revision_no":"200"

}

]

}

]

,

"_attachment": {

"zipped_file_name" : "create.zip",

"zipped_file_size": "746089",

"zipped_file_content" :"< base64_encoded string of create.zip file>"

}

}

If "adding attachment" is disabled in Upper form or Detail form, and user is trying to attach file to corresponding form. Creating record will fail.

If "record_no" is not provided, then the auto-generated record_no will be assigned to the record

If a unique "record_no" is provided, then the record will be created be given record_no.

Output:

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

A message will be present if status is not 200.

Status codes are:

1> 200 OK , if all creation succeeds .

2> 3000 , If any of records creation fail.

Note: Only one record input should be provided in Create BP record with attachment.

Create BP Sample Response

{

"data": [],

"message": [

{

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

"uuu_record_last_update_date": "04-12-2018",

"uveFaxTB16": null,

"uveCertificateNoTB64": null,

"uvePrimaryContactTB64": "a",

"title": "v-00101",

"uveLicenseNoTB16": null,

"uuu_contact_company": "v-00101",

"_record_status": "success",

"uveCOIAmoutCA": 0,

"_bp_lineitems": [

{

"uirCntctFstNmTB": "a",

"uuu_user_workphone": null,

"uuu_tab_id": "List of Contacts",

"title": "t",

"ugenAddress1TXT120": null,

"_attachment": [

{

"issue_date": "05/06/2018",

"revision_no": "100",

"file_name": "new 1.txt",

"title": "file_title"

}

],

"ugenAddress2TXT120": null,

"ugenCountryPD": null,

"ugenCityTXT50": null,

"short_desc": "Vendor Contact",

"uriCntctLstNmTB": "b",

"ugenStatePD": null,

"ugenZipCodeTXT16": null,

"uveEmailTB120": "hello@abc.com",

"ugenAddress3TXT120": null

}

],

"uvePolicyNoTB32": null,

"_attachment": [

{

"issue_date": "05/06/2018",

"revision_no": "300",

"file_name": "new 1.txt",

"title": "file_title1"

},

{

"issue_date": "05/06/2018",

"revision_no": "200",

"file_name": "exp1.txt",

"title": "file_title2"

}

],

"record_no": "VEN-0086",

"uveVendorTypePD": "Architect",

"ugenCityTXT50": null,

"uveCoiExpDOP": null,

"uuu_dm_publish_path": "v_path",

"uuu_contact_last_name": "b",

"ugenZipCodeTXT16": null,

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

"ugenAddress3TXT120": null,

"uveReferenceIdTB16": null,

"uuu_creation_date": "04-12-2018",

"ugenRemarksTB4000": null,

"uvePhoneTB64": null,

"uveTaxIDTB16": null,

"uveMinorityBusCB": 0,

"uveInsuranceCoTB32": null,

"ugenExpirationDateDOP": null,

"uveWomanOwnedCB": 0,

"uveVendorNameTB50": "v-00101",

"ugenAddress1TXT120": null,

"uveDisadvantagedBusCB": 0,

"ugenDiscipline": null,

"creator_id": "Company Administrator",

"ugenAddress2TXT120": null,

"ugenCountryPD": null,

"uveVendorIDTB16": "v-00101",

"ugenStatePD": null,

"uuu_contact_first_name": "a",

"status": "Active"

}

],

"status": 200

}

in case of any error :

{

"data": [],

"message": [

{

"_record_status": "Error Business Process record_no hello already exists. ",

"record": {

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

"uuu_record_last_update_date": "04-12-2018",

"uveFaxTB16": null,

"uveCertificateNoTB64": null,

"uvePrimaryContactTB64": "a",

"title": "v-00101",

"uveLicenseNoTB16": null,

"uuu_contact_company": "v-00101",

"uveCOIAmoutCA": 0,"uveTaxIDTB16": null,

"_bp_lineitems": [

{

"uirCntctFstNmTB": "a",

"uuu_user_workphone": null,

"uuu_tab_id": "List of Contacts",

"title": "t",

"ugenAddress1TXT120": null,

"ugenAddress2TXT120": null,

"ugenCountryPD": null,

"ugenCityTXT50": null,

"short_desc": "Vendor Contact",

"uriCntctLstNmTB": "b",

"ugenStatePD": null,

"ugenZipCodeTXT16": null,

"uveEmailTB120": "hello@abc.com",

"ugenAddress3TXT120": null

}

],

"uvePolicyNoTB32": null,

"record_no": "hello",

"_attachment": [

{

"file_name": "new 1.txt"

}

],

"uveVendorTypePD": "Architect",

"ugenCityTXT50": null,

"uveCoiExpDOP": null,

"uuu_dm_publish_path": "v_path",

"uuu_contact_last_name": "b",

"ugenZipCodeTXT16": null,

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

"ugenAddress3TXT120": null,

"uveReferenceIdTB16": null,

"uuu_creation_date": "04-12-2018",

"ugenRemarksTB4000": null,

"uvePhoneTB64": null,

"uveTaxIDTB16": null,

"uveMinorityBusCB": 0,

"uveInsuranceCoTB32": null,

"ugenExpirationDateDOP": null,

"uveWomanOwnedCB": 0,

"uveVendorNameTB50": "v-00101",

"ugenAddress1TXT120": null,

"uveDisadvantagedBusCB": 0,

"ugenDiscipline": null,

"creator_id": "Company Administrator",

"ugenAddress2TXT120": null,

"ugenCountryPD": null,

"uveVendorIDTB16": "v-00101",

"ugenStatePD": null,

"uuu_contact_first_name": "a",

"status": "Active"

}

}

],

"status": 3000

}

or if zip_file_size of uploaded zip file is not correct :

{

"data": [],

"message": [

"Uploaded Zip file is invalid"

],

"status": 3003

}



Legal Notices | Your Privacy Rights
Copyright © 1998, 2022

Last Published Tuesday, February 8, 2022