Order

The Order Endpoints

These endpoints allow you to Create, Get or Patch (Update) orders.
More and extra info about the order object can be found below.

Orders

With our API you can create Invoices, Creditnotes, Offers, .... Just take a look at our different endpoints below.

When creating an invoice these are some minimal required fields that you have to provide the API.

FieldValueDefinition
OrderTypeTypesThis to define the type invoice
OrderDirectionTypesThis to define the direction of the invoice
OrderDateDateTimeDate of the invoice
ExpiryDateDateTimeDate when the invoice expiries
Orderlines--Orderlines--The lines with items on the invoice
CustomerID / Customer objectINT / Customer objectThis to know who you are sending the invoice too or who its from

You can see we did do not expect you to provide your own data since we already have this in our system.

Below you can find the "application/json" version of the table above.

{
 "OrderType": "Invoice",
 "OrderDirection": "Income",
 "OrderDate": "2022-01-01",
 "ExpiryDate": "2022-01-31",
 "OrderLines": [
 	{
 		"ProductID": {{productID}}
 	}
 ],
 "CustomerID": {{customerID}}
}

Or without using IDs.

{
 "OrderType": "Invoice",
 "OrderDirection": "Income",
 "OrderDate": "2022-01-01",
 "ExpiryDate": "2022-01-31",
 "OrderLines": [
  {
   "Quantity": 1,
   "UnitPriceExcl": 100.0,
   "Description": "my order line",
   "VATPercentage": 21.0
   }
 ],
 "Customer": {
   "Name": "Billit",
   "VATNumber": "BE0563846944",
   "PartyType": "Customer",
   }
}
{
  "OrderPDF": {
    "FileName": "Invoice-200.pdf",
    "FileContent": "BASE64STRING"
  },
  "OrderNumber": "Invoice-200",
  "Customer": {
    "Nr": "Cus-001",
    "Name": "Billit Bird",
    "Street": "Piazza del Miracolli",
    "Zipcode": "56126",
    "City": "Pisa PI",
    "CountryCode": "IT",
    "VATNumber": "IT01394200362",
    "PartyType": "Customer",
    "Identifiers": [
      { "IdentifierType": "SDICODFIS", "Identifier": "" },
      { "IdentifierType": "SDICODDEST", "Identifier": "3PRL4IK" },
      { "IdentifierType": "SDIPEC", "Identifier": "" }
    ]
  },
  "OrderDate": "2023-01-01T00:00:00",
  "ExpiryDate": "2023-02-01T00:00:00",
  "OrderType": "Invoice",
  "OrderDirection": "Income",
  "OrderLines": [
    {
      "Quantity": 1.0,
      "UnitPriceExcl": 0.45,
      "Description": "API License",
      "VATPercentage": 22.0,
    }
  ],
  "Paid": true/false,
  "Currency": "EUR"
}

Customer/Supplier object

  • When creating an order or retrieving it some of these objects are available.
    Below you can see which have to be in the Order object for each Order direction(Types). Billit will take the company information for the Direction used and set it automatically.
Order DirectionParty Object
IncomeCustomer
CostSupplier

There are 2 options on how to add these objects.

Using the PartyID

  • The PartyID is a unique ID, you can retrieve this ID in multiple ways.
    More info on how to find PartyID Where can I find my CompanyID or a PartyID

  • You can also provide the IDs like the example below, you will have to check which one you need from the table above.

{
  "CustomerID": 0,
  "SupplierID": 0,
 //Other Order data...
}

Using the party object

  • The party object is same one used when using the Party Endpoint. You can find more info here on how to create an party object here Parties.

  • You can use the created object as the following code below describes.
    "Customer" can also be "Supplier" here

{
  //Other order data...
  "Customer": {
    "Nr": "string",
    "Name": "string",
    "CommercialName": "string",
  	//Other party data...
 }
}

Order PDF/Attachment
The order object contains the OrderPDF object. You can see the usage and structure of that Object below

"OrderPDF": {
    "FileID": "00000000-0000-0000-0000-000000000000",
    "FileName": "string",
    "MimeType": "string",
    "FileContent": "string"
  }
Property NameProperty ValueRequired
FileIDStringNo, Ignore in POST
FileNameStringYes
MimeTypeStringNo, if type is in filename
FileContentFileBase64 StringYes

The order object also contains a similar object "Attachments" the usage is the same. This can contain extra files that have to be added to the particular Invoice



Full API Request JSON Example

EndpointMethodResponse
/v1/ordersPostINT (Unique OrderID)

{
 "OrderType": "Invoice",
 "OrderDirection": "Income",
 "OrderNumber": "QS-001",
 "OrderDate": "2024-01-01",
 "ExpiryDate": "2024-01-31",
  "Customer": {
   "Name": "Billit",
   "VATNumber": "BE0563846944",
   "PartyType": "Customer",
   "Identifiers": [
        {
        "IdentifierType": "GLN",
        "Identifier": "5430003732007"
        }
    ],
   "Addresses": [
        {
        "AddressType": "InvoiceAddress",
        "Name": "Billit",
        "Street": "Oktrooiplein",
        "StreetNumber": "1",
        "City": "Ghent",
        "Box": "301",
        "CountryCode": "BE"
        },
        {
        "AddressType": "DeliveryAddress", //The delivery address, if not provided will be automatically the same as invoice address
        "Name": "Billit",
        "Street": "Oktrooiplein",
        "StreetNumber": "1",
        "City": "Ghent",
        "Box": "301",
        "CountryCode": "BE"
        }
   ]
   },
 "OrderLines": [
  {
   "Quantity": 1,
   "UnitPriceExcl": 10.0,
   "Description": "Box of cookies",
   "VATPercentage": 6
   },
    {
   "Quantity": 2,
   "UnitPriceExcl": 3.75,
   "Description": "Sticks",
   "VATPercentage": 21
   }
 ]
}