Webhooks

Webhooks are available soon.

Payload

The payload of a delivered webhook contains the current document including its status, classifications and complies with the request for documents.

{
    "data": {
        "id": "767",
        "type": "documents",
        "attributes": {
            "created_at": "2018-05-08T06:21:19.650Z",
            "updated_at": "2018-09-24T07:21:28.998Z",

            // meta data, current status etc
            "tenant_id": "1",
            "current_status": "done",
            "estimated_time_of_completion": "2018-09-25T07:21:28.994Z",
            "error_codes": [
                "for_training"
            ],
            "custom_fields": {
                "customer_id": "1234"
            },
            "classification_types": [
                "receipt"
            ],

            // original and converted files
            "source_files": [
                {
                    "url": "https://api.robo-accounting.io/...",
                    "file_name": "filename.pdf",
                    "mime_type": "application/pdf"
                }
            ],
            "signed_pdf": {
                "url": "https://api.robo-accounting.io/...",
                "file_name": "signed_filename.pdf",
                "mime_type": "application/pdf"
            }
        },
        "relationships": {
            "classifications": {
                "data": {
                    "type": "classifications",
                    "id": "16724"
                }
            },
            "sender_address": {
                "data": {
                    "type": "sender_address",
                    "id": "6924"
                }
            }
        }
    },
    "included": [
        {
          "id": "6924",
          "type": "sender_address",
          "attributes": {
              "address_id": null,
              "type": "sender_address",

              // company address
              "company_name": "Tiefbauamt Stadt Thun",
              "contact_person_name": "",
              "street": "Industriestrasse ",
              "house_number": "2",
              "post_office_box": null,
              "postal_code": "3602",
              "city_name": "Thun",
              "country_code": "CH",

              // company and tax id for identification
              "company_id": null,
              "vat_id": null
          },
          "relationships": {
              "document": {
                  "meta": {
                      "included": false
                  }
              }
          }
      },
      {
          "id": "16724",
          "type": "receipts",
          "attributes": {
              "created_at": "2018-05-08T06:56:49.948Z",
              "updated_at": "2018-05-10T07:26:49.123Z",

              // document type
              "type": "receipts",
              "sub_type": null,

              // invoice meta data
              "invoice_date": "2018-02-21",
              "delivery_date": "2018-06-01",
              "number": "12 34 56",
              "order_number": null,
              "currency": "EUR",
              "including_tax": true,
              "additional_information": null,

              // line items
              "items": [
                  {
                      "title": "DSL Internet Verbindung",
                      "amount_total": 270,
                      "nominal_account": "491"
                  }
              ],

              // payment related information
              "payment_conditions": [
                  {
                      "date": "2018-03-07",
                      "type": "payment_condition",
                      "percentage": null,
                      "fixed_price": null,
                      "number_of_days": 14
                  }
              ],
              "bank_accounts": [
                  {
                      "bic": "BIC12345678",
                      "iban": "CH12 1234 1234 1234 1234"
                  }
              ],
              "discount_rate": null,
              "discount_total": null,
              "payment_method": null,
              "amount_total": 270
              "reference": null,

              // ocr text
              "text": null,
            },
            "relationships": {
                "document": {
                    "meta": {
                        "included": false
                    }
                }
            }
        }
    ],
    "meta": {},
    "jsonapi": {
        "version": "1.0"
    }
}