Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Param `expand` with get List V2 Rest API | GoodFirstPicks

Param `expand` with get List V2 Rest API

frappe/frappe 1 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeFrappe / ERPNextPython

Why this is a good first issue

API v2 lacks documented expand parameter support despite design intent.

AI Summary

The issue reports that API v2 ignores the expand parameter for Link fields, which should return expanded objects instead of strings. The fix requires modifying the API response handling but needs maintainer confirmation on expected behavior. No technical blockers exist beyond design alignment.

Issue Description

Description of the issue

API v2 does not handle the expand query parameter when fetching documents.

Passing expand is currently ignored, and Link fields are always returned as plain strings instead of expanded objects. This limits API v2 usability and is inconsistent with the intended design discussed for API v2.

Context information (for bug reports)

Output of bench version Frappe Framework: v15.x.x ERPNext: v15.x.x

Steps to reproduce the issue

  1. Send a request to API v2 document endpoint with expand parameter: GET /api/v2/document/Sales Order/SO-0001?expand=["customer"]

  2. Ensure the document contains a valid Link field value (e.g. customer = "CUST-0001")

  3. Check the response

Observed result

The expand parameter is ignored and the Link field is returned as a string:

{
"name": "SO-0001",
"customer": "CUST-0001"
}
Expected result
When expand is provided, Link fields should be expanded into objects:

{
  "name": "SO-0001",
  "customer": {
    "name": "CUST-0001",
    "customer_name": "Test Customer"
  }
}
Stacktrace / full error message
N/A – no error is thrown
Additional information
This is a known missing feature in API v2 discussions. Supporting expand would reduce extra API calls for integrations. I am willing to submit a PR once the expected response structure is confirmed.

GitHub Labels

feature-requestproposal

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • API behavior change
  • requires maintainer confirmation
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno
Assigneestravo1