My Products

Override flags not working for location endpoint

by KonsultVn



I am recently having issues with overriding Contact and Address information for a location I'm creating. This has worked previously but now the information is inherited from the main address and contact on the customer in spite of using override flags.


The fields that don't work are DisplayName on the Contact (with ContactIsSameAsMain = false) and CountryId/Country (with AddressIsSameAsMain = false). I have tried various combination of Country and CountryId and this latest call is with populating both. It makes no difference if I only populate one of them.


This is not working for POST nor PUT. We have verified that there are no interfering settings in the Visma.Net company configuration.


Here's the call and payload:


{Method: PUT, RequestUri: '', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
Authorization: Bearer xxxxxx
ipp-application-type: Financials
ipp-company-id: xxxxxxx
Content-Type: application/json; charset=utf-8
Content-Length: 577

"{\"LocationName\":{\"Value\":\"AstraZeneca AB, M\\u00F6lndal\"},\"Active\":{\"Value\":true},\"AddressIsSameAsMain\":{\"Value\":false},\"Address\":{\"Value\":{\"AddressLine1\":{\"Value\":\"Pepparedsleden 3\"},\"AddressLine2\":{\"Value\":\"Godsmottagningen MA1\"},\"AddressLine3\":{\"Value\":\"Attn: Karin Wiinikka LE110\"},\"PostalCode\":{\"Value\":\"43183\"},\"City\":{\"Value\":\"M\\u00F6lndal\"},\"CountryId\":{\"Value\":\"SE\"},\"Country\":{\"Value\":\"SE\"}}},\"ContactIsSameAsMain\":{\"Value\":false},\"Contact\":{\"Value\":{\"DisplayName\":{\"Value\":\"AstraZeneca AB\"}}},\"VatRegistrationId\":{\"Value\":\"SE559131717601\"},\"CorporateId\":{\"Value\":\"\"}}"


It works to change this manually directly in the user interface. However, when I try to send another call to update the existing location (with the manually corrected country) it instead gives me a postcode invalid error as if it's trying to input the postcode from the main address still:


Reason: {"message":"Error: Updating  'SelectedLocation' record raised at least one error. Please review the errors.\r\nAn error in processing of field Postcode value WA3 6UT Error: The postcode is invalid.\r\n"}


Location in question:






Thank you!



by Yıldırım

Hello, sorry for the late reply, you can try the configuration explained in