Developer documentation

Create a product

Creating new product and updating existing product is easy using Reeleezee API framework. This section will help you to create your first product and later update the same with ease. We have taken care that insert/update operations are swift, secure and simple.

Get going to create/add your product:
To get it going, make sure you’ve already added required headers in your postman as suggested in topic Request Headers.

Request Info

Production base URL : https://apps.reeleezee.nl
Operation : PUT api/v1/<adminId>products/<productId>
Content type : application/json

The calling url for consumer is like GET request as explained in the first call sample. An additional information to provide at the time of request is Administration GUID in following format.

PUT {adminId}/Products/{id}

Value of {adminId} can be obtained by GET Administrations

Typical request call for getting Administration Id from Reeleezee API – GET would look like below example:

GET /api/v1/Administrations
Host: preview.reeleezee.nl
Authorization: Basic cmV2aWV3bmxwaXl1c2g6MTIzNGFiY2Q=
Cache-Control: no-cache

The response of call to get administration id would like example below:

{
  "value": [
    {
      "id": "b9814bac-a58f-4c51-b6a8-c9f0b1c5febd",
      "Name": "(P)review computers ABSOLIT BV12345"
    }
  ]
}

The obtained administration ID “id” will be formatted as given in below screenshot.

PUT https://preview.reeleezee.nl/api/v1/
b9814bac-a58f-4c51-b6a8-c9f0b1c5febd/
products/ac9de3c2-9c16-4230-817f-65800910fce7

The web api client consumer must generate a new GUID for inserting new product as shown in below sample.

PUT https://preview.reeleezee.nl/api/v1/b9814bac-a58f-4c51-b6a8-c9f0b1c5febd/products/
8c716a7b-70f3-4d81-9af0-bd53adfc5d99

Along with Request URL, client can pass body parameters to create product with specified attributes. A sample of those attributes to be passed with the call is given below:

Request Body

{
  "IsArchived": false,
  "IsBillable": true,
  "IsStockEnabled": false,
  "BarCode": null,
  "Code": "5345",
  "Comment": "API generated new product - update",
  "Description": "Metal case",
  "SearchName": null,
  "CostPrice": "10",
  "Price": "20",
  "PurchasePrice": "10.50",
  "RetailPrice": "50"
}

Response Return

{
  "id": "8c716a7b-70f3-4d81-9af0-bd53adfc5d99",
  "AskPrice": false,
  "AskUnitOfMeasurement": false,
  "IsArchived": false,
  "IsBillable": true,
  "IsEventix": false,
  "IsStockEnabled": false,
  "BarCode": null,
  "Code": "5345",
  "Comment": "API generated new product - update",
  "Description": "Metal case",
  "SearchName": null,
  "ProductKind": 1,
  "RecordStatus": 2,
  "CostPrice": 10,
  "FixedTransferPrice": null,
  "LiquidationValue": null,
  "Price": 20,
  "PurchasePrice": 10.5,
  "RetailPrice": 50,
  "RetailPrice2": null,
  "RetailPrice3": null,
  "ProductSoldQuantity": null,
  "Stock": null
}

If the passed GUID is a unique for existing records, it will insert a new product record in database and return the Response with Request data and newly created product GUID.

If the passed GUID is present in existing records, it will update the product with passed GUID. The values will be updated by Request data.

 

NL Select your country