Skip to content

Instantly share code, notes, and snippets.

@jankeesvw
Created January 7, 2014 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jankeesvw/8301777 to your computer and use it in GitHub Desktop.
Save jankeesvw/8301777 to your computer and use it in GitHub Desktop.

request object:

{
   "invoice":{
     "company_name":"TODO: Company",
     "details_attributes":[
       {
         "amount":16.75,
         "description":"Zestien uur en drie kwartier met rowan gepraat"
       },
       {
         "amount":2.0,
         "description":"Twee uur met rowan gepraat"
       }
     ]
   }
}

response object

{
  "invoice":{
   "address1":null,
    "address2":null,
    "attention":null,
    "city":null,
    "company_name":"TODO: Company",
    "concept_id":70,
    "contact_id":1566566,
    "country":null,
    "created_at":"2014-01-07T17:14:43+01:00",
    "currency":"EUR",
    "customer_id":"71",
    "description":"We verzoeken u vriendelijk het bovenstaande bedrag van {document.total_price} voor {document.due_date} te voldoen op onze bankrekening onder vermelding van het factuurnummer {document.invoice_id}. Voor vragen kunt u contact opnemen per e-mail.",
    "discount":"0.0",
    "due_date_interval":14,
    "exchange_rate":1,
    "firstname":null,
    "id":2257445,
    "invoice_date":"2014-01-07",
    "invoice_hash":"66c3a61d7fe84b9ff2eb52673262d16cc59f9acc",
    "invoice_id":null,
    "invoice_profile_id":1,
    "invoice_profile_version_id":null,
    "language":"nl",
    "lastname":null,
    "original_estimate_id":null,
    "original_invoice_id":null,
    "po_number":null,
    "prices_are_incl_tax":false,
    "recurring_template_id":null,
    "send_method":"email",
    "show_customer_id":false,
    "show_tax":true,
    "show_tax_number":false,
    "state":"draft",
    "tax_number":null,
    "total_price_excl_tax":"0.0",
    "total_price_excl_tax_base":"0.0",
    "total_price_incl_tax":"0.0",
    "total_price_incl_tax_base":"0.0",
    "updated_at":"2014-01-07T17:14:43+01:00",
    "zipcode":null,
    "contact_name":"",
    "days_open":0,
    "email":"",
    "invoice_email":"Geachte TODO: Company, \n\nIn de bijlage kunt u factuur {document.invoice_id} voor onze diensten vinden. Wij verzoeken u vriendelijk de factuur voor 21-01-2014 te voldoen.\n\nMet vriendelijke groet,\n\nTimi test",
    "invoice_email_reminder":"Geachte TODO: Company, \n\nIn de bijlage kunt u een herinnering voor factuur {document.invoice_id} vinden. Deze factuur is op 21-01-2014 verlopen, maar helaas hebben wij nog geen betaling ontvangen. Wij verzoeken u vriendelijk de factuur binnen vijf dagen te voldoen.\n\nMet vriendelijke groet,\n\nTimi test",
    "name":"TODO: Company",
    "pay_url":"https://timi-test.moneybird.nl/invoice/d6cbe5816735931d7888df08b5a633837070e798/66c3a61d7fe84b9ff2eb52673262d16cc59f9acc/pay",
    "revision":1389111283,
    "total_discount":"-0.0",
    "total_paid":0,
    "total_tax":"0.0",
    "total_unpaid":"0.0",
    "url":"https://timi-test.moneybird.nl/invoice/d6cbe5816735931d7888df08b5a633837070e798/66c3a61d7fe84b9ff2eb52673262d16cc59f9acc",
    "details":[
      {
        "amount":"2.0",
        "created_at":"2014-01-07T17:14:43+01:00",
        "description":"Twee uur met rowan gepraat",
        "id":7555985,
        "ledger_account_id":804814,
        "price":"0.0",
        "row_order":null,
        "tax_rate_id":312022,
        "updated_at":"2014-01-07T17:14:43+01:00",
        "amount_plain":"2.0",
        "tax":"0.21",
        "total_price_excl_tax":"0.0",
        "total_price_incl_tax":"0.0"
      },
      {
        "amount":1,
        "created_at":"2014-01-07T17:14:43+01:00",
        "description":"Zestien uur en drie kwartier met rowan gepraat",
        "id":7555986,
        "ledger_account_id":804814,
        "price":"0.0",
        "row_order":null,
        "tax_rate_id":312022,
        "updated_at":"2014-01-07T17:14:43+01:00",
        "amount_plain":"",
        "tax":"0.21",
        "total_price_excl_tax":"0.0",
        "total_price_incl_tax":"0.0"
      }
    ],
    "history":[
      {
        "action":"invoice_created",
        "created_at":"2014-01-07T17:14:43+01:00",
        "description":null,
        "id":6261972,
        "updated_at":"2014-01-07T17:14:43+01:00",
        "user_id":null
      }
    ],
    "payments":[

    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment