AnsweredAssumed Answered

Insert From URL returns [ ] but URL in browser returns JSON

Question asked by osninc on May 3, 2018
Latest reply on May 6, 2018 by fmpdude

Hi,

 

I am trying to connect to the SmartyStreets API using a FMP InsertFromURL Script Step.   I know I have the correct endpoint URL, authentication and syntax etc because when I test it in the browser it returns JSON. When I put the URL into the FMP InsertFromURL script step it returns [ ] and not the JSON I was expecting.  I have double checked the target field and SourceURL as well as tried with encoding on and off but cant seem to figure this out.

 

Here is the Script Step:

The field SSURL above is a field from a calculation that returns text from a combination of address parts.

 

Here is an example of the SSURL calc result with my authentication obscured:

 

 

https://us-street.api.smartystreets.com/street-address?auth-id=XXXXXXXXX&auth-token=XXXXXXX&addressee=undefined&street=19+Olive+Street+Bloomfield+NJ+07003-0000+Essex+County+

 

If I send the above URL with my authentication in a browser I get this JSON back:

[{"input_index":0,"candidate_index":0,"delivery_line_1":"19 Olive St","last_line":"Bloomfield NJ 07003-3208","delivery_point_barcode":"070033208197","components":{"primary_number":"19","street_name":"Olive","street_suffix":"St","city_name":"Bloomfield","state_abbreviation":"NJ","zipcode":"07003","plus4_code":"3208","delivery_point":"19","delivery_point_check_digit":"7"},"metadata":{"record_type":"S","zip_type":"Standard","county_fips":"34013","county_name":"Essex","carrier_route":"C028","congressional_district":"10","rdi":"Residential","elot_sequence":"0224","elot_sort":"D","latitude":40.78305,"longitude":-74.20166,"precision":"Zip9","time_zone":"Eastern","utc_offset":-5,"dst":true},"analysis":{"dpv_match_code":"Y","dpv_footnotes":"AABB","dpv_cmra":"N","dpv_vacant":"N","active":"N","footnotes":"N#"}}]

 

Why am I only getting a [ ] returned in FMP?

 

Thanks,

 

T

Outcomes