-2

I have this record as an example.
How do I use the API to retrieve all contacts in the insurance group?

ins = xero.Contact.find("3034b40e-ddd5-45b4-b23c-0f6800029673")   

Contains:

Xeroizer::Record::ContactGroup :contact_group_id: "0c72ed99-2c7d-482f-8c82-f53e268d20e0", :name: "insurance", :status: "ACTIVE"

and adding a contact to the group

Misa Lazovic
  • 2,805
  • 10
  • 32
  • 38
bruce612
  • 1
  • 1

1 Answers1

0

To retrieve all the contacts in the insurance group,

ins = xero.ContactGroup.find('3034b40e-ddd5-45b4-b23c-0f6800029673').contacts 
Shabini Rajadas
  • 731
  • 8
  • 15
  • You really mean: ins = xero.ContactGroup.find('0c72ed99-2c7d-482f-8c82-f53e268d20e0').contacts but how do I add "insurance" group to a contact through xeroizer? – bruce612 Jan 22 '16 at 03:46
  • Creating a contact inside a contact group was not possible through API. So I just created them through the UI. But I was able to retrieve them with the code I specified above. – Shabini Rajadas Jan 23 '16 at 10:22