API to create the Material Request

Hi All,

I need the API to create the Material Request, as shown in the below screenshot. I also need the API of the inventory. If some one can share any API document or sample code then it will help me a lot.


1 Like

Hi Devendra. Sure, happy to help. So that I can give you some sample code specific to your database would you mind sending us a copy of it to support@avontus.com? We will be able to look at those parts and get the underlying ID’s if needed to show you how this is done.

Avontus Dev

Can I get the sample code without providing the database? I am wondering that sample code will be same across all the environment because this is the OOB functionality of the system.

Get the database might be hard because database belongs to my customer. If you want then I can try to get the version of the system.

Hi Devendra. Shouldn’t be an issue, we have a confidentiality agreement with our customers, the correct person will know if it if you need to check.

Avontus Dev

Ok, can you please let me know the steps that how/where to upload the database?

Hi Devendra.

Please upload the database in https://download.avontus.com/sendfile.html and mention “API Query 551” in the description.
Please let us know once the file is uploaded by emailing Avontus Support at support@avontus.com. We shall review and revert to you with the details.

Avontus Dev

Hi, Devendra.

Sorry for the long wait on this one, please find the code below to add a product

var prod = Product.NewProduct(ProductType.Product);
prod.PartNumber = "9FEE5";
prod.Description = "James Bond Spy Glass";
prod.Weight = 0.5;

Thanks for posting.

Hi, Devendra.

To add a Request -

var req = Request.NewRequest(Guid.Empty, true);
req.IsCompleted = false;
req.ParentJobSiteID = <StockingLocationID>;
req.Notes = <Notes>;
req.RequestDate = <RequestDate>;
req.DateNeeded = <DateNeeded>;
req.AssignedToUserID = <AssignedToUserID>;
req.StatusID = <StatusID>;

//Add products to Request
req.RequestProducts["<part-number>"].Quantity = <Quantity>;


Thanks for posting.

@AvontusDev, Hi Support,
I am the CFO of BKH who uses quantify and I am also the owner of the product.

Below is what I have gathered from above thread that took place between Devandra and AvontusDev

  • There is an API already there from Quantify if I want to prepare my request on another platform and push through the API is that correct?
  • similarly I can push return shipment through another platform ( e.g. Microsoft) , correct ?

Essentially, we wanted to develop our little own app to prepare shipments (inbound and outbound) using QR code and push the data back to quantify as a delivery or return/pre-return.

We like all the features with Quantify .e.g billing, scaffolding, warehousing , servicing etc. Just wanted to be bit modern and have material list ( inbound and outbound) in a mobile device with QR , reference photos, integrated with transport scheduling etc .

Would be great if I can have comfort in knowing that Quantify has enough API to integrate shipment (both way) data from another app.

Manjur CFO

Hello Manjur. Thank you for asking your question.

Everything you’re asking to do here (manage shipments, dates, material lists, photo attachments, etc.) is possible using our API. In fact, we use our own API to put the user interface on top of the product. We do this with both Quantify Web and Quantify Desktop using our API. You could think of the code as being the same as what you do in the product.

Example: To create a new shipment in the product you click a button. To do the same in C# you write this code:

Shipment ship = Shipment.NewShipment();

To fill out qantities in the shipment in the desktop application, you type the values in the products tab for a given part number. Similarly, in code, you fill out the quantities on the shipment.

ship.ShipmentProducts[partNumber].Quantity = 5;

Scanning with a QR code would be completed with an electronic device and that is another interface. As long as you can communicate with that interface using C #, you can put that interface on top of our API as well. The C# language (and then compiled binaries) is the commonality between the two.

In order to complete this in Quantify, your developer will need to be skilled in using C #, and be thoroughly trained and skilled using Quantify, as well as whatever QR code interface you will use.

Avontus Dev

Thanks very much. it was very encouraging .
We are thinking of using PowerApp by Microsoft. I am not sure how experienced you are or how much youve seen other people using Powerapp , but as far as I know we can place powerapp ontop of Quantify and push the shipment data from powerapp to quantify Web. We dont use quantify web, i think we better integrate with WEB APP instead of Quantify Server to have less latency. Also,
I think powerapp has C# .

Quick Start: Web API sample (C#) (Microsoft Dataverse) - Power Apps | Microsoft Docs

Hello again manjurbkh.

Since you already own Quantify Web I would recommend trying out the Request Portal. This feature allows your internal users and your customers to request materials remotely, via the web (mobile web browsers included). We built this to be a very simple way fill out a bill of materials and it supports filtering really well so that you can drill down on exactly what you need. I would suggest that you get familiar with this product/feature first and see if/how it will fit into your workflow as you will save a significant amount of development costs.

PowerApp will not work with Quantify Web directly (since it’s a web page) but you can trap an event using C# (Azure Function) and communicate directly with the API that way. A developer that is familiar with webhooks and azure functions this should work very well. Since we’re a distributed application this will work, but you always want to communicated directly with the API using C#. You may want to find a developer that is intimately familiar with these Microsoft technologies.

Avontus Dev