We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running the following code
sub_data = {'content': html} result = sparkpost_client.templates.preview( template_id='newsletter', substitution_data=sub_data, draft=False )
I get the following error:
required field is missing: field 'substitution_data' is required
I think it may be because, in templates.py, line 181:
data=json.dumps(substitution_data))
You can't just simply dump the json, need to append it to a new dict with the "substitution_data" key before doing that.
I'm fairly sure this is the issue because if i change my code like so:
sub_data = {'substitution_data': {'content': html}} result = sparkpost_client.templates.preview( template_id=config.item['sparkpost_template'], substitution_data=sub_data, draft=False )
It works.
The text was updated successfully, but these errors were encountered:
Hi @seymour7 would you have some time to review #97?
Sorry, something went wrong.
No branches or pull requests
When running the following code
I get the following error:
I think it may be because, in templates.py, line 181:
You can't just simply dump the json, need to append it to a new dict with the "substitution_data" key before doing that.
I'm fairly sure this is the issue because if i change my code like so:
It works.
The text was updated successfully, but these errors were encountered: