[Company] - Customers & Contracts under a company

[ { // NOTE: Please keep the structure of object the same as the original. "id": 2, "contact_people": [ { "id": 2, "email": "", "phone": "", "name": "Pawarit 2 Saengpreecharutn" } ], "shipping_addresses": [ { "id": 2, "address": "234567890987654" } ], "contracts": [ // NOTE: Please filter the contracts which their company value match by the specified company's ID { "id": 5, "contract_name": "Minor contract - J28", "external_ref_no": "345654345", "credit_limit": "999999.00", "master_contract": 2, "master_contract_name": "Minor contract", // ADDED "company": 1 }, { "id": 4, "contract_name": "Main contract - 3", "external_ref_no": "234567", "credit_limit": "765432.00", "master_contract": 1, "master_contract_name": "Main contract", // ADDED "company": 1 }, { "id": 3, "contract_name": "Main contract - 2", "external_ref_no": "", "credit_limit": "76543234.00", "master_contract": 1, "master_contract_name": "Main contract", // ADDED "company": 1 } ], "email": "", "phone": "234567876543", "address": "", "partner_id": 2, "name": "Customer 2", "tax_id": "12345654345", "type_of_partner": 3 }, { // NEXT Object. } ]
The Sample API Response
Module name: Customers & Contracts under a company
Sample view: Response

** Request **
URL: "/api/company/<id>/customer-and-contract/" where <id> is the ID of company
Request Method: GET

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.