mailjet/mailjet-apiv3-go

Error adding contact to existing contact list

bojanmilinkovic opened this issue · 2 comments

Hi, I am facing the same issue as mentioned in #59

I am sending request as it's described

`mr := &mailjet.Request{
Resource: "listrecipient",
}
fmr := &mailjet.FullRequest{
Info: mr,
Payload: &resources.Listrecipient{
IsUnsubscribed: true,
ContactID: 167078506,
ContactALT: "bokitest8@gmail.com",
ListID: 39784,
},
}

err := m.client.Post(fmr, &data)
if err != nil {
	return fmt.Errorf("Error adding contact to contact list: %w", err)
}

`

But still getting an error
Unexpected server response code: 400: Object properties invalid (MJ08 Property Contact is invalid: MJ03 A non-empty value is required)

It would be good if you can fix this.
Thanks in advance

Hi, just tried on latest code version and it worked for me. #69 should have fixed the issue.
Is it happening all the time or only for some specific requests/contacts/contactlists? Also ensure you use the latest version.

fixed by #69