Developer documentation

Sales invoice - Add a customer to the invoice

The one of the primary element of any sales invoice is a customer. Here in this section we will look at how you can add a customer to the invoice while creating/updating the one. Below request would help you to understand and create your invoice payload object such that which satisfy this need of one of the primary element. You can use any of existing customers which you already created. As of course, by now you already know how to create a customer!

Request Info

Production base URL   https://apps.reeleezee.nl/api/v1
Operation : PUT
Content type : application/json
Request   https://apps.reeleezee.nl/api/v1/{adminid}/salesinvoices/{id}
URI Parameter : {adminid} is the GUID for an admin you subscribed. {id} globally unique identifier.

In Reeleezee API, we consider any Customer, Vendor or an Employee as an ‘Entity’. Hence, to add a customer we need to include ‘Entity’ in our payload object as described below. In Postman (or any tool of your choice) along with setting appropriate headers and forming the request as suggested above, you need to add ‘Entity’ object parameter as mentioned in below Request body.

Request Body

{
	"id": "f200868c-5000-41ea-8fe3-08563887f19b",
	"AccruedQuantity": 7,	
	"Date": "2017-04-121T00:00:00",
	"Header": "Subject: Sales invoice to H n L Company on purchase of flash drives",
	"Footer": "Please pay within days before ",
	"Status": 1,	
	"DueDate": "2017-04-17T00:00:00",
	"Entity":
  	{
  		"id": "62e15dc6-e4c1-4258-b9e2-aaaefc231700",
	  	"Name": "Calbri BV",
		"SearchName": "Calbri BV",
	}
} 

Request Return

{
	"id": "f200868c-5000-41ea-8fe3-08563887f19b",
	"IsArchived": false,
  	"IsFixedAmount": false,
  	"IsVatIncluded": false,
 	"AccruedQuantity": 7,
  	"ExchangeRate": 1,
  	"BaseInvoiceAmount": 0,
  	"BasePaidAmount": 0,
	"BaseRemainingAmount": 0,
  	"CalculatedDiscountAmount": 0,
  	"TotalLineAmountWithoutDiscount": 0,
  	"TotalNetAmount": 0,
  	"TotalPaidAmount": 0,
  	"TotalPayableAmount": 0,
  	"TotalTaxAmount": 0,
  	"UnspecifiedAmount": 0,
  	"BookDate": "2017-04-12T00:00:00",
  	"Date": "2017-04-12T00:00:00",
  	"Bottom": null,
  	"DiscountComment": null,
  	"CompanyInformation": null,
  	"Header": "Subject: Sales invoice to H n L Company on purchase of flash drives",
  	"Footer": "Please pay within days before ",
  	"PaymentReference": null,
  	"ReceiptNumber": "5",
  	"Reference": "5",
  	"Token": "HiGmW8t1GX-7zSaMj5tJ1pBkx29TZg",
  	"Status": 1,
  	"DocumentType": 10,
  	"Origin": 2,
  	"Type": 1,
  	"TaxPurposeType": null,
  	"DueDate": "2017-04-17T00:00:00",
  	"DiscountAmount": null,
  	"DiscountPercentage": 0.02,
  	"InvoiceNumber": 5,
  	"OverdueDays": null,
	"PaymentMethod": {
       "$ref": 3
      	},
	"Currency": {
       "$ref": 4
      	},
      	"Language": {
       "$ref": 5
      	},
      	"UploadList": null,
      	"Entity": {
       	"$ref": 15
	}
}
NL Select your country