GET Operation

The GET operation retrieves an object and its child object information by ID. A similar result can be achieved by using the SEARCH operation, but GET is much simpler. The main object’s ID is required. The child object’s ID is not required.

Any GET request also needs to specify the properties to be returned in the response. If no properties are specified, the server returns the default properties. The object ID is always returned in the response.

Example:

Request XML
<request version='1.0'>
  <header>
    <office/>
    <user/>
    <password/>
  </header>
  <get>
    <Contact id="Contact.1.25">
      <Phones>
        <Phone>
          <AreaCode/>
          <Number/>
          <Extension/>
        </Phone>
      </Phones>
    </Contact>
  </get>
</request>

Response XML
<response version="1.0">
  <header>
    <sessionClosed/>
  </header>
  <get>
    <Contact _type="obj" id="Contact.1.25">
      <Phones _type="objs">
        <Phone _type="obj" id="Phone.1.7">
          <AreaCode>777</AreaCode>
          <Number>1234567</Number>
        </Phone>
      </Phones>
    </Contact>
  </get>
  <_status>OK</_status>
</response>

Get Lookup

The Get Lookup operation is used to retrieve the lookup index ID and its description information based lookup ID.

The Get Lookup operation is used to retrieve the lookup table and corresponding values. In order to retrieve the lookup table details you will need to specify the lookup index ID. This can also be used to retrieve custom choices added to SmartOffice.

Sample:

Request XML
<request version='1.0'>
  <header>
    <office/>
    <user/>
    <password/>
  </header>
  <get>
    <lookup id="1"/>
    <lookup id="2"/>
    <lookup id="3"/>
    <lookup id="4"/>
  </get>
</request>

Response XML
<response version="1.0">
  <header>
    <sessionClosed/>
  </header>
  <get>
    <lookup name="lookup" id="1"/>
    <lookup name="YesNo" id="2">
      <value index="0">No</value>
      <value index="1">Yes</value>
    </lookup>
    <lookup name="YesNoUnknown" id="3">
      <value index="0"/>
      <value index="1">Yes</value>
      <value index="2">No</value>
    </lookup>
    <lookup name="Record Type" id="4">
      <value index="1">Contact</value>
      <value index="2">Business</value>
      <value index="10">Archived</value>
    </lookup>
  </get>
  <_status>OK</_status>
</response>



Topic revision: 10 Nov 2016, DinosLambropoulos
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback