Youâre right; I was misremembering how this works in REST, conflating it with the approach youâd take in Python. It does not appear possible to poll child doctypes via REST.
However, on my v11 system at least, the API returns all child doctypes as part of the parent JSON. For example:
curl --header "Authorization: token xxx:xxx" https://example.com/api/resource/Quotation/QTN-00001
returns:
{
"data": {
"additional_discount_percentage": 0,
"base_in_words": "NPR Twelve Thousand only.",
"naming_series": "QTN-",
"creation": "2017-06-28 11:19:43.407141",
"doctype": "Quotation",
"currency": "NPR",
"conversion_rate": 1,
"payment_schedule": [],
"owner": "peter@example.com",
"total_qty": 1,
"total": 12000,
"customer_name": "Generic Company",
"language": "en",
"modified_by": "peter@example.com",
"order_type": "Sales",
"title": "Generic Company",
"base_total": 12000,
"selling_price_list": "Standard Selling",
"transaction_date": "2017-05-01",
"docstatus": 1,
"territory": "Nepal",
"company": "My Company",
"letter_head": "Generic",
"group_same_items": 0,
"ignore_pricing_rule": 0,
"base_rounded_total": 12000,
"quotation_to": "Customer",
"total_taxes_and_charges": 0,
"grand_total": 12000,
"base_discount_amount": 0,
"party_name": "Generic Company",
"base_total_taxes_and_charges": 0,
"items": [
{
"stock_qty": 1,
"base_price_list_rate": 12000,
"image": "",
"creation": "2017-06-28 11:19:43.407141",
"base_amount": 12000,
"qty": 1,
"margin_rate_or_amount": 0,
"rate": 12000,
"total_weight": 0,
"owner": "peter@example.com",
"stock_uom": "Qty",
"base_net_amount": 12000,
"page_break": 0,
"modified_by": "peter@example.com",
"base_net_rate": 12000,
"discount_percentage": 0,
"item_name": "Item for Sale",
"amount": 12000,
"actual_qty": 0,
"net_rate": 12000,
"conversion_factor": 1,
"base_rate_with_margin": 0,
"warehouse": "Stores - KC",
"docstatus": 1,
"uom": "Qty",
"description": "Item description",
"parent": "QTN-00001",
"base_rate": 12000,
"item_code": "10000",
"projected_qty": 0,
"margin_type": "",
"doctype": "Quotation Item",
"rate_with_margin": 0,
"discount_amount": 0,
"price_list_rate": 12000,
"name": "QUOD/00003",
"idx": 1,
"item_tax_rate": "{}",
"item_group": "Courses",
"modified": "2017-06-28 11:32:56.607867",
"weight_per_unit": 0,
"parenttype": "Quotation",
"net_amount": 12000,
"parentfield": "items"
}
],
"base_grand_total": 12000,
"discount_amount": 0,
"status": "Submitted",
"base_net_total": 12000,
"name": "QTN-00001",
"idx": 2,
"total_net_weight": 0,
"rounded_total": 12000,
"price_list_currency": "NPR",
"modified": "2017-06-28 11:32:56.607867",
"taxes": [],
"rounding_adjustment": 0,
"plc_conversion_rate": 1,
"apply_discount_on": "Grand Total",
"net_total": 12000,
"base_rounding_adjustment": 0,
"in_words": "NPR Twelve Thousand only.",
"customer_group": "Non Profit"
}
}
You seem to be getting different results? Is it possible that thereâs a permissions problem?