How can we add new items for deal via api?
I am really glad you noticed our new deal items feature on the API which was just release this morning!
As deal items has just been released, it is subject to minor changes in the coming weeks. Therefore there is no official documentation for deal items API as of yet.
Having said that, here is a sneak preview on how you can view and create/update deal items on the API.
To create a deal that contains deal items, simply preform a post request to the deals endpoint just like how you would have created deals up until now and add the following additional fields to add deal items:
1) 'has_deal_items' and set to true.
2) 'deal_items' which contains an array of hash's. Each hash is a deal item that contains key-value pairs. The possible keys are name, description, cost (if enabled in settings), price, amount and qty.
If you want to see a sample of how a deal that contains deal items looks on the API, you could create a dummy deal that contains deal items on the web app, and then preform a get request for that deal via the API.
Don't forget to set the partial=true flag if preforming a partial update to a deal.
As this has just been release, the above is subject to minor changes. We will release official API documentation once finalized.
I have left myself a reminder to post a message here notifying you when this documentation has been released.
Thank you for your interest in deal items.
Hope you are having a great day!
We will wait for your official document. So please inform us when you add this in your official document.