Menu

#1153 REST API: In response for Contact, sub-item lists returned empty

1.4
closed-works-for-me
None
8
2014-06-14
2014-05-25
No

I have an entity (company) with one eca and one contact item. Using Perl's lwp toolset to request that entity in json format (GET http://localhost/ledgersmb/rest/1.4/inv-upload/Contact/2.json) returns:

{
"locations" : null,
"license_number" : "1",
"name" : "A",
"contact" : null,
"bank_accounts" : null,
"sic_code" : "11",
"control_code" : "A-00003",
"entity_class" : "1",
"country_id" : "4",
"credit_accounts" : null,
"entity_id" : "2",
"tax_id" : "1",
"entity_type" : "Company",
"legal_name" : "A",
"sales_tax_id" : "1"
}

As you can see, the "contact" item is empty and so is the "credit_accounts". When using the xml version (GET http://localhost/ledgersmb/rest/1.4/inv-upload/Contact/2.xml), I get:

<LedgerSMB::REST_Class::Contact name="A" bank_accounts="" contact="" control_code="A-00003" country_id="4" credit_accounts="" entity_class="1" entity_id="2" entity_type="Company" legal_name="A" license_number="1" locations="" sales_tax_id="1" sic_code="11" tax_id="1" />

Which indicates empty credit accounts and empty contact info as well.

Discussion

  • Anonymous

    Anonymous - 2014-05-25
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,6 +20,6 @@
    
     As you can see, the "contact" item is empty and so is the "credit_accounts". When using the xml version (GET http://localhost/ledgersmb/rest/1.4/inv-upload/Contact/2.xml), I get:
    
    -<LedgerSMB::REST_Class::Contact name="A" bank_accounts="" contact="" control_code="A-00003" country_id="4" credit_accounts="" entity_class="1" entity_id="2" entity_type="Company" legal_name="A" license_number="1" locations="" sales_tax_id="1" sic_code="11" tax_id="1" />
    +&lt;LedgerSMB::REST_Class::Contact name="A" bank_accounts="" contact="" control_code="A-00003" country_id="4" credit_accounts="" entity_class="1" entity_id="2" entity_type="Company" legal_name="A" license_number="1" locations="" sales_tax_id="1" sic_code="11" tax_id="1" /&gt;
    
     Which indicates empty credit accounts and empty contact info as well.
    
     
  • Anonymous

    Anonymous - 2014-05-31
    • Priority: 5 --> 9
     
  • Chris Travers

    Chris Travers - 2014-06-06
    • Priority: 9 --> 8
     
  • Chris Travers

    Chris Travers - 2014-06-06

    Reducing to sev 8 due to other web service failrues not being sev 9. Expect to be fixed after RC1

     
  • Chris Travers

    Chris Travers - 2014-06-14

    As of RC1, I am seeing entity acconts listed but not addresses, contact info, or bank accounts.

     
  • Chris Travers

    Chris Travers - 2014-06-14

    Ok, so currently this only pulls locations and contact information that is attached to the entity. This may need to be changed in the future.

     
  • Chris Travers

    Chris Travers - 2014-06-14
    • status: open --> closed-works-for-me
    • assigned_to: Chris Travers
     
  • Anonymous

    Anonymous - 2014-06-14

    Hi Chris,

    You closed "works-for-me", but does it load ECAs for you? It doesn't for me... [I'll test again to be 200% sure, but I know it didn't.]

    Regards,

    Erik.