Request

POST /tenant/
Content-Type: application/json
{
    "supported_currencies": [
        "/api/v1/currency/5231cbd54ab63c53dc90046c/"
    ], 
    "fax": "0102030400", 
    "billing_address": {
        "city": "Paris", 
        "postal_code": "75001", 
        "street_address": "This address is a fake", 
        "country": "France"
    }, 
    "name": "My Company", 
    "postal_address": {
        "city": "Grenoble", 
        "postal_code": "75001", 
        "street_address": "This address is a fake", 
        "country": "France"
    }, 
    "registration_info": {
        "share_capital": "200,000 USD", 
        "resource_type": "us_registration_info", 
        "business_entity": "Inc."
    }, 
    "phone": "0102030405", 
    "report_settings": {}, 
    "email": "contact@naeka.fr", 
    "default_currency": "/api/v1/currency/5231cbd54ab63c53dc90046c/"
}

Response

201 Created
Content-Type: application/json
Location: /tenant/5231cbd94ab63c53dc900479/
{
    "fax": "0102030400", 
    "billing_address": {
        "city": "Paris", 
        "extended_address": null, 
        "country": "France", 
        "postoffice_box": null, 
        "label": null, 
        "geo_point": null, 
        "state": null, 
        "postal_code": "75001", 
        "type": null, 
        "street_address": "This address is a fake"
    }, 
    "svg_logo": null, 
    "img_logo": null, 
    "postal_address": {
        "city": "Grenoble", 
        "extended_address": null, 
        "country": "France", 
        "postoffice_box": null, 
        "label": null, 
        "geo_point": null, 
        "state": null, 
        "postal_code": "75001", 
        "type": null, 
        "street_address": "This address is a fake"
    }, 
    "registration_info": {
        "share_capital": "200,000 USD", 
        "resource_type": "us_registration_info", 
        "business_entity": "Inc."
    }, 
    "slug": "my-company", 
    "id": "5231cbd94ab63c53dc900479", 
    "phone": "0102030405", 
    "report_settings": {
        "language": "en", 
        "base_color": null, 
        "font_size": 10, 
        "force_bw": false, 
        "font_name": "Bariol"
    }, 
    "resource_uri": "/api/v1/tenant/5231cbd94ab63c53dc900479/", 
    "email": "contact@naeka.fr", 
    "terms": null, 
    "name": "My Company"
}

Request

POST /tenant/
Content-Type: application/xml
<object>
  <supported_currencies type="list">
    <value>/api/v1/currency/5231cbd54ab63c53dc90046c/</value>
  </supported_currencies>
  <phone>0102030405</phone>
  <fax>0102030400</fax>
  <billing_address type="hash">
    <city>Paris</city>
    <postal_code>75001</postal_code>
    <street_address>This address is a fake</street_address>
    <country>France</country>
  </billing_address>
  <name>My Company</name>
  <postal_address type="hash">
    <city>Grenoble</city>
    <postal_code>75001</postal_code>
    <street_address>This address is a fake</street_address>
    <country>France</country>
  </postal_address>
  <registration_info type="hash">
    <share_capital>200,000 USD</share_capital>
    <resource_type>us_registration_info</resource_type>
    <business_entity>Inc.</business_entity>
  </registration_info>
  <report_settings type="hash"/>
  <email>contact@naeka.fr</email>
  <default_currency>/api/v1/currency/5231cbd54ab63c53dc90046c/</default_currency>
</object>

Response

201 Created
Content-Type: application/xml; charset=utf-8
Location: /tenant/5231cbda4ab63c53dc900485/
<object>
  <fax>0102030400</fax>
  <billing_address>
    <city>Paris</city>
    <extended_address type="null"/>
    <country>France</country>
    <postoffice_box type="null"/>
    <label type="null"/>
    <geo_point type="null"/>
    <state type="null"/>
    <postal_code>75001</postal_code>
    <type type="null"/>
    <street_address>This address is a fake</street_address>
  </billing_address>
  <svg_logo type="null"/>
  <name>My Company</name>
  <postal_address>
    <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>75001</postal_code>
    <type type="null"/>
    <street_address>This address is a fake</street_address>
  </postal_address>
  <registration_info>
    <share_capital>200,000 USD</share_capital>
    <resource_type>us_registration_info</resource_type>
    <business_entity>Inc.</business_entity>
  </registration_info>
  <slug>my-company-4256788d</slug>
  <id>5231cbda4ab63c53dc900485</id>
  <phone>0102030405</phone>
  <img_logo type="null"/>
  <report_settings>
    <base_color type="null"/>
    <font_size type="integer">10</font_size>
    <force_bw type="boolean">False</force_bw>
    <language>en</language>
    <font_name>Bariol</font_name>
  </report_settings>
  <email>contact@naeka.fr</email>
  <terms type="null"/>
  <resource_uri>/api/v1/tenant/5231cbda4ab63c53dc900485/</resource_uri>
</object>

Request

POST /tenant/
Content-Type: text/yaml
!!python/unicode 'billing_address': {!!python/unicode 'city': !!python/unicode 'Paris',
!!python/unicode 'country': !!python/unicode 'France', !!python/unicode 'postal_code': !!python/unicode '75001',
!!python/unicode 'street_address': !!python/unicode 'This address is a fake'}
default_currency: !!python/unicode '/api/v1/currency/5231cbd54ab63c53dc90046c/'
!!python/unicode 'email': !!python/unicode 'contact@naeka.fr'
!!python/unicode 'fax': !!python/unicode '0102030400'
!!python/unicode 'name': !!python/unicode 'My Company'
!!python/unicode 'phone': !!python/unicode '0102030405'
!!python/unicode 'postal_address': {!!python/unicode 'city': !!python/unicode 'Grenoble',
!!python/unicode 'country': !!python/unicode 'France', !!python/unicode 'postal_code': !!python/unicode '75001',
!!python/unicode 'street_address': !!python/unicode 'This address is a fake'}
!!python/unicode 'registration_info': {!!python/unicode 'business_entity': !!python/unicode 'Inc.',
!!python/unicode 'resource_type': !!python/unicode 'us_registration_info', !!python/unicode 'share_capital': !!python/unicode '200,000
USD'}
!!python/unicode 'report_settings': {}
supported_currencies: [!!python/unicode '/api/v1/currency/5231cbd54ab63c53dc90046c/']

Response

201 Created
Content-Type: text/yaml; charset=utf-8
Location: /tenant/5231cbdd4ab63c53dc900491/
billing_address: {city: !!python/unicode 'Paris', country: !!python/unicode 'France',
extended_address: null, geo_point: null, label: null, postal_code: !!python/unicode '75001',
postoffice_box: null, state: null, street_address: !!python/unicode 'This address
is a fake', type: null}
email: !!python/unicode 'contact@naeka.fr'
fax: !!python/unicode '0102030400'
id: !!python/unicode '5231cbdd4ab63c53dc900491'
img_logo: null
name: !!python/unicode 'My Company'
phone: !!python/unicode '0102030405'
postal_address: {city: !!python/unicode 'Grenoble', country: !!python/unicode 'France',
extended_address: null, geo_point: null, label: null, postal_code: !!python/unicode '75001',
postoffice_box: null, state: null, street_address: !!python/unicode 'This address
is a fake', type: null}
registration_info: {business_entity: !!python/unicode 'Inc.', resource_type: !!python/unicode 'us_registration_info',
share_capital: !!python/unicode '200,000 USD'}
report_settings: {base_color: null, font_name: !!python/unicode 'Bariol', font_size: 10,
force_bw: false, language: !!python/unicode 'en'}
resource_uri: !!python/unicode '/api/v1/tenant/5231cbdd4ab63c53dc900491/'
slug: !!python/unicode 'my-company-ee14f91f'
svg_logo: null
terms: null