Request

PUT /contact/5231cbee4ab63c53dc9004b6/
Content-Type: application/json
{
    "name": "B", 
    "firstname": "Chief", 
    "photo_source": "GRAVATAR", 
    "phones": [
        {
            "phone": "06 01 02 03 04", 
            "type": "WORK", 
            "subtype": "CELL"
        }, 
        {
            "phone": "04 05 06 07 08", 
            "type": "WORK"
        }
    ], 
    "note": "Phones are not real!", 
    "gravatar_mail": "api-employee@naeka.fr", 
    "organization": "/api/v1/organization/5231cbee4ab63c53dc9004b5/", 
    "emails": [
        {
            "type": "HOME", 
            "email": "api-employee@naeka.fr"
        }
    ], 
    "addresses": [
        {
            "city": "Grenoble", 
            "type": "WORK", 
            "postal_code": "38000", 
            "street_address": "1 Rue de Grenoble", 
            "country": "FRANCE"
        }
    ]
}

Response

202 Accepted
Content-Type: application/json
{
    "photo_uri": "https://secure.gravatar.com/avatar/890005216d508238d3153f7a99204759.jpg?s=80&r=g&d=blank", 
    "status": "ACTIVE", 
    "addresses": [
        {
            "city": "Grenoble", 
            "extended_address": null, 
            "country": "FRANCE", 
            "postoffice_box": null, 
            "label": null, 
            "geo_point": null, 
            "state": null, 
            "postal_code": "38000", 
            "type": "WORK", 
            "street_address": "1 Rue de Grenoble", 
            "resource_uri": "/api/v1/contact/5231cbee4ab63c53dc9004b6/addresses/0/"
        }
    ], 
    "firstname": "Chief", 
    "creator": "/api/v1/user/5231cbd64ab63c53dc900474/", 
    "photo_source": "GRAVATAR", 
    "phones": [
        {
            "phone": "06 01 02 03 04", 
            "resource_uri": "/api/v1/contact/5231cbee4ab63c53dc9004b6/phones/0/", 
            "type": "WORK", 
            "subtype": "CELL", 
            "label": null
        }, 
        {
            "phone": "04 05 06 07 08", 
            "resource_uri": "/api/v1/contact/5231cbee4ab63c53dc9004b6/phones/1/", 
            "type": "WORK", 
            "subtype": null, 
            "label": null
        }
    ], 
    "civility": null, 
    "private": true, 
    "id": "5231cbee4ab63c53dc9004b6", 
    "note": "Phones are not real!", 
    "birthday": null, 
    "role": null, 
    "additional_names": null, 
    "photo": null, 
    "organization": "/api/v1/organization/5231cbee4ab63c53dc9004b5/", 
    "gravatar_mail": "api-employee@naeka.fr", 
    "resource_uri": "/api/v1/contact/5231cbee4ab63c53dc9004b6/", 
    "emails": [
        {
            "resource_uri": "/api/v1/contact/5231cbee4ab63c53dc9004b6/emails/0/", 
            "type": "HOME", 
            "email": "api-employee@naeka.fr", 
            "label": null
        }
    ], 
    "name": "B"
}

Request

PUT /contact/5231cbee4ab63c53dc9004b7/
Content-Type: application/xml
<object>
  <name>B</name>
  <firstname>Chief</firstname>
  <photo_source>GRAVATAR</photo_source>
  <phones type="list">
    <object type="hash">
      <phone>06 01 02 03 04</phone>
      <type>WORK</type>
      <subtype>CELL</subtype>
    </object>
    <object type="hash">
      <phone>04 05 06 07 08</phone>
      <type>WORK</type>
    </object>
  </phones>
  <note>Phones are not real!</note>
  <gravatar_mail>api-employee@naeka.fr</gravatar_mail>
  <organization>/api/v1/organization/5231cbee4ab63c53dc9004b5/</organization>
  <emails type="list">
    <object type="hash">
      <type>HOME</type>
      <email>api-employee@naeka.fr</email>
    </object>
  </emails>
  <addresses type="list">
    <object type="hash">
      <city>Grenoble</city>
      <type>WORK</type>
      <postal_code>38000</postal_code>
      <street_address>1 Rue de Grenoble</street_address>
      <country>FRANCE</country>
    </object>
  </addresses>
</object>

Response

