Method GetVendorInfo

Summary

Get Vendor Information

Remarks

This retrieves vendor information by vendor number.

Input Parameters

NameTypeLengthDescription
vendorNumber numeric 10 [Required] Vendor number

Example

GET http://localhost/FusionServices/v3/Naviline/ProductInventory/GetVendorInfo/{vendorNumber}

Return Values

NameDescription
ErrorCode 0000=Success
ErrorMessage Error message describing any error that occurred
CompanyNumber Company Number
NonSystemVendorNumber Vendor number. This can be a system or non-system vendor number
Name Company name
AddressLine1 Vendor's address line 1. This is the address for Purchase Orders
AddressLine2 Vendor's address line 2
AddressLine3 Vendor's address line 3
City Vendor City
State Vendor State
ZipCode Vendor ZipCode
AreaCode Vendor's phone area code
PhoneNumber Vendor PhoneNumber
FaxNumber Vendor Fax Number
ContactName Vendor Contact Person
VendorYear Vendor's Date of birth (year)
VendorMonth Vendor's Date of birth (month)
VendorDay Vendor's Date of birth (day)
VendorAddressLine1 Vendor's address line 1. This is the address for Bid Information
VendorAddressLine2 Vendor's address line 2
VendorAddressLine3 Vendor's address line 3
VendorCity Vendor City
BDST Vendor State
VendorZipCode Vendor ZipCode
VendorAreaCode Vendor's phone area code
BDPH Vendor PhoneNumber
VendorFaxNumber Vendor Fax Number
RemitAddressLine1 Vendor's mail address line 1. This is the address for Change Remittance
RemitAddressLine2 Vendor's mail address line 2
RemitAddressLine3 Vendor's mail address line 3
RemitCIty Vendor City
RemitState Vendor State
RemitZipCode Vendor ZipCode
TermsDiscountPercent Discount percent for vendor. 2 digit decimal. I.e. 01000 = 10.00
TermsNumDaysDiscDue Number of days discount is available
TermsNumDaysNetDue Number of days net amount is due
ShipVia Shipping instructions
FreeOnBoard Free on board designation. Normally FOB origin or FOB destination
MinorityStatusCode Minority status code. N=None, H=Hispanic
CreditLimit Credit limit for vendor purchases. No decimals
MinimumPurchaseAmount Minimum purchase amount. No decimals
TermsDayofMonthDue Day of month due
VendorTaxID Vendor's Federal Tax ID or SSN number for an individual
TaxIDType T=VendorTaxID is Federal Tax ID S=VendorTaxID is SSN number for an individual
TaxIDSuffix
NumberOfEmployees Number of employees
CERCInfo
OrderEmail Vendor's email
BidEmail Vendor's email for Bid Information
FreeForm1 Free form field 1
FreeForm2 Free form field 2
BusOrIndividual B=Business, I=Individual
1099S? 1099 received. Y=Yes, N=No

Sample Responses

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms)
{
    string uri = "http://localhost/FusionServices/v3/Naviline/ProductInventory/GetVendorInfo/1056";
    WebClient wc = new WebClient();
    wc.Headers.Set("X-APPID", "YOURID");
    wc.Headers.Set("X-APPKEY", "YOURKEY");
    string stringResult = wc.DownloadString(new Uri(uri));
    
    JObject response = JObject.Parse(stringResult);
    string error = response["OutputParms"]["ErrorCode"].ToString();
    if (error == "0000")
    {
         // TODO - YOUR CODE HERE
    }
}

$.get('http://localhost/FusionServices/v3/Naviline/ProductInventory/GetVendorInfo/1056', function(response) {
    $('#resultDiv).html(response); 
 });

C# Razor MVC Sample Code

using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;

// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
   public class GetVendorInfo
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       [RegularExpression("[0-9]{0,10}", ErrorMessage = "Numeric values only. Must be 10 digits or less. ")]
       public string vendorNumber{get; set;}

       public GetVendorInfo()
       {
           //Set any defaults here
           vendorNumber = DefaultData.Get("vendorNumber");
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetVendorInfo class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top.  Replace the rest with the lines below.
@model FusionRazor.Models.GetVendorInfo

@{
   ViewBag.Title = "GetVendorInfo";
   string myUrl = "http://localhost/FusionServices/v3/Naviline/ProductInventory/GetVendorInfo/" + Model.vendorNumber;
}

<h2>GetVendorInfo</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>GetVendorInfo</legend>
       <div class="editor-label">Use the fields below to change the values and resubmit.</div>
       <div class="editor-label">
           @Html.LabelFor(model => model.vendorNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.vendorNumber)
           @Html.ValidationMessageFor(model => model.vendorNumber)
       </div>
       <p>
       <input type="submit" value="Submit"/>
       </p>
   </fieldset>

}

@section Scripts {
   @Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;

// NOTE: Replace 'MyController' with the name of your controller.

// 
// GET: /MyController/GetVendorInfo
public ActionResult GetVendorInfo()
{
   // Create a new instance of the model to pick up any default values.
   GetVendorInfo model =  new GetVendorInfo();

   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/GetVendorInfo.cshtml", model);
}

// 
// POST: /MyController/GetVendorInfo
[HttpPost]
public ActionResult GetVendorInfo(FormCollection collection)
{
   string url = "v3/Naviline/ProductInventory/GetVendorInfo/{vendorNumber}";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("vendorNumber", collection["vendorNumber"]);

   try
   {
       // Send the request
       FusionServiceRequest request = new FusionServiceRequest();
       FusionServiceResult result = request.Get(url, inputParms);

       return View("Result", result);
   }
   catch(Exception e)
   {
       HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "GetVendorInfo");
       return View("Error", info);
   }
}