Home

Format: Fortnox Invoice

{

  "bookedInvoiceIndicator": "FN:Booked",

  "cancelledInvoiceIndicator": "FN:Cancelled",

  "creditInvoiceIndicator": "FN:Credit",

  "financialDimensions": [
    {
      "id": "FN:Project",
      "financialDimensionId": "FN:Project",
      "type": "project"
    },
    {
      "id": "FN:CostCenter",
      "financialDimensionId": "FN:CostCenter",
      "type": "costCode"
    }
  ],

  "id": "FN:DocumentNumber",

  "invoiceId": "FN:DocumentNumber", // Invoice number. An identifier for this document, assigned by the sender.

  "issueDate": "FN:InvoiceDate",

  "dueDate": "FN:DueDate", // The date on which Invoice is due.

  "note": [
    {
      "text": "FN:Remarks", // Fakturatext nere i vänstra hörnet. Free-form text pertinent to this document, conveying information that is not contained explicitly in other structures.
      "languageId": null
    }
  ],

  "buyerReference": "FN:YourReference", // A reference provided by the buyer used for internal routing of the document.

  "orderReference": {
    "buyerOrderId": "FN:YourOrderNumber", // An identifier for this order reference, assigned by the buyer.
    "sellerOrderId": "FN:OrderReference" // An identifier for this order reference, assigned by the seller.
  },

  "documentCurrencyCode": "FN:Currency", // A code signifying the default currency for this document.

  "accountingCustomerParty": {

    "supplierAssignedAccountId": {
      "id": "FN:CustomerNumber", // An identifier for the customer's account, assigned by the supplier.
      "schemeId": null // The identification of the identification scheme.
    },

    "party": {

      "partyIdentification ": {
        "id": "FN:OrganisationNumber",
        "schemeId": "SE:ORGNR"
      },

      "partyName": { // A name for this party.
        "name": "FN:CustomerName", // The name of the party.
        "languageId": "" // The identifier of the language used in the content component.
      },

      "postalAddress": {
        "buildingNumber": null,
        "streetName": "FN:Address1",
        "additionalStreetName": "FN:Address2",
        "cityName": "FN:City",
        "postalZone": "FN:ZipCode",
        "country": {
          "identificationCode": null,
          "name": "FN:Country"
        }
      },

      "partyLegalEntity": {
        "registrationName": "FN:CustomerName",
        "companyId": {
          "id": "FN:OrganisationNumber",
          "schemeId": "SE:ORGNR"
        }
      }

    }
  },

  "invoicePeriod": {
    "startDate": "FN:InvoicePeriodStart",
    "endDate": "FN:InvoicePeriodEnd"
  },

  "accountingSupplierParty": { // !!! dont implement this object

    "party": {

      "partyIdentification ": {
        "id": null,
        "schemeId": null
      },

      "partyName": { // A name for this party.
        "name": null, // The name of the party.
        "languageId": null // The identifier of the language used in the content component.
      },

      "postalAddress": {
        "buildingNumber": null,
        "streetName": null,
        "additionalStreetName": null,
        "cityName": null,
        "postalZone": null,
        "country": {
          "identificationCode": null,
          "name": null
        }
      },

      "partyLegalEntity": {
        "registrationName": null,
        "companyId": {
          "id": null,
          "schemeId": null
        }
      }

    }
  },

  "delivery": {

    "deliveryParty": {
      "partyName": {
        "name": "FN:DeliveryName", // The party to whom the goods are delivered.
        "languageId": null
      }
    },

    "carrierParty": {
      "partyName": {
        "name": "FN:WayOfDelivery", // The party responsible for delivering the goods.
        "languageId": null
      }
    },

    "actualDeliveryDate": "FN:DeliveryDate", // The actual date of delivery.

    "deliveryAddress": { // The delivery address.
      "buildingNumber": null,
      "streetName": "FN:DeliveryAddress1",
      "additionalStreetName": "FN:DeliveryAddress2",
      "cityName": "FN:DeliveryCity",
      "postalZone": "FN:DeliveryZipCode",
      "country": {
        "identificationCode": null,
        "name": "FN:DeliveryCountry"
      }
    }

  },

  "deliveryTerms": {
    "deliveryTermsId": {
      "id": null,
      "schemeId": null
    },
    "specialTerms": {
      "text": "FN:TermsOfDelivery",
      "languageId": null
    }
  },

  "paymentTerms": {
    "paymentTermsId": {
      "id": "FN:TermsOfPayment",
      "schemeId": null
    }
  },

  "paymentMeans": [

    // BG/PG/IBAN
    {
      "paymentChannelCode": "FN:PaymentWay",
      "paymentDueDate": "FN:DueDate",
      "paymentId": [
        {
          "id": "FN:OCR",
          "schemeId": "OCR"
        },
        {
          "id": "FN:DocumentNumber",
          "schemeId": "invoiceId"
        }
      ]
    }

  ],

  "allowanceCharges": [
    {
      "allowanceChargeId": {
        "id": null,
        "schemeId": null
      },
      "chargeIndicator": true,
      "multiplierFactorNumeric": null,
      "allowanceChargeReason": "AdministrationFee", // "property name" where we get the value for "amount" below e.g. "AdministrationFee"
      "allowanceChargeAmount": { // NULL if FN:AdministrationFee == NULL
        "amount": "FN:AdministrationFee", // e.g. "123.23"
        "currencyId": "FN:Currency"
      },
      "allowanceChargeBaseAmount": null,
      "taxTotal": { // NULL if FN:AdministrationFeeVAT == NULL
        "taxAmount": {
          "amount": "AdministrationFeeVAT",
          "currencyId": "FN:Currency"
        },
        "taxIncludedIndicator": null
      }
    },
    {
      "allowanceChargeId": {
        "id": null,
        "schemeId": null
      },
      "chargeIndicator": true,
      "multiplierFactorNumeric": null,
      "allowanceChargeReason": "Freight", // "property name" where we get the value for "amount" below e.g. "Freight"
      "allowanceChargeAmount": { // NULL if FN:Freight == NULL
        "amount": "FN:Freight",
        "currencyId": "FN:Currency"
      },
      "allowanceChargeBaseAmount": null,
      "taxTotal": { // NULL if FN:FreightVAT == NULL
        "taxAmount": {
          "amount": "FN:FreightVAT",
          "currencyId": "FN:Currency"
        },
        "taxIncludedIndicator": null
      }
    }
  ],

  "taxTotal": [ // The total amount of a specific type of tax.
    {
      "taxAmount": { // NULL if FN:TotalVAT == NULL
        "amount": "FN:TotalVAT",
        "currencyId": "FN:Currency"
      },
      "taxIncludedIndicator": "FN:VATIncluded" // An indicator that tax is included in the calculation (true) or not (false).
    }
  ],

  "legalMonetaryTotal": {
    "taxInclusiveAmount": { // NULL if FN:TotalToPay == NULL
      "amount": "FN:TotalToPay",
      "currencyId": "FN:Currency"
    },
    "payableRoundingAmount": { // NULL if FN:RoundOff == NULL
      "amount": "FN:RoundOff",
      "currencyId": "FN:Currency"
    },
    "payableAmount": { // The amount of the monetary total to be paid. NULL if FN:Balance == NULL
      "amount": "FN:Balance",
      "currencyId": "FN:Currency"
    }
  },

  "invoiceLine": [
    {

      "financialDimensions": [
        {
          "id": "FN:InvoiceRows.Project",
          "financialDimensionId": "FN:InvoiceRows.Project",
          "type": "project"
        },
        {
          "id": "FN:InvoiceRows.CostCenter",
          "financialDimensionId": "FN:Voucher.CostCenter",
          "type": "costCode"
        }
      ],

      "id": "FN:InvoiceRows.RowId", // An identifier for this invoice line.

      "invoicedQuantity": {
        "quantity": "FN:InvoiceRows.DeliveredQuantity",
        "unitCode": "FN:InvoiceRows.Unit"
      },

      "lineExtensionAmount": { // The total amount for this invoice line, including allowance charges but net of taxes. NULL if FN:TotalExcludingVAT == NULL
        "amount": "FN:InvoiceRows.TotalExcludingVAT",
        "currencyId": "FN:Currency"
      },

      "allowanceCharges": [
        {
          "allowanceChargeId": null,
          "chargeIndicator": false,
          "multiplierFactorNumeric": "FN:InvoiceRows.Discount", // IF "DiscountType" = "PERCENT" else null
          "allowanceChargeReason": null,
          "allowanceChargeAmount": { // NULL if FN:InvoiceRows.Discount == NULL
            "amount": "FN:InvoiceRows.Discount", // IF "DiscountType" = "AMOUNT" else null
            "currencyId": "FN:Currency" // IF "DiscountType" = "AMOUNT" else null
          },
          "allowanceChargeBaseAmount": {
            "amount": "FN:InvoiceRows.Price",
            "currencyId": "FN:Currency"
          },
          "taxTotal": null
        }
      ],

      "item": {

        "name": "FN:InvoiceRows.Description",

        "description": "FN:InvoiceRows.Description", // Text describing this item.

        "sellersItemIdentification": {
          "id": "FN:InvoiceRows.ArticleNumber",
          "extendedId": null, // An extended identifier for the item that identifies the item with specific properties, e.g., Item 123 = Chair / Item 123 Ext 45 = brown chair. Two chairs can have the same item number, but one is brown. The other is white.
          "barcodeSymbologyId": null
        },

        "classifiedTaxCategory": [ // A tax category applicable to this item.
          {
            "percent": "FN:InvoiceRows.VAT",
            "taxScheme": {
              "taxSchemeId": {
                "id": "VAT", // An identifier for this taxation scheme.
                "schemeId": "SE:VAT"
              }
            }
          }
        ]

      },

      "price": {

        "priceAmount": {
          "amount": "FN:InvoiceRows.Price",
          "currencyId": "FN:Currency" // https://docs.zwapgrid.com/docs/code-lists#currencyid
        },

        "priceTypeCode": {
          "code": "ABE", // https://service.unece.org/trade/untdid/d00a/tred/tred5387.htm
          "listId": "5387"
        }

      }
    }
  ]
}