Hi DW,
When changing a customer/delivery address to another country via the DWAPI, the default payment and shipping are not updated to use the default methods for that country.
Setup for shipping, you can see PostNord is only available in Denmark, and UPS is for all countries.
Setup for payment, Creditcard is available in Denmark, Invoice is for all.
Setup for countries:
Denmark default methods
Sweden default methods:
create a cart:
/dwapi/ecommerce/carts/create?currencyCode=DKK&countryCode=DK&languageId=LANG1
The default shipping and payment methods are the danish ones, which is expected.
{
"Id": "CART1354",
"ParentOrderId": "",
"SecondaryUserName": "",
"Secret": "9dc94dc9e9834f3b90d9815388db0e5e",
"ShopId": "",
"DisplayName": "",
"VoucherCode": "",
"CreatedAt": "2023-07-28T13:46:24.297",
"Modified": "2023-08-23T11:21:41.0521332+02:00",
"Completed": false,
"LedgerType": "",
"StateId": "OS5",
"StateName": "Draft",
"StateDescription": "",
"IntegrationOrderId": "",
"RecurringOrderId": 0,
"CustomerUserId": 146,
"CustomerNumber": "",
"CustomerEan": "",
"CustomerRefId": "",
"CustomerCompany": "Dynamicweb Software A/S",
"CustomerTitle": "",
"CustomerName": "Mikkel Hammer",
"CustomerFirstName": "Mikkel",
"CustomerSurname": "Hammer",
"CustomerMiddleName": "",
"CustomerHouseNumber": "",
"CustomerInitials": "",
"CustomerPrefix": "",
"CustomerAddress": "test adresse 4",
"CustomerAddress2": "",
"CustomerZip": "2500",
"CustomerCity": "Valby",
"CustomerCountry": "Denmark",
"CustomerCountryCode": "DK",
"CustomerRegion": "",
"CustomerPhone": "12341235",
"CustomerEmail": "mfh@co3.dk",
"CustomerCell": "",
"CustomerAccepted": false,
"CustomerComment": "",
"DeliveryCompany": "",
"DeliveryName": "",
"DeliveryFirstName": "",
"DeliverySurname": "",
"DeliveryMiddleName": "",
"DeliveryTitle": "",
"DeliveryHouseNumber": "",
"DeliveryInitials": "",
"DeliveryPrefix": "",
"DeliveryAddress": "",
"DeliveryAddress2": "",
"DeliveryZip": "",
"DeliveryCity": "",
"DeliveryCountry": "",
"DeliveryCountryCode": "",
"DeliveryRegion": "",
"DeliveryPhone": "",
"DeliveryEmail": "",
"DeliveryCell": "",
"Reference": "",
"TransactionCardnumber": "",
"TransactionCardType": "",
"TransactionNumber": "",
"TransactionStatus": "",
"TrackAndTraceName": "",
"TrackAndTraceURL": "",
"TrackAndTraceNumber": "",
"OrderLines": [
{
"Id": "OL27080",
"ProductId": "10096",
"ProductVariantId": "",
"ProductLanguageId": "LANG1",
"ProductName": "Mongoose Ritual Street (T2) ",
"ProductNumber": "10096",
"ProductVariantName": "",
"ProductImage": "/Files/Images/missing_image.jpg",
"PrimaryOrDefaultGroup": {
"Id": "GROUP155",
"Name": "All bikes"
},
"Reference": "",
"Quantity": 1.0,
"UnitId": "",
"UnitName": "",
"ParentLineId": "",
"OrderLineFields": {},
"Price": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalPriceWithProductDiscounts": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"UnitPrice": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"UnitPriceWithProductDiscount": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"UnitPriceBeforeDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"UnitDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"BomOrderLines": []
}
],
"OrderFields": {
"OrderShippingAgent": {
"SystemName": "OrderShippingAgent",
"Name": "Order Shipping Agent",
"Type": "Text (255)",
"Value": ""
}
},
"TotalDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"TotalProductDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"TotalOrderDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"Price": {
"ShowPricesWithVat": true,
"Price": 9350.0,
"PriceFormatted": "9.350,00 kr.",
"PriceWithoutVat": 7490.0,
"PriceWithoutVatFormatted": "7.490,00 kr.",
"PriceWithVat": 9350.0,
"PriceWithVatFormatted": "9.350,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 24.833110814419225,
"VATPercentFormatted": "24.83%",
"CurrencyCode": "DKK"
},
"PriceBeforeFees": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalPriceBeforeFeesAndTaxes": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalTaxes": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"ShippingFee": {
"ShowPricesWithVat": true,
"Price": 50.0,
"PriceFormatted": "50,00 kr.",
"PriceWithoutVat": 50.0,
"PriceWithoutVatFormatted": "50,00 kr.",
"PriceWithVat": 50.0,
"PriceWithVatFormatted": "50,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"ShippingMethod": {
"Id": "SHIP13",
"Name": "PostNord Parcelshop",
"Description": "Danish parcelshop",
"Icon": "/Images/Shipping/PostNord.svg",
"FeeRulesSource": "Matrix",
"Code": "",
"AgentCode": "",
"AgentName": "",
"AgentServiceCode": "",
"AgentServiceDescription": ""
},
"PaymentMethod": {
"Id": "PAY1",
"Name": "Creditcard",
"Description": "Creditcard",
"Icon": "/Images/Payment/quickpay_logo.svg",
"Code": "",
"TermsCode": "",
"TermsDescription": ""
},
"PaymentFee": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"TotalPriceWithoutDiscountsFeesAndTaxes": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalPriceWithoutOrderDiscountsAndFeesAndTaxes": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
}
}
patch cart:
/dwapi/ecommerce/carts/{secret}
with body:
Then you can see the payment and shipping methods are still the danish onces, even though none of the methods are available in sweden.
"Id": "CART1354",
"ParentOrderId": "",
"SecondaryUserName": "",
"Secret": "9dc94dc9e9834f3b90d9815388db0e5e",
"ShopId": "",
"DisplayName": "",
"VoucherCode": "",
"CreatedAt": "2023-07-28T13:46:24.297",
"Modified": "2023-08-23T11:33:00.7298453+02:00",
"Completed": false,
"LedgerType": "",
"StateId": "OS5",
"StateName": "Draft",
"StateDescription": "",
"IntegrationOrderId": "",
"RecurringOrderId": 0,
"CustomerUserId": 146,
"CustomerNumber": "",
"CustomerEan": "",
"CustomerRefId": "",
"CustomerCompany": "",
"CustomerTitle": "",
"CustomerName": "Mikkel sverige",
"CustomerFirstName": "Mikkel",
"CustomerSurname": "Hammer",
"CustomerMiddleName": "",
"CustomerHouseNumber": "",
"CustomerInitials": "",
"CustomerPrefix": "",
"CustomerAddress": "Samaritgränd 4",
"CustomerAddress2": "",
"CustomerZip": "118 53",
"CustomerCity": "Stockholm",
"CustomerCountry": "Sweden",
"CustomerCountryCode": "SE",
"CustomerRegion": "",
"CustomerPhone": "",
"CustomerEmail": "Mfh@co3.dk",
"CustomerCell": "",
"CustomerAccepted": false,
"CustomerComment": "",
"DeliveryCompany": "",
"DeliveryName": "Mikkel sverige",
"DeliveryFirstName": "",
"DeliverySurname": "",
"DeliveryMiddleName": "",
"DeliveryTitle": "",
"DeliveryHouseNumber": "",
"DeliveryInitials": "",
"DeliveryPrefix": "",
"DeliveryAddress": "Samaritgränd 4",
"DeliveryAddress2": "",
"DeliveryZip": "118 53",
"DeliveryCity": "Stockholm",
"DeliveryCountry": "",
"DeliveryCountryCode": "SE",
"DeliveryRegion": "",
"DeliveryPhone": "",
"DeliveryEmail": "Mfh@co3.dk",
"DeliveryCell": "",
"Reference": "",
"TransactionCardnumber": "",
"TransactionCardType": "",
"TransactionNumber": "",
"TransactionStatus": "",
"TrackAndTraceName": "",
"TrackAndTraceURL": "",
"TrackAndTraceNumber": "",
"OrderLines": [
{
"Id": "OL27080",
"ProductId": "10096",
"ProductVariantId": "",
"ProductLanguageId": "LANG1",
"ProductName": "Mongoose Ritual Street (T2) ",
"ProductNumber": "10096",
"ProductVariantName": "",
"ProductImage": "/Files/Images/missing_image.jpg",
"PrimaryOrDefaultGroup": {
"Id": "GROUP155",
"Name": "All bikes"
},
"Reference": "",
"Quantity": 1.0,
"UnitId": "",
"UnitName": "",
"ParentLineId": "",
"OrderLineFields": {},
"Price": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalPriceWithProductDiscounts": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"UnitPrice": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"UnitPriceWithProductDiscount": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"UnitPriceBeforeDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"UnitDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"BomOrderLines": []
}
],
"OrderFields": {
"OrderShippingAgent": {
"SystemName": "OrderShippingAgent",
"Name": "Order Shipping Agent",
"Type": "Text (255)",
"Value": ""
}
},
"TotalDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"TotalProductDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"TotalOrderDiscount": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"Price": {
"ShowPricesWithVat": true,
"Price": 9350.0,
"PriceFormatted": "9.350,00 kr.",
"PriceWithoutVat": 7490.0,
"PriceWithoutVatFormatted": "7.490,00 kr.",
"PriceWithVat": 9350.0,
"PriceWithVatFormatted": "9.350,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 24.833110814419225,
"VATPercentFormatted": "24.83%",
"CurrencyCode": "DKK"
},
"PriceBeforeFees": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalPriceBeforeFeesAndTaxes": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalTaxes": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"ShippingFee": {
"ShowPricesWithVat": true,
"Price": 50.0,
"PriceFormatted": "50,00 kr.",
"PriceWithoutVat": 50.0,
"PriceWithoutVatFormatted": "50,00 kr.",
"PriceWithVat": 50.0,
"PriceWithVatFormatted": "50,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"ShippingMethod": {
"Id": "SHIP13",
"Name": "PostNord Parcelshop",
"Description": "Danish parcelshop",
"Icon": "/Images/Shipping/PostNord.svg",
"FeeRulesSource": "Matrix",
"Code": "",
"AgentCode": "",
"AgentName": "",
"AgentServiceCode": "",
"AgentServiceDescription": ""
},
"PaymentMethod": {
"Id": "PAY1",
"Name": "Creditcard",
"Description": "Creditcard",
"Icon": "/Images/Payment/quickpay_logo.svg",
"Code": "",
"TermsCode": "",
"TermsDescription": ""
},
"PaymentFee": {
"ShowPricesWithVat": true,
"PriceFormatted": "0,00 kr.",
"PriceWithoutVatFormatted": "0,00 kr.",
"PriceWithVatFormatted": "0,00 kr.",
"VatFormatted": "0,00 kr.",
"VATPercentFormatted": "0%",
"CurrencyCode": "DKK"
},
"TotalPriceWithoutDiscountsFeesAndTaxes": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
},
"TotalPriceWithoutOrderDiscountsAndFeesAndTaxes": {
"ShowPricesWithVat": true,
"Price": 9300.0,
"PriceFormatted": "9.300,00 kr.",
"PriceWithoutVat": 7440.0,
"PriceWithoutVatFormatted": "7.440,00 kr.",
"PriceWithVat": 9300.0,
"PriceWithVatFormatted": "9.300,00 kr.",
"Vat": 1860.0,
"VatFormatted": "1.860,00 kr.",
"VATPercent": 25.0,
"VATPercentFormatted": "25%",
"CurrencyCode": "DKK"
}
}
Is it possible to update the methods to the default of the country you're changing to, or null them when changing country.
Maybe it could be implemented with this (https://doc.dynamicweb.com/forum/feature-requests/feature-requests/use-address-id-to-determine-and-change-customer-delivery-address-on-cart-via-dwapi) if accepted as a feautre-request.
Looking forward to your reply
Best regards,
Mikkel Hammer