Skip to content
New issue

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

Validation Exception for creating quotes. #301

Open
Danjosh0211 opened this issue Aug 24, 2020 · 1 comment
Open

Validation Exception for creating quotes. #301

Danjosh0211 opened this issue Aug 24, 2020 · 1 comment

Comments

@Danjosh0211
Copy link

Hi,
XeroBadRequest at /quote ValidationException: You must supply at least one quote for creation

No matter what I do, I can't seem to create or edit quotes. I've tried saving and putting, both an array and a single object. I keep getting the same error. I'm following the xero documentation and tried multiple different fields, including the minimal and full field set of the Quote.

FYI, Using pyxero v 0.9.2 which is the latest version one with the quote support added. Django 3.1 and python 3.7.5
I've included a screenshot of the final set of local vars.

pyxero quote error
Any help would be appreciated

@Danjosh0211
Copy link
Author

I'm not sure if this helps anyone searching for this but I've had to bypass the pyxero library for posting quotes.
I used r = requests.post(url, auth=auth.oauth, json=quote, headers=headers)
I got the same error as i did with pyxero using
r = requests.post(url, auth=auth.oauth, data=quote, headers=headers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant