Core APIs
Core Multi
1 min
the multi api allows you to combine any of the core api's into a single call this method of calling api for multiple transformations gives you significantly higher performance benfits api credits will be used based on the api task credit rules for each api if unspecified in the api documentation this is 1 in the example below, the task credits used will be filter list (1 credit) loop through output list (2 items) and perform 2 functions (4 credits) total = 5 credits use case say you want to filter json objects from a json list docid\ udvkw9lwh2zx9nvqnfrbc for all lead source as facebook, then want to enumerate the date by using split date (define) docid\ efshyftxcwyrbg5xj7o7n for each item in a the filtered list you then want to use the output from the date to set a followup date as begining of the next month api definition { "tab" "examples", "url" "https //orca pathfix com/functions/multi", "name" "multi functions api", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "28usdqyeh3qrdmtvamsqt", "code" "{\n \\"output\\" \[\n {\n \\"eml\\" \\"bruce\@pathfix com\\",\n \\"sourcee\\" \\"fb\\",\n \\"month\\" \\"jan 2022\\"\n },\n {\n \\"eml\\" \\"paul\@pathfix com\\",\n \\"sourcee\\" \\"fb\\",\n \\"month\\" \\"feb 2022\\"\n }\n ]\n}", "language" "200" }, { "id" "yix64dyiudpjgbrfsfawb", "code" "{\n \\"message\\" \\"error\\"\n}", "language" "404" } ], "selectedlanguageid" "28usdqyeh3qrdmtvamsqt" }, "examples" { "languages" \[ { "id" "encjz9tstg38f0x taa4x", "code" "{\r\n \\"functions\\" \[\r\n {\r\n //this is a reference to the list/filter function \r\n \\"name\\" \\"facebook list\\",\r\n \\"type\\" \\"list\\",\r\n \\"function\\" \\"filter\\",\r\n \\"params\\" {\r\n \\"input\\" \[\r\n {\r\n \\"email\\" \\"bruce\@pathfix com\\",\r\n \\"source\\" \\"facebook\\",\r\n \\"other\\" \\"test\\",\r\n \\"date\\" \\"2022 01 25\\"\r\n },\r\n {\r\n \\"email\\" \\"paul\@pathfix com\\",\r\n \\"source\\" \\"facebook\\",\r\n \\"date\\" \\"2022 02 12\\"\r\n },\r\n {\r\n \\"email\\" \\"chang\@pathfix com\\",\r\n \\"source\\" \\"linkedin\\",\r\n \\"date\\" \\"2022 02 15\\"\r\n }\r\n ],\r\n \\"key\\" \\"source\\",\r\n \\"match\\" \\"facebook\\"\r\n }\r\n },\r\n {\r\n \\"name\\" \\"set followup date\\",\r\n \\"type\\" \\"list\\",\r\n \\"function\\" \\"multi\\",\r\n \\"params\\" {\r\n \\"input\\" \\"{{facebook list output}}\\",\r\n \\"functions\\" \[\r\n {\r\n //this is a reference to /datetime/split\r\n \\"name\\" \\"date enum\\",\r\n \\"type\\" \\"datetime\\",\r\n \\"function\\" \\"split\\",\r\n \\"params\\" {\r\n \\"input\\" \\"{{date}}\\"\r\n }\r\n },\r\n {\r\n //this is a reference json/replacefrominput \r\n \\"name\\" \\"convert\\",\r\n \\"type\\" \\"json\\",\r\n \\"function\\" \\"replacefrominput\\",\r\n \\"params\\" {\r\n \\"output\\" {\r\n \\"eml\\" \\"{{email}}\\",\r\n \\"sourcee\\" \\"fb\\",\r\n \\"month\\" \\"{{date enum output monthname}} {{date enum output year}}\\"\r\n },\r\n \\"replace if not found\\" \\"yes\\"\r\n }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", "language" "json" } ], "selectedlanguageid" "encjz9tstg38f0x taa4x" }, "description" "\ncall the following api ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } }