to get a personalized navigation.
to get a personalized navigation.
When creating customers to the endpoint below, it sometimes shows the customer with the checkbox "Skicka fakturor per e-post" (Send Invoices By Email in English UI I assume?).
https://integration.visma.net/API/controller/api/v1/customer
The JSON sent in the request looks somethine like below, the "sendInvoicesByEmail" is hardcoded to true in all cases. It seems random when the checkbox is selected or not.
{
"name":{
"value":"Name Namesson"
},
"corporateId":{
"value":"20000101-1234"
},
"mainAddress":{
"value":{
"addressLine1":{
"value":"c/o Name Namesson"
},
"addressLine2":{
"value":"Street 123"
},
"postalCode":{
"value":"12345"
},
"city":{
"value":"City"
},
"countryId":{
"value":"se"
}
}
},
"mainContact":{
"value":{
"name":{
"value":"Name Namesson"
},
"email":{
"value":"name.namesson@email.se"
},
"phone_1":{
"value":"070-123 45 67"
}
}
},
"invoiceAddress":{
"value":{
"addressLine1":{
"value":"c/o Name Namesson"
},
"addressLine2":{
"value":"Street 123"
},
"postalCode":{
"value":"12345"
},
"city":{
"value":"City"
},
"countryId":{
"value":"se"
}
}
},
"invoiceContact":{
"value":{
"name":{
"value":"Name Namesson"
},
"email":{
"value":"name.namesson@email.se"
},
"phone_1":{
"value":"070-123 45 67"
}
}
},
"deliveryAddress":{
"value":{
"addressLine1":{
"value":"Name Namesson"
},
"addressLine2":{
"value":"Street 123"
},
"postalCode":{
"value":"12345"
},
"city":{
"value":"City"
},
"countryId":{
"value":"se"
}
}
},
"deliveryContact":{
"value":{
"addressLine1":{
"value":"c/o Name Namesson"
},
"addressLine2":{
"value":"Street 123"
},
"postalCode":{
"value":"12345"
},
"city":{
"value":"City"
},
"countryId":{
"value":"se"
}
}
},
"location":{
"countryId":"se"
},
"currencyId":{
"value":"SEK"
},
"sendInvoicesByEmail":{
"value":true
},
"attributeLines":[
{
"attributeId":{
"value":"AR100"
},
"attributeValue":{
"value":"name.namesson@email.se"
}
},
{
"attributeId":{
"value":"AR101"
},
"attributeValue":{
"value":"name2.namesson2@email.se"
}
}
]
}
Examples in the UI:
https://pasteboard.co/ZW7h5OUBO7Q9.png
https://pasteboard.co/HYFU7u8JQ5qj.png
Hi. Yes, the issue is that the customers have email addresses but sometimes it doesn't check the send invoice by email checkbox, even with that value hardcoded to true in the integration. 😅
It ends up looking like in the attached image, where some have the e-mail invoice button checked, and some don't. All have the email address and it seems valid, I can manually save them again with "send invoice by email" checked. 😊
https://i.postimg.cc/fyPgR9FS/Screenshot-2023-05-23-at-12-25-26.png
Unfortunately I don't have idea atm why some of them are not checked even though payload contains
"sendInvoicesByEmail":{
"value":true
},
so next time please keep an eye on the specific instance and store the payload and check that customerCard in the UI. Perhaps you can try sending PUT request to try updating that value to see whether it helps.
Copyright © 2022 Visma.com. All rights reserved.