202 Accepted
Content-Type: application/xml; charset=utf-8
<object>
  <status>ACTIVE</status>
  <birthday type="null"/>
  <name>B</name>
  <firstname>Chief</firstname>
  <creator>/api/v1/user/5231cbd64ab63c53dc900474/</creator>
  <photo_source>GRAVATAR</photo_source>
  <phones type="list">
    <object>
      <phone>06 01 02 03 04</phone>
      <resource_uri>/api/v1/contact/5231cbee4ab63c53dc9004b7/phones/0/</resource_uri>
      <type>WORK</type>
      <subtype>CELL</subtype>
      <label type="null"/>
    </object>
    <object>
      <phone>04 05 06 07 08</phone>
      <resource_uri>/api/v1/contact/5231cbee4ab63c53dc9004b7/phones/1/</resource_uri>
      <type>WORK</type>
      <subtype type="null"/>
      <label type="null"/>
    </object>
  </phones>
  <civility type="null"/>
  <private type="boolean">True</private>
  <id>5231cbee4ab63c53dc9004b7</id>
  <note>Phones are not real!</note>
  <gravatar_mail>api-employee@naeka.fr</gravatar_mail>
  <role type="null"/>
  <additional_names type="null"/>
  <photo type="null"/>
  <organization>/api/v1/organization/5231cbee4ab63c53dc9004b5/</organization>
  <photo_uri>https://secure.gravatar.com/avatar/890005216d508238d3153f7a99204759.jpg?s=80&amp;r=g&amp;d=blank</photo_uri>
  <resource_uri>/api/v1/contact/5231cbee4ab63c53dc9004b7/</resource_uri>
  <emails type="list">
    <object>
      <label type="null"/>
      <type>HOME</type>
      <email>api-employee@naeka.fr</email>
      <resource_uri>/api/v1/contact/5231cbee4ab63c53dc9004b7/emails/0/</resource_uri>
    </object>
  </emails>
  <addresses type="list">
    <object>
      <city>Grenoble</city>
      <extended_address type="null"/>
      <country>FRANCE</country>
      <postoffice_box type="null"/>
      <label type="null"/>
      <geo_point type="null"/>
      <state type="null"/>
      <postal_code>38000</postal_code>
      <type>WORK</type>
      <street_address>1 Rue de Grenoble</street_address>
      <resource_uri>/api/v1/contact/5231cbee4ab63c53dc9004b7/addresses/0/</resource_uri>
    </object>
  </addresses>
</object>

Request

PUT /contact/5231cbee4ab63c53dc9004b8/
Content-Type: text/yaml
addresses:
- {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE', postal_code: !!python/unicode '38000',
street_address: !!python/unicode '1 Rue de Grenoble', type: !!python/unicode 'WORK'}
emails:
- {email: !!python/unicode 'api-employee@naeka.fr', type: !!python/unicode 'HOME'}
firstname: !!python/unicode 'Chief'
gravatar_mail: !!python/unicode 'api-employee@naeka.fr'
name: !!python/unicode 'B'
note: !!python/unicode 'Phones are not real!'
organization: !!python/unicode '/api/v1/organization/5231cbee4ab63c53dc9004b5/'
phones:
- {phone: !!python/unicode '06 01 02 03 04', subtype: !!python/unicode 'CELL', type: !!python/unicode 'WORK'}
- {phone: !!python/unicode '04 05 06 07 08', type: !!python/unicode 'WORK'}
photo_source: !!python/unicode 'GRAVATAR'

Response

202 Accepted
Content-Type: text/yaml; charset=utf-8
additional_names: null
addresses:
- {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE', extended_address: null,
geo_point: null, label: null, postal_code: !!python/unicode '38000', postoffice_box: null,
resource_uri: !!python/unicode '/api/v1/contact/5231cbee4ab63c53dc9004b8/addresses/0/',
state: null, street_address: !!python/unicode '1 Rue de Grenoble', type: !!python/unicode 'WORK'}
birthday: null
civility: null
creator: !!python/unicode '/api/v1/user/5231cbd64ab63c53dc900474/'
emails:
- {email: !!python/unicode 'api-employee@naeka.fr', label: null, resource_uri: !!python/unicode '/api/v1/contact/5231cbee4ab63c53dc9004b8/emails/0/',
type: !!python/unicode 'HOME'}
firstname: !!python/unicode 'Chief'
gravatar_mail: !!python/unicode 'api-employee@naeka.fr'
id: !!python/unicode '5231cbee4ab63c53dc9004b8'
name: !!python/unicode 'B'
note: !!python/unicode 'Phones are not real!'
organization: !!python/unicode '/api/v1/organization/5231cbee4ab63c53dc9004b5/'
phones:
- {label: null, phone: !!python/unicode '06 01 02 03 04', resource_uri: !!python/unicode '/api/v1/contact/5231cbee4ab63c53dc9004b8/phones/0/',
subtype: !!python/unicode 'CELL', type: !!python/unicode 'WORK'}
- {label: null, phone: !!python/unicode '04 05 06 07 08', resource_uri: !!python/unicode '/api/v1/contact/5231cbee4ab63c53dc9004b8/phones/1/',
subtype: null, type: !!python/unicode 'WORK'}
photo: null
photo_source: !!python/unicode 'GRAVATAR'
photo_uri: !!python/unicode 'https://secure.gravatar.com/avatar/890005216d508238d3153f7a99204759.jpg?s=80&r=g&d=blank'
private: true
resource_uri: !!python/unicode '/api/v1/contact/5231cbee4ab63c53dc9004b8/'
role: null
status: !!python/unicode 'ACTIVE'