Global API
...
Requests
Customer Payment
Read
3min
to read customer payments, please use the below parameters supported “ where ” filters field name data type description datecreated long this will filter on an exact match (equal) use the “additionalfilter” option for a range of dates internalid string internal id of the customer payment multiple values can be passed in a comma separated string lastmodifieddate long this will filter on an exact match (equal) use the “additionalfilter” option for a range of dates subsidiary string internal id of subsidiary (primary) do not use this in additonalfilter multiple ids can be passed in a comma separated string ex 1,2 additonalfilter string construct the additional filter with a combination of the above fields using ‘+and+’ separator and pass it as a single string make sure to wrap the whole string using encodingutil urlencode trandate long transaction date of the record use the “additionalfilter” option for a range of dates customer string to filter the records based on the customer multiple ids can be passed in a comma separated string ex 6,7 supported “where” filters example request map\<string, object> filters = new map\<string, object>(); filters put('subsidiary', '1,2'); filters put('additionalfilter', encodingutil urlencode('lastmodifieddate>1628091060+and+lastmodifieddate<1629127860', 'utf 8')); // encode additionalfilter after constructing it with +and+ for multi filters // field filters and additionalfilter for where param map\<string, object> filtermap = new map\<string, object>(); filtermap put('where', new map\<string, object>{'keyvaluemap'=>filters}); map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('customparameters', filtermap); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'readcustomerpayment'); reqobj put('requestjson', reqjson); // place a request to breadwinner global api map\<string, object> resp = breadwinner ns breadwinnernetsuiteapi call(reqobj); system debug(resp); response { action=readcustomerpayment, timestamp=1657008542320, validrequest=true, version=1 0, responsejson={ "currentpagerecords" null, "totalrecords" 2, "totalpages" 1, "searchid" "webservices 5333445 sb1 070520228488435641642000880 d6b06635", "pageindex" 1, "errors" \[ ], "customparamters" { "where" { "value" null, "keyvaluemap" { "internalid" "96508,96608" } } }, "status" "200""customerpayments" \[ { "undepfunds" null, "unapplied" 400 0, "tranid" "110", "trandate" 1599375600, "subsidiary" { "type" null, "name" "parent company", "internalid" "1", "externalid" null }, "status" "not deposited", "salesforceid" null, "payment" 400 0, "memo" "payment# 12", "location" null, "lastmodifieddate" 1644230574, "internalid" "96508", "externalid" null, "exchangerate" 1 0, "department" null, "customform" null, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" "false", "scriptid" "custbody checkbox", "internalid" "272", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custbody edoc gen trans pdf", "internalid" "925", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custbody ei ds txn identifier", "internalid" "932", "fieldtype" null } ] }, "customer" { "type" null, "name" "cust1058at stella pa 1", "internalid" "75389", "externalid" null }, "currencyname" "us dollars", "createddate" 1644230574, "classification" null, "applylist" null, "applied" 0 0 }, { "undepfunds" null, "unapplied" 400 0, "tranid" "111", "trandate" 1599375600, "subsidiary" { "type" null, "name" "parent company", "internalid" "1", "externalid" null }, "status" "not deposited", "salesforceid" null, "payment" 400 0, "memo" "payment# 12", "location" null, "lastmodifieddate" 1644230738, "internalid" "96608", "externalid" null, "exchangerate" 1 0, "department" null, "customform" null, "customfieldlist" { "customfield" \[ { "valuelookup" null, "value" "false", "scriptid" "custbody checkbox", "internalid" "272", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custbody edoc gen trans pdf", "internalid" "925", "fieldtype" null }, { "valuelookup" null, "value" "false", "scriptid" "custbody ei ds txn identifier", "internalid" "932", "fieldtype" null } ] }, "customer" { "type" null, "name" "cust1058at stella pa 1", "internalid" "75389", "externalid" null }, "currencyname" "us dollars", "createddate" 1644230738, "classification" null, "applylist" null, "applied" 0 0 } ], }, }