Chris Astles Posted May 28, 2021 Share Posted May 28, 2021 (edited) I am trying to retrieve all invoices from the /sales_invoices GET endpoint, but only with certain attributes, like the contact (including all the nested_attributes). If I run /sales_invoices?attributes=status,currency,total_amount,contact&nested_attributes=all The contact is returned only with id, displayed_as and path. I noticed in the docs there is no mention of nested_attributes as a query parameter, but in the guides, sales_invoices is used as the example of how to search with nested_attributes, so there is a bit of inconsistency. The only way I can get the attributes I need is to search with attributes=all but this slows the request down considerably. Edited May 28, 2021 by Chris Astles Link to comment Share on other sites More sharing options...
Steel, Mark Posted June 7, 2021 Share Posted June 7, 2021 Hi Chris Apologies for the late response. The API at present does not fully comply with oData specs hence why we try not to reference nested_attributes in the docs where possible. In this scenario, it may be more efficient to make an additional call to the contacts/id endpoint to obtain those attributes you require. Thanks Mark Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now