# Company Incorporation : Erros Can't call method "get\_Agent" on an undefined value

**URL:** <https://xmlforum.companieshouse.gov.uk/t/company-incorporation-erros-cant-call-method-get-agent-on-an-undefined-value/261>\
**Category:** Incorporation\
**Created:** [October 10, 2016, 2:48pm UTC](https://xmlforum.companieshouse.gov.uk/t/company-incorporation-erros-cant-call-method-get-agent-on-an-undefined-value/261 "2016-10-10T14:48:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mukhtiarsingh](https://xmlforum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/m/e495f1/32.png) [@mukhtiarsingh](https://xmlforum.companieshouse.gov.uk/u/mukhtiarsingh)\
**Post date:** [October 10, 2016, 2:48pm UTC](https://xmlforum.companieshouse.gov.uk/t/company-incorporation-erros-cant-call-method-get-agent-on-an-undefined-value/261/1 "2016-10-10T14:48:45Z")

</div>

Hi I am building company Incorporation API , all other types except LLP working fine , when sending company type LLP then getting “Can’t call method “get\_Agent” on an undefined value” error.  
This is JSON:  
{  
“PSCStatement”:“N”,  
“members”:[  
{  
“membertype”:“PERSON”,  
“title”:“Mr”,  
“forename”:“Kamran”,  
“surname”:“Arshad”,  
“dob”:“1991-08-26”,  
“nationality”:“British”,  
“occupation”:“Developer”,  
“countryofresidence”:“GB-ENG”,  
“previous\_forename”:“”,  
“previous\_surname”:“”,  
“service”:{  
“premise”:“67”,  
“street”:“Portland Street”,  
“thoroughfare”:“”,  
“posttown”:“Manchester”,  
“country”:“GB-ENG”,  
“postcode”:“M1 4WB”  
},  
“residential”:{  
“premise”:“67”,  
“street”:“Portland Street”,  
“thoroughfare”:“”,  
“posttown”:“Manchester”,  
“country”:“GB-ENG”,  
“postcode”:" M1 4WB"  
}  
},

```
  {  
     "membertype":"PERSON",
     "title":"Mr",
     "forename":"M",
     "surname":"Singh",
     "dob":"1991-04-26",
     "nationality":"British",
     "occupation":"Developer",
     "countryofresidence":"GB-ENG",
     "previous_forename":"",
     "previous_surname":"",
     "service":{  
        "premise":"67",
        "street":"Portland Street",
        "thoroughfare":"",
        "posttown":"Manchester",
        "country":"GB-ENG",
        "postcode":"M1 4WB"
     },
     "residential":{  
        "premise":"67",
        "street":"Portland Street",
        "thoroughfare":"",
        "posttown":"Manchester",
        "country":"GB-ENG",
        "postcode":" M1 4WB"
     }
  }

```

],  
“company”:“Fuse”,  
“companytype”:“LLP”,  
“countryinc”:“EW”,  
“premise”:“67”,  
“street”:“Portland Street”,  
“thoroughfare”:“zxc zx”,  
“posttown”:“Manchester”,  
“postcode”:“M1 4WB”,  
“country”:“GB-ENG”,  
“totalissuedshares”:“1”,  
“sharecurrency”:“GBP”,  
“totalaggrnominalvalue”:“1”,  
“shareclass”:“ORD”,  
“shareparticulars”:“1”,  
“numberofshares”:“1”,  
“amountpaidpershare”:“1”,  
“amountunpaidpershare”:“0”,  
“aggrnominalvalue”:“1”

}

and I am getting

Array ( [fatal] =\> Array ( [0] =\> Array ( [number] =\> 9999 [text] =\> Can’t call method “get\_Agent” on an undefined value ) ) [recoverable] =\> Array ( ) [business] =\> Array ( ) [warning] =\> Array ( ) ) kk

can anyone help me to find out what is the issue.

---

<div class="post-metadata">

**Author:** ![snicholas](https://xmlforum.companieshouse.gov.uk/user_avatar/xmlforum.companieshouse.gov.uk/snicholas/32/81_2.png) [@snicholas](https://xmlforum.companieshouse.gov.uk/u/snicholas)\
**Post date:** [October 12, 2016, 10:34am UTC](https://xmlforum.companieshouse.gov.uk/t/company-incorporation-erros-cant-call-method-get-agent-on-an-undefined-value/261/2 "2016-10-12T10:34:20Z")

</div>

Good morning,

Can I ask if you have compared your test submission data to the example shown at this link please:

> <https://gist.github.com/CharlotteHirst/a259b40fdc1a6bd20a485a7ca756eaf6>

SDN

---

<div class="post-metadata">

**Author:** ![mukhtiarsingh](https://xmlforum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/m/e495f1/32.png) [@mukhtiarsingh](https://xmlforum.companieshouse.gov.uk/u/mukhtiarsingh)\
**Post date:** [October 19, 2016, 9:48am UTC](https://xmlforum.companieshouse.gov.uk/t/company-incorporation-erros-cant-call-method-get-agent-on-an-undefined-value/261/3 "2016-10-19T09:48:12Z")

</div>

Thanks I have fixed the issues as per provided information.
