Method PostNonSystemVendorInfo

Summary

Search for Non System Vendor Information

Input Parameters

NameTypeLengthDescription
vendorNumber numeric 10 [Required] Vendor number
retrieveCode System.String 1 Retrieve Code I=Find

Example

POST http://localhost/FusionServices/v3/Naviline/ProductInventory/NonSystemVendorInfo

Return Values

NameDescription
ErrorCode 0000=Success
ErrorMessage Error message describing any error that occurred
CompanyNumber Company Number
NonSystemVendorNumber 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/NonSystemVendorInfo";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("vendorNumber",System.Web.HttpUtility.UrlEncode("9990000100"));

   WebClient req = new WebClient();
   wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
   wc.Headers.Set("X-APPID", "YOURID");
   wc.Headers.Set("X-APPKEY", "YOURKEY");

   byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
   string stringResult = Encoding.UTF8.GetString(responseBytes); 
   JObject response = JObject.Parse(stringResult);
   string error = response["OutputParms"]["ErrorCode"].ToString();
   if (error == "0000")
   {
         // TODO - YOUR CODE HERE
   }
}

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 PostNonSystemVendorInfo
   {
       // 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;}

       [RegularExpression("^(?=.{0,1}$).*", ErrorMessage = "Must be 1 characters or less. ")]
       public string retrieveCode{get; set;}

       public PostNonSystemVendorInfo()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostNonSystemVendorInfo 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.PostNonSystemVendorInfo

@{
   ViewBag.Title = "PostNonSystemVendorInfo";
}

<h2>PostNonSystemVendorInfo</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostNonSystemVendorInfo</legend>
       <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>
       <div class="editor-label">
           @Html.LabelFor(model => model.retrieveCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.retrieveCode)
           @Html.ValidationMessageFor(model => model.retrieveCode)
       </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/PostNonSystemVendorInfo
public ActionResult PostNonSystemVendorInfo()
{
   // Create a new instance of the model to pick up any default values.
   PostNonSystemVendorInfo model =  new PostNonSystemVendorInfo();

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

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

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

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