New API Call for Multiple Inbound Lines

API Resources

Here is what we are going to do:

  1. Check for new faxes using a new api call: Fax_GetProductsWithInboundFaxes
  2. Get a collection of inbound faxes for us to process.

Here is what you need:

  1. We will assume you are using a relatively modern development framework. PHP, React, .Net, etc…
  2. We recommend you use a tool like Postman (Free and available on all platforms) to test your API’s and generate the code or you can run in a sandbox at SwaggerHub.
  3. Developer API Account Easy to sign up and get started immediately.
  4. If you haven’t implemented the API before you may want to check out our quickstart how-to articles Article #1 and Article #2.

What is this useful for:

This is useful if you have multiple inbound fax lines and you need to check them for new inbound faxes. Just calling this one procedure will alert you to new inbound faxes and you can then go and retrieve the metadata about the new faxes. If nothing is new you don’t have to make a call for each productID which saves server time and resources.

Phase 1: Let’s check our Fax number for new faxes.

In this case I have sent myself a test fax before I run this proc.

I am going to fire up SwaggerHub and use the Tryout function to call the procedure and get data back.

The procedure is called Fax_GetProductsWithInboundFaxes. You can see it’s spec here.

API Call
  1. We’ll be asked to enter the Username and Password for our WestFax API Call. Notice we are not specifying a prodid as this procedure works across all fax lines and will return a collection of fax lines if the filter field matches.
  2. Let’s talk about the filter field. If you leave it blank it will assume Unread flag. You can set it to None, Received & Removed. None orwill show you Fax numbers that have unread faxes. Received will show you fax lines that have read faxes and removed will show you faxes that have deleted faxes. These are unlikely use-cases but here nevertheless.
  3. So here is the call

    api call
  4. When I execute it I get back:

    api call
  5. You can see that it returns a ID record as well as the InboundNumber so you can now go call the Fax_GetFaxDescriptions or Fax_GetInboundFaxDescriptions. Set your FaxDirection as Inbound and you can now update your app with the new incoming faxes.

Success! As you can see it’s not hard at all to add Faxing to your Enterprise application. If you have questions or need more help please reach out to us at 800-473-6208 or contact us via email.