REST API addresses are incomplete

When adding a complete address including city, street etc. the attributes aren’t present in the API response.

REST API addresses are incomplete

The response:

“billingaddress”=>
{“links”=>
[{“rel”=>”self”,
“href”=>
“https://xxx-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/11073/billingaddress”}],
“addrText”=>”Netherlands”,
“country”=>”NL”,
“override”=>false},

How can I also fetch the city, addr1 fields? They should be present according to https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2020.1/index.html#/definitions/invoice-billingaddress

Rookie Asked on July 2, 2020 in SuiteTalk.
Add Comment
1 Answer(s)
Intermediate Answered on July 2, 2020.

This is the result after expanding battk. A GET on https://xxx-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/11073/billingaddress has the same results

on July 2, 2020.

I, [2020-07-02T15:15:45.264663 #76193] INFO — : get https://xxx-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/11073/billingaddress
ETHON: performed EASY effective_url=https://xxx-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/11073/billingaddress response_code=200 return_code=ok total_time=1.566763
I, [2020-07-02T15:15:46.836352 #76193] INFO — Status: 200
=> “{\”links\”:[{\”rel\”:\”self\”,\”href\”:\”https://xxx-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/invoice/11073/billingaddress\”}],\”addrText\”:\”Netherlands\”,\”country\”:\”NL\”,\”override\”:false}\n”

on July 2, 2020.

Are you sure the address is actually set on the invoice and not the customer?

on July 2, 2020.

Setting it on the invoice works, it was empty before and thought it would automatically fallback to the customer billing address.

I have not yet found a way to fetch the billing address from the customer. I can see the field “defaultAddress” is filled with the specified address, but would expect a billingaddress entry / addressbook entry in the expanded “entity” in the response of an invoice.

on July 2, 2020.

There should be a long trail to follow from the addressbook on the customer

on July 2, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor