Hoe kan ik een omzetboeking maken?

Voor het maken van omzetboekingen m.b.v. de API gebruik je het POST journal_entries endpoint.

Hier volgen twee voorbeelden van verschillende typen omzetboekingen.

Op basis van productcategorieën

curl --request POST 'https://api.rompslomp.nl/api/v1/companies/{company_id}/journal_entries' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {access_token}' \
  --data-raw '{
    "journal_entry": {
      "description": "Boeking o.b.v. productcategorieën",
      "date": "2021-04-23",
      "lines": [
        { "account_path": "activa.current_assets.liquid_assets.kas",        "debit_amount":  "200" },
        { "account_path": "activa.current_assets.liquid_assets.creditcard", "debit_amount":  "100" },
        { "account_path": "activa.current_assets.liquid_assets.pin",        "debit_amount":  "900" },

        { "account_path": "profit.revenue.broodjes", "credit_amount": "250" },
        { "account_path": "profit.revenue.alcohol",  "credit_amount": "450" },
        { "account_path": "profit.revenue.toetjes",  "credit_amount": "350" },
        { "account_path": "profit.revenue.fruit",    "credit_amount": "150" }
      ]
    }
  }'

Op basis van btw-totalen

curl --request POST 'https://api.rompslomp.nl/api/v1/companies/{company_id}/journal_entries' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {access_token}' \
  --data-raw '{
    "journal_entry": {
      "description": "Boeking o.b.v. btw-totalen",
      "date": "2021-04-23",
      "lines": [
        { "account_path": "activa.current_assets.liquid_assets.kas",        "debit_amount": "200" },
        { "account_path": "activa.current_assets.liquid_assets.creditcard", "debit_amount": "100" },
        { "account_path": "activa.current_assets.liquid_assets.pin",        "debit_amount": "900" },

        { "account_path": "profit.revenue.vat_high",                         "credit_amount": "688.07" },
        { "account_path": "passiva.short_term_debt.vat.vat_to_pay.vat_high", "credit_amount": "61.93" },
        { "account_path": "vat_to_pay_revenue.vat_high",                     "credit_amount": "688.07" },

        { "account_path": "profit.revenue.vat_low",                             "credit_amount": "371.9" },
        { "account_path": "passiva.short_term_debt.vat.vat_to_pay.vat_low_new", "credit_amount": "78.1" },
        { "account_path": "vat_to_pay_revenue.vat_low_new",                     "credit_amount": "371.9" }
      ]
    }
  }'

Meer informatie