Request

PUT /invoice/5231cc3e4ab63c53dc900502/
Content-Type: application/json
{
    "notes": [], 
    "payments": [], 
    "account_type": "RECEIVABLE", 
    "attachments": [], 
    "current_revision": {
        "delivery_address": {
            "city": "Grenoble", 
            "extended_address": "Level 3", 
            "country": "FRANCE", 
            "postal_code": "38000", 
            "type": "DELIVERY", 
            "street_address": "1 Rue de Grenoble"
        }, 
        "billing_address": {
            "city": "Grenoble", 
            "extended_address": "Level 3", 
            "country": "FRANCE", 
            "postal_code": "38000", 
            "type": "BILLING", 
            "street_address": "1 Rue de Grenoble"
        }, 
        "sender": "Mr. Nobody", 
        "due_date": "2013-10-12", 
        "invoicing_date": "2013-09-12", 
        "taxes_application": "EXCLUSIVE", 
        "line_items": [
            {
                "description": "Item 1", 
                "reference": "ITEM1", 
                "tax": "/api/v1/tax/5231cc3c4ab63c53dc9004fc/", 
                "unit_price": "18.90", 
                "item_id": "5231cc3c4ab63c53dc9004ff", 
                "type": "PRODUCT", 
                "quantity": "4"
            }
        ], 
        "sender_address": {
            "city": "Grenoble", 
            "type": "BILLING", 
            "postal_code": "38000", 
            "street_address": "1 Rue de Grenoble", 
            "country": "FRANCE"
        }, 
        "currency": {
            "symbol": "EUR", 
            "rates": [
                {
                    "rate": "1.00", 
                    "currency_to": "MXN", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "USD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "AUD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "CHF", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "NOK", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "RUB", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "EGP", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "INR", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "CNY", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "JPY", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "TRY", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "BRL", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "MAD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "GBP", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "NZD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "SEK", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "DKK", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "HKD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "CAD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }
            ], 
            "id": "5231cbd54ab63c53dc90046c", 
            "resource_uri": "/api/v1/currency/5231cbd54ab63c53dc90046c/"
        }, 
        "contact": "/api/v1/contact/5231cc3c4ab63c53dc9004fe/", 
        "organization": "/api/v1/organization/5231cc3c4ab63c53dc9004fd/"
    }
}

Response

202 Accepted
Content-Type: application/json
{
    "state": "DRAFT", 
    "total": "90.42", 
    "account_type": "RECEIVABLE", 
    "attachments": [], 
    "reference": "256db9bd-ea7c-46f8-a372-5805afd9d3ef", 
    "resource_uri": "/api/v1/invoice/5231cc3e4ab63c53dc900502/", 
    "issuer": "/api/v1/user/5231cbd64ab63c53dc900474/", 
    "notes": [], 
    "history": [
        {
            "action": "UPDATED", 
            "issuer": "/api/v1/user/5231cbd64ab63c53dc900474/", 
            "revision": "4305cabe-676e-4b5d-9fb8-28af20e7fdee", 
            "resource_type": "action_history_entry", 
            "datetime": "2013-09-12T14:14:38.374671+00:00"
        }, 
        {
            "action": "CREATED", 
            "issuer": "/api/v1/user/5231cbd64ab63c53dc900474/", 
            "revision": "7d38d460-68bd-41c4-b8b4-b1470f2d04e7", 
            "resource_type": "action_history_entry", 
            "datetime": "2013-09-12T14:14:22.385000+00:00"
        }
    ], 
    "current_revision": {
        "delivery_address": {
            "city": "Grenoble", 
            "extended_address": "Level 3", 
            "country": "FRANCE", 
            "postoffice_box": null, 
            "label": null, 
            "geo_point": null, 
            "state": null, 
            "postal_code": "38000", 
            "type": "DELIVERY", 
            "street_address": "1 Rue de Grenoble"
        }, 
        "issue_date": "2013-09-12T14:14:38.122542+00:00", 
        "billing_address": {
            "city": "Grenoble", 
            "extended_address": "Level 3", 
            "country": "FRANCE", 
            "postoffice_box": null, 
            "label": null, 
            "geo_point": null, 
            "state": null, 
            "postal_code": "38000", 
            "type": "BILLING", 
            "street_address": "1 Rue de Grenoble"
        }, 
        "revision": "4305cabe-676e-4b5d-9fb8-28af20e7fdee", 
        "due_date": "2013-10-12", 
        "quotation_date": null, 
        "taxes_application": "EXCLUSIVE", 
        "custom_payment_conditions": null, 
        "invoicing_date": "2013-09-12", 
        "sender_address": {
            "city": "Grenoble", 
            "extended_address": null, 
            "country": "FRANCE", 
            "postoffice_box": null, 
            "label": null, 
            "geo_point": null, 
            "state": null, 
            "postal_code": "38000", 
            "type": "BILLING", 
            "street_address": "1 Rue de Grenoble"
        }, 
        "currency": {
            "symbol": "EUR", 
            "rates": [
                {
                    "rate": "1.00", 
                    "currency_to": "MXN", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "USD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "AUD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "CHF", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "NOK", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "RUB", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "EGP", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "INR", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "CNY", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "JPY", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "TRY", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "BRL", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "MAD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "GBP", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "NZD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "SEK", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "DKK", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "HKD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }, 
                {
                    "rate": "1.00", 
                    "currency_to": "CAD", 
                    "datetime": "2013-09-12T14:12:37.162000+00:00"
                }
            ]
        }, 
        "credit_note_emission_date": null, 
        "contact": "/api/v1/contact/5231cc3c4ab63c53dc9004fe/", 
        "sender": "Mr. Nobody", 
        "quotation_validity": null, 
        "line_items": [
            {
                "description": "Item 1", 
                "reference": "ITEM1", 
                "tax": "/api/v1/tax/5231cc3c4ab63c53dc9004fc/", 
                "unit_price": "18.90", 
                "item_id": "5231cc3c4ab63c53dc9004ff", 
                "quantity": "4"
            }
        ], 
        "sender_organization": "Test Company", 
        "organization": "/api/v1/organization/5231cc3c4ab63c53dc9004fd/", 
        "pdf": {}, 
        "customer_reference": null, 
        "issuer": "/api/v1/user/5231cbd64ab63c53dc900474/"
    }, 
    "paid": "0.00", 
    "amount": "90.42", 
    "contact": "/api/v1/contact/5231cc3c4ab63c53dc9004fe/", 
    "related_quotation": null, 
    "payments": [], 
    "related_credit_note": null, 
    "organization": "/api/v1/organization/5231cc3c4ab63c53dc9004fd/", 
    "balance": "90.42", 
    "revisions": [
        "/api/v1/invoice/5231cc3e4ab63c53dc900502/revisions/0/"
    ], 
    "id": "5231cc3e4ab63c53dc900502", 
    "has_temporary_reference": true
}

Request

PUT /invoice/5231cc424ab63c53dc900506/
Content-Type: application/xml
<object>
  <notes type="list"/>
  <current_revision type="hash">
    <delivery_address type="hash">
      <city>Grenoble</city>
      <extended_address>Level 3</extended_address>
      <country>FRANCE</country>
      <postal_code>38000</postal_code>
      <type>DELIVERY</type>
      <street_address>1 Rue de Grenoble</street_address>
    </delivery_address>
    <billing_address type="hash">
      <city>Grenoble</city>
      <extended_address>Level 3</extended_address>
      <country>FRANCE</country>
      <postal_code>38000</postal_code>
      <type>BILLING</type>
      <street_address>1 Rue de Grenoble</street_address>
    </billing_address>
    <sender>Mr. Nobody</sender>
    <due_date>2013-10-12</due_date>
    <taxes_application>EXCLUSIVE</taxes_application>
    <line_items type="list">
      <object type="hash">
        <description>Item 1</description>
        <reference>ITEM1</reference>
        <item_id>5231cc3c4ab63c53dc9004ff</item_id>
        <type>PRODUCT</type>
        <tax>/api/v1/tax/5231cc3c4ab63c53dc9004fc/</tax>
        <unit_price>18.90</unit_price>
        <quantity>4</quantity>
      </object>
    </line_items>
    <contact>/api/v1/contact/5231cc3c4ab63c53dc9004fe/</contact>
    <sender_address type="hash">
      <city>Grenoble</city>
      <type>BILLING</type>
      <street_address>1 Rue de Grenoble</street_address>
      <postal_code>38000</postal_code>
      <country>FRANCE</country>
    </sender_address>
    <currency type="hash">
      <symbol>EUR</symbol>
      <rates type="list">
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>MXN</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>USD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>AUD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>CHF</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>NOK</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>RUB</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>EGP</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>INR</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>CNY</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>JPY</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>TRY</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>BRL</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>MAD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>GBP</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>NZD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>SEK</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>DKK</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>HKD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object type="hash">
          <rate>1.00</rate>
          <currency_to>CAD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
      </rates>
      <id>5231cbd54ab63c53dc90046c</id>
      <resource_uri>/api/v1/currency/5231cbd54ab63c53dc90046c/</resource_uri>
    </currency>
    <invoicing_date>2013-09-12</invoicing_date>
    <organization>/api/v1/organization/5231cc3c4ab63c53dc9004fd/</organization>
  </current_revision>
  <account_type>RECEIVABLE</account_type>
  <payments type="list"/>
  <attachments type="list"/>
</object>

Response

202 Accepted
Content-Type: application/xml; charset=utf-8
<object>
  <balance>90.42</balance>
  <account_type>RECEIVABLE</account_type>
  <attachments type="list"/>
  <reference>bc4a7a19-a2ee-4a45-af58-67c9a082eb6b</reference>
  <state>DRAFT</state>
  <notes type="list"/>
  <history type="list">
    <object>
      <action>UPDATED</action>
      <datetime>2013-09-12T14:14:40.696322+00:00</datetime>
      <revision>5d2c6bd5-7460-4e3f-95bf-7c9736b64eb2</revision>
      <resource_type>action_history_entry</resource_type>
      <issuer>/api/v1/user/5231cbd64ab63c53dc900474/</issuer>
    </object>
    <object>
      <action>CREATED</action>
      <datetime>2013-09-12T14:14:26.430000+00:00</datetime>
      <revision>79292809-0cab-4dbe-946f-321f3f663f60</revision>
      <resource_type>action_history_entry</resource_type>
      <issuer>/api/v1/user/5231cbd64ab63c53dc900474/</issuer>
    </object>
  </history>
  <current_revision>
    <due_date>2013-10-12</due_date>
    <issue_date>2013-09-12T14:14:40.427441+00:00</issue_date>
    <billing_address>
      <city>Grenoble</city>
      <extended_address>Level 3</extended_address>
      <country>FRANCE</country>
      <postoffice_box type="null"/>
      <label type="null"/>
      <geo_point type="null"/>
      <state type="null"/>
      <postal_code>38000</postal_code>
      <type>BILLING</type>
      <street_address>1 Rue de Grenoble</street_address>
    </billing_address>
    <sender>Mr. Nobody</sender>
    <invoicing_date>2013-09-12</invoicing_date>
    <revision>5d2c6bd5-7460-4e3f-95bf-7c9736b64eb2</revision>
    <taxes_application>EXCLUSIVE</taxes_application>
    <line_items type="list">
      <object>
        <description>Item 1</description>
        <reference>ITEM1</reference>
        <tax>/api/v1/tax/5231cc3c4ab63c53dc9004fc/</tax>
        <unit_price>18.90</unit_price>
        <item_id>5231cc3c4ab63c53dc9004ff</item_id>
        <quantity>4</quantity>
      </object>
    </line_items>
    <delivery_address>
      <city>Grenoble</city>
      <extended_address>Level 3</extended_address>
      <country>FRANCE</country>
      <postoffice_box type="null"/>
      <label type="null"/>
      <geo_point type="null"/>
      <state type="null"/>
      <postal_code>38000</postal_code>
      <type>DELIVERY</type>
      <street_address>1 Rue de Grenoble</street_address>
    </delivery_address>
    <sender_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>38000</postal_code>
      <type>BILLING</type>
      <street_address>1 Rue de Grenoble</street_address>
    </sender_address>
    <currency>
      <symbol>EUR</symbol>
      <rates type="list">
        <object>
          <rate>1.00</rate>
          <currency_to>MXN</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>USD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>AUD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>CHF</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>NOK</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>RUB</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>EGP</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>INR</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>CNY</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>JPY</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>TRY</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>BRL</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>MAD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>GBP</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>NZD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>SEK</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>DKK</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>HKD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
        <object>
          <rate>1.00</rate>
          <currency_to>CAD</currency_to>
          <datetime>2013-09-12T14:12:37.162000+00:00</datetime>
        </object>
      </rates>
    </currency>
    <credit_note_emission_date type="null"/>
    <contact>/api/v1/contact/5231cc3c4ab63c53dc9004fe/</contact>
    <sender_organization>Test Company</sender_organization>
    <quotation_validity type="null"/>
    <organization>/api/v1/organization/5231cc3c4ab63c53dc9004fd/</organization>
    <pdf type="hash"/>
    <issuer>/api/v1/user/5231cbd64ab63c53dc900474/</issuer>
    <customer_reference type="null"/>
    <custom_payment_conditions type="null"/>
    <quotation_date type="null"/>
  </current_revision>
  <paid>0.00</paid>
  <id>5231cc424ab63c53dc900506</id>
  <amount>90.42</amount>
  <contact>/api/v1/contact/5231cc3c4ab63c53dc9004fe/</contact>
  <related_quotation type="null"/>
  <payments type="list"/>
  <resource_uri>/api/v1/invoice/5231cc424ab63c53dc900506/</resource_uri>
  <related_credit_note type="null"/>
  <organization>/api/v1/organization/5231cc3c4ab63c53dc9004fd/</organization>
  <total>90.42</total>
  <revisions type="list">
    <value>/api/v1/invoice/5231cc424ab63c53dc900506/revisions/0/</value>
  </revisions>
  <has_temporary_reference type="boolean">True</has_temporary_reference>
  <issuer>/api/v1/user/5231cbd64ab63c53dc900474/</issuer>
</object>

Request

PUT /invoice/5231cc464ab63c53dc90050a/
Content-Type: text/yaml
account_type: !!python/unicode 'RECEIVABLE'
attachments: []
current_revision:
billing_address: {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE',
extended_address: !!python/unicode 'Level 3', postal_code: !!python/unicode '38000',
street_address: !!python/unicode '1 Rue de Grenoble', type: !!python/unicode 'BILLING'}
contact: !!python/unicode '/api/v1/contact/5231cc3c4ab63c53dc9004fe/'
currency:
!!python/unicode 'id': !!python/unicode '5231cbd54ab63c53dc90046c'
!!python/unicode 'rates':
- {!!python/unicode 'currency_to': !!python/unicode 'MXN', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'USD', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'AUD', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'CHF', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'NOK', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'RUB', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'EGP', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'INR', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'CNY', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'JPY', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'TRY', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'BRL', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'MAD', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'GBP', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'NZD', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'SEK', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'DKK', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'HKD', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
- {!!python/unicode 'currency_to': !!python/unicode 'CAD', !!python/unicode 'datetime': !!python/unicode '2013-09-12T14:12:37.162000+00:00',
!!python/unicode 'rate': !!python/unicode '1.00'}
!!python/unicode 'resource_uri': !!python/unicode '/api/v1/currency/5231cbd54ab63c53dc90046c/'
!!python/unicode 'symbol': !!python/unicode 'EUR'
delivery_address: {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE',
extended_address: !!python/unicode 'Level 3', postal_code: !!python/unicode '38000',
street_address: !!python/unicode '1 Rue de Grenoble', type: !!python/unicode 'DELIVERY'}
due_date: !!python/unicode '2013-10-12'
invoicing_date: !!python/unicode '2013-09-12'
line_items:
- {description: !!python/unicode 'Item 1', item_id: !!python/unicode '5231cc3c4ab63c53dc9004ff',
quantity: !!python/unicode '4', reference: !!python/unicode 'ITEM1', tax: !!python/unicode '/api/v1/tax/5231cc3c4ab63c53dc9004fc/',
type: !!python/unicode 'PRODUCT', unit_price: !!python/unicode '18.90'}
organization: !!python/unicode '/api/v1/organization/5231cc3c4ab63c53dc9004fd/'
sender: !!python/unicode 'Mr. Nobody'
sender_address: {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE',
postal_code: !!python/unicode '38000', street_address: !!python/unicode '1 Rue
de Grenoble', type: !!python/unicode 'BILLING'}
taxes_application: !!python/unicode 'EXCLUSIVE'
notes: []
payments: []

Response

202 Accepted
Content-Type: text/yaml; charset=utf-8
account_type: !!python/unicode 'RECEIVABLE'
amount: !!python/unicode '90.42'
attachments: []
balance: !!python/unicode '90.42'
contact: !!python/unicode '/api/v1/contact/5231cc3c4ab63c53dc9004fe/'
current_revision:
billing_address: {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE',
extended_address: !!python/unicode 'Level 3', geo_point: null, label: null, postal_code: !!python/unicode '38000',
postoffice_box: null, state: null, street_address: !!python/unicode '1 Rue de
Grenoble', type: !!python/unicode 'BILLING'}
contact: !!python/unicode '/api/v1/contact/5231cc3c4ab63c53dc9004fe/'
credit_note_emission_date: null
currency:
rates:
- {currency_to: !!python/unicode 'MXN', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'USD', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'AUD', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'CHF', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'NOK', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'RUB', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'EGP', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'INR', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'CNY', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'JPY', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'TRY', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'BRL', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'MAD', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'GBP', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'NZD', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'SEK', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'DKK', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'HKD', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
- {currency_to: !!python/unicode 'CAD', datetime: '2013-09-12T14:12:37.162000+00:00',
rate: !!python/unicode '1.00'}
symbol: !!python/unicode 'EUR'
custom_payment_conditions: null
customer_reference: null
delivery_address: {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE',
extended_address: !!python/unicode 'Level 3', geo_point: null, label: null, postal_code: !!python/unicode '38000',
postoffice_box: null, state: null, street_address: !!python/unicode '1 Rue de
Grenoble', type: !!python/unicode 'DELIVERY'}
due_date: '2013-10-12'
invoicing_date: '2013-09-12'
issue_date: '2013-09-12T14:14:42.687044+00:00'
issuer: !!python/unicode '/api/v1/user/5231cbd64ab63c53dc900474/'
line_items:
- {description: !!python/unicode 'Item 1', item_id: !!python/unicode '5231cc3c4ab63c53dc9004ff',
quantity: !!python/unicode '4', reference: !!python/unicode 'ITEM1', tax: !!python/unicode '/api/v1/tax/5231cc3c4ab63c53dc9004fc/',
unit_price: !!python/unicode '18.90'}
organization: !!python/unicode '/api/v1/organization/5231cc3c4ab63c53dc9004fd/'
pdf: {}
quotation_date: null
quotation_validity: null
revision: !!python/unicode '8c911607-27e0-4fab-81c2-9e384a773493'
sender: !!python/unicode 'Mr. Nobody'
sender_address: {city: !!python/unicode 'Grenoble', country: !!python/unicode 'FRANCE',
extended_address: null, geo_point: null, label: null, postal_code: !!python/unicode '38000',
postoffice_box: null, state: null, street_address: !!python/unicode '1 Rue de
Grenoble', type: !!python/unicode 'BILLING'}
sender_organization: !!python/unicode 'Test Company'
taxes_application: !!python/unicode 'EXCLUSIVE'
has_temporary_reference: true
history:
- {action: !!python/unicode 'UPDATED', datetime: '2013-09-12T14:14:42.933440+00:00',
issuer: !!python/unicode '/api/v1/user/5231cbd64ab63c53dc900474/', resource_type: !!python/unicode 'action_history_entry',
revision: !!python/unicode '8c911607-27e0-4fab-81c2-9e384a773493'}
- {action: !!python/unicode 'CREATED', datetime: '2013-09-12T14:14:30.694000+00:00',
issuer: !!python/unicode '/api/v1/user/5231cbd64ab63c53dc900474/', resource_type: !!python/unicode 'action_history_entry',
revision: !!python/unicode '13a47884-7263-4f63-b5df-0b953546fa45'}
id: !!python/unicode '5231cc464ab63c53dc90050a'
issuer: !!python/unicode '/api/v1/user/5231cbd64ab63c53dc900474/'
notes: []
organization: !!python/unicode '/api/v1/organization/5231cc3c4ab63c53dc9004fd/'
paid: !!python/unicode '0.00'
payments: []
reference: !!python/unicode '07f9528a-1a37-4139-9e52-b4cd0ecb5373'
related_credit_note: null
related_quotation: null
resource_uri: !!python/unicode '/api/v1/invoice/5231cc464ab63c53dc90050a/'
revisions: [!!python/unicode '/api/v1/invoice/5231cc464ab63c53dc90050a/revisions/0/']
state: !!python/unicode 'DRAFT'
total: !!python/unicode '90.42'