Setting entry level discount in Sales Order with API

Setting entry level discount in Sales Order with API

Hello,

We want to create a Sales Order with discounts in some items. The main problem is we dont know how the API is working in this scenario. Reading the documentation we have to send the quantity discount in the JSON in discount_amount in the line item array and also send in the JSON the discount_type with the "entry_level" value. But for some reason this is not working

This is the JSON we are sending to Zoho Books
  1. {
    			"customer_id": 81921000029280354,
    			"line_items": [
    				{
    					"item_id": 81921000005503008,
    					"name": "Comida húmeda de ternera con arroz",
    					"quantity": 1,
    					"rate": 1.05,
    					"discount_amount": 0.00
    				},
    				{
    					"item_id": 81921000002789316,
    					"name": "Carpaccio de vacuno",
    					"quantity": 1,
    					"rate": 3.40,
    					"discount_amount": 5.00
    				}
    			],
    			"discount_type": "item_level"
    		},
When we send this JSON, the discount_ammount always appears with 0, but the Sales Order is created. What are we doing wrong?





                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl Resources


                                                                Zoho Creator Resources


                                                                  Zoho WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • Functions

                                                                        Functions

                                                                      • Meetups

                                                                        Meetups

                                                                      • Kbase

                                                                        Kbase

                                                                      • Resources

                                                                        Resources

                                                                      • Digest

                                                                        Digest

                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner

                                                                      





                                                                      




                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now