Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Possible issue using Transactional email (templates) #17

Closed
garmr opened this issue Sep 8, 2016 · 1 comment
Closed

Possible issue using Transactional email (templates) #17

garmr opened this issue Sep 8, 2016 · 1 comment

Comments

@garmr
Copy link

garmr commented Sep 8, 2016

Hello,
it looks like both send_transactional_template and update_template functions issue a PUT to https://api.sendinblue.com/v2.0/template/ and are updating the template passed as argument.

If I issue a curl request like this one :
url -H 'api-key:<my API key>' -X PUT -d '{"to":"a@b.com","from":"a@b.com","replyto":"a@b.com","subject":"My subject","attr":{"CIV":"Mister X","AMOUNT1":"416","AMOUNT2":25},"headers":{"Content-Type":"text\/html; charset=iso-8859-1","X-Mailin-Tag":"My TAG"}}' 'https://api.sendinblue.com/v2.0/template/6'

The webservice returns response
{"code":"success","message":"Updated the Template.","data":[]}

I probably missing something but I am not able to use send_transactional_template as described in the official documentation.

Thank in advance for your precious help.

@garmr
Copy link
Author

garmr commented Sep 8, 2016

Ok, I juste have a response from your support ( sorry about the duplicate ... ), the issue was happening because I was redefining some parameters already defined in my template.
For my particular case it was 'subject' and 'from'.

Here is the correct request :

url -H 'api-key:<my API key>' -X PUT -d '{"to":"a@b.com","replyto":"a@b.com","attr":{"CIV":"Mister X","AMOUNT1":"416","AMOUNT2":25},"headers":{"Content-Type":"text\/html; charset=iso-8859-1","X-Mailin-Tag":"My TAG"}}' 'https://api.sendinblue.com/v2.0/template/6

Sorry about the "noise" !
Cheers,

@garmr garmr closed this as completed Sep 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant