My Products
Help
Anonymous
Not applicable

Problems with using "OverrideAdress" on salesOrder endpoint

by Anonymous

Hi! 

 

We have an integration that creates salesorders in Visma from a webshop. In some cases we want the billing and deliveryadress to be different than the one on the customer in Visma.net and for that we were thinking of using the "overrideAdress" boolean to on those salesorders put a different adress. 

 

We are using the  /controller/api/v2/customerinvoice endpoint and we are having problems with this section: 

 

"soShippingAddress": {
"value": {
"overrideAddress": {
"value": true
},

 

We should be able to use the overrideAddress to tick the box in teh UI that lets us put in a new adress. When I do it manually in the UI it works fine but no matter if I put true/false in my API call nothing happens on the salesOrder when I create it through the API. I have attached the different calls that I have tried but I get the same result every time: the order is created but the box for overriding the adress unchecked. The difference in the calls is what information I have in this section: 

 

"soShippingAddress": {
"addressId": 0,
"overrideAddress": {
"value": true
},

 

Is there anything else than true/false I need to use for it to be correct? 

 

Thanks in advance!

/Frida 

 

 

 

 

2 REPLIES 2
Yıldırım
VISMA

by Yıldırım (Updated ‎26-04-2021 13:30 by Yıldırım VISMA )
 

@Anonymous wrote:

We are using the  /controller/api/v2/customerinvoice endpoint and we are having problems with this section: 

"soShippingAddress": {
"value": {
"overrideAddress": {
"value": true
}

 


The section you've shared in the printscreen (Sales Order > Financials Settings >Invoice Address) is corresponding with 

"soBillingAddress" array in the POST (SalesOrderUpdateDto) via API. Therefore, you should use Sales Order Endpoint for this operation. (https://integration.visma.net/API/controller/api/v1/salesorder)

We're able to override the Sales Order's Invoice Address section via the POST Sales Order Endpoint. Please see the transaction details below.

2021-04-26 13_01_11-Sales orders.png

Example JSON
{
	"soBillingAddress": {
		"value": {
			"overrideAddress": {
				"value": true
			},
			"addressLine1": {
				"value": "override address API"
			},
			"postalCode": {
				"value": "2600"
			},
			"city": {
				"value": "Glostrup"
			},
			"countryId": {
				"value": "DK"
			}
		}
	},
	"orderType": {
		"value": "SO"
	},
	"date": {
		"value": "2021-04-26"
	},
	"customerOrder": {
		"value": "81327435"
	},
	"customerRefNo": {
		"value": "Epay:217110470"
	},
	"customer": {
		"value": "10023"
	}
}

Could you retry your transaction after adjusting it accordingly ? Thanks. 
Yıldırım
VISMA

by Yıldırım

Hello,  we will look into the matter and will soon get back to you.