Request

POST /organization/
Content-Type: application/json
{
    "phones": [
        {
            "phone": "04 05 06 07 08", 
            "type": "WORK"
        }
    ], 
    "addresses": [
        {
            "city": "Grenoble", 
            "type": "WORK", 
            "postal_code": "38000", 
            "street_address": "1 Rue de Grenoble", 
            "country": "FRANCE"
        }
    ], 
    "emails": [
        {
            "type": "WORK", 
            "email": "contact@naeka.fr"
        }
    ], 
    "corporate_name": "Company A"
}

Response

201 Created
Content-Type: application/json
Location: /organization/5231cbf04ab63c53dc9004ba/
{
    "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/organization/5231cbf04ab63c53dc9004ba/addresses/0/"
        }
    ], 
    "creator": "/api/v1/user/5231cbd64ab63c53dc900474/", 
    "photo_source": null, 
    "phones": [
        {
            "phone": "04 05 06 07 08", 
            "resource_uri": "/api/v1/organization/5231cbf04ab63c53dc9004ba/phones/0/", 
            "type": "WORK", 
            "subtype": null, 
            "label": null
        }
    ], 
    "contacts": [], 
    "private": true, 
    "corporate_name": "Company A", 
    "note": null, 
    "gravatar_mail": null, 
    "photo": null, 
    "id": "5231cbf04ab63c53dc9004ba", 
    "photo_uri": null, 
    "emails": [
        {
            "resource_uri": "/api/v1/organization/5231cbf04ab63c53dc9004ba/emails/0/", 
            "type": "WORK", 
            "email": "contact@naeka.fr", 
            "label": null
        }
    ], 
    "tags": [], 
    "resource_uri": "/api/v1/organization/5231cbf04ab63c53dc9004ba/"
}

Request

POST /organization/
Content-Type: application/xml
<object>
  <phones type="list">
    <object type="hash">
      <phone>04 05 06 07 08</phone>
      <type>WORK</type>
    </object>
  </phones>
  <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>
  <emails type="list">
    <object type="hash">
      <type>WORK</type>
      <email>contact@naeka.fr</email>
    </object>
  </emails>
  <corporate_name>Company A</corporate_name>
</object>

Response

201 Created
Content-Type: application/xml; charset=utf-8
Location: /organization/5231cbf04ab63c53dc9004bb/
<object>
  <status>ACTIVE</status>
  <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/organization/5231cbf04ab63c53dc9004bb/addresses/0/</resource_uri>
    </object>
  </addresses>
  <contacts type="list"/>
  <photo_source type="null"/>
  <phones type="list">
    <object>
      <phone>04 05 06 07 08</phone>
      <resource_uri>/api/v1/organization/5231cbf04ab63c53dc9004bb/phones/0/</resource_uri>
      <type>WORK</type>
      <subtype type="null"/>
      <label type="null"/>
    </object>
  </phones>
  <creator>/api/v1/user/5231cbd64ab63c53dc900474/</creator>
  <private type="boolean">True</private>
  <corporate_name>Company A</corporate_name>
  <note type="null"/>
  <gravatar_mail type="null"/>
  <photo type="null"/>
  <id>5231cbf04ab63c53dc9004bb</id>
  <photo_uri type="null"/>
  <emails type="list">
    <object>
      <label type="null"/>
      <type>WORK</type>
      <email>contact@naeka.fr</email>
      <resource_uri>/api/v1/organization/5231cbf04ab63c53dc9004bb/emails/0/</resource_uri>
    </object>
  </emails>
  <tags type="list"/>
  <resource_uri>/api/v1/organization/5231cbf04ab63c53dc9004bb/</resource_uri>
</object>

Request

POST /organization/
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'}
corporate_name: !!python/unicode 'Company A'
emails:
- {email: !!python/unicode 'contact@naeka.fr', type: !!python/unicode 'WORK'}
phones:
- {phone: !!python/unicode '04 05 06 07 08', type: !!python/unicode 'WORK'}

Response

201 Created
Content-Type: text/yaml; charset=utf-8
Location: /organization/5231cbf04ab63c53dc9004bc/
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/organization/5231cbf04ab63c53dc9004bc/addresses/0/',
state: null, street_address: !!python/unicode '1 Rue de Grenoble', type: !!python/unicode 'WORK'}
contacts: []
corporate_name: !!python/unicode 'Company A'
creator: !!python/unicode '/api/v1/user/5231cbd64ab63c53dc900474/'
emails:
- {email: !!python/unicode 'contact@naeka.fr', label: null, resource_uri: !!python/unicode '/api/v1/organization/5231cbf04ab63c53dc9004bc/emails/0/',
type: !!python/unicode 'WORK'}
gravatar_mail: null
id: !!python/unicode '5231cbf04ab63c53dc9004bc'
note: null
phones:
- {label: null, phone: !!python/unicode '04 05 06 07 08', resource_uri: !!python/unicode '/api/v1/organization/5231cbf04ab63c53dc9004bc/phones/0/',
subtype: null, type: !!python/unicode 'WORK'}
photo: null
photo_source: null
photo_uri: null
private: true
resource_uri: !!python/unicode '/api/v1/organization/5231cbf04ab63c53dc9004bc/'
status: !!python/unicode 'ACTIVE'
tags: []