Add Vendor

Use this operation to add new Vendor object.

Parameters

Body Params
JSON:json
Vendor details needs to be passed as body parameter,it should be in JSON format.
XML:string
Vendor details needs to be passed as body parameter,it should be in XML format.
Path Params
yourCompany:The Company name need to passed in the base URL.For eg. if you enter xyzcompany name, the url https://{yourCompany}.agiliron.net/agiliron/api-40.php/Vendor will change to https://xyzcompany.agiliron.net/agiliron/api-40.php/Vendor
Header Params
Accept:string
Response header need to be passed for eg. application/json or application/xml.
Query Auth
key:string
API key needs to be passed in this variable.The option to enter API key will appear when you click on Try it button.This will be the first option in AUTHENTICATION block.Default is SET to 0.
Header Auth
apiKey:string
Dedicated API key needs to be passed in this variable via header.The option to enter API key will appear when you click on Try it button.This will be the second option in AUTHENTICATION block.Default is SET to 0.

Sample Code

{
	"Vendors": {
		"Vendor": [{
			"VendorName": "Test New Vendor",
			"AccountNumber": "659846",
			"ParentCompany": "Test New Vendor",
			"PrimaryContact": "Contact1",
			"OtherPhone": "56984663",
			"OtherEmail": "[email protected]",
			"Category": "Other",
			"Fax": "5689746",
			"Website": "www.abc.com",
			"Rating": "Good",
			"AssignedToUser": "admin",
			"Type": "Vendor",
			"TaxAuthority": "Indiana State",
			"CreditLimit": "1000.000",
			"CreditLimitExpires": "01-24-2020",
			"PriceBook": "Test New Vendor - Vendor",
			"DefaultCurrency": "USD",
			"Discount": "10",
			"PaymentMethod": "Cash",
			"TermsAndConditions": "",
			"Carrier": "Not Specified25",
			"ShippingMethod": "???",
			"DeliverTo": "OAK",
			"Street": "1515 Clay Street",
			"City": "Oakland",
			"Postcode": "94624",
			"State": "CA",
			"Country": "United States",
			"Telephone": "56412356",
			"Email": "[email protected]",
			"Description": "The Description Goes here.",
			"VendorCustomFields": {
				"CustomField": [
					{
						"Name": "CustomFied1",
						"Value": "Custom info 1"
					},
					{
						"Name": "CustomFied2",
						"Value": "Custom info 2"
					}
				]
			}
		}]
	}
}
<Vendors>
    <Vendor>
        <VendorName>Test New Vendor</VendorName>
        <AccountNumber>659846</AccountNumber>
        <ParentCompany>Test New Vendor</ParentCompany>
        <PrimaryContact>Contact1</PrimaryContact>
        <OtherPhone>56984663</OtherPhone>
        <OtherEmail>[email protected]</OtherEmail>
        <Category>Other</Category>
        <Fax>5689746</Fax>
        <Website>www.abc.com</Website>
        <Rating>Good</Rating>
        <AssignedToUser>admin</AssignedToUser>
        <Type>Vendor</Type>
        <TaxAuthority>Indiana State</TaxAuthority>
        <CreditLimit>1000.000</CreditLimit>
        <CreditLimitExpires>01-24-2020</CreditLimitExpires>
        <PriceBook>Test New Vendor - Vendor</PriceBook>
        <DefaultCurrency>USD</DefaultCurrency>
        <Discount>10</Discount>
        <PaymentMethod>Cash</PaymentMethod>
        <TermsAndConditions></TermsAndConditions>
        <Carrier>Not Specified25</Carrier>
        <ShippingMethod>???</ShippingMethod>
        <DeliverTo>OAK</DeliverTo>
        <Street>1515 Clay Street</Street>
        <City>Oakland</City>
        <Postcode>94624</Postcode>
        <State>CA</State>
        <Country>United States</Country>
        <Telephone>56412356</Telephone>
        <Email>[email protected]</Email>
        <Description>The Description Goes here.</Description>
        <VendorCustomFields>
            <CustomField>
                <Name>CustomFied1</Name>
                <Value>Custom info 1</Value>
            </CustomField>
            <CustomField>
                <Name>CustomFied2</Name>
                <Value>Custom info 2</Value>
            </CustomField>
        </VendorCustomFields>
    </Vendor>
</Vendors>

Sample Response

{
    "MCM": {
        "response": {
            "objectType": "Vendor",
            "syncTime": "2021-06-10 03:23:14"
        },
        "parameters": {
            "results": {
                "message": {
                    "status": "Success",
                    "success_message": {
                        "vendor_name": "Test New Vendor",
                        "vendor_id": "203060"
                    }
                }
            }
        }
    }
}
<MCM>
  <response>
    <objectType>Vendor</objectType>
    <syncTime>2021-06-10 03:23:14</syncTime>
  </response>
  <parameters>
    <results>
      <message>
        <status>Success</status>
        <success_message>
          <vendor_name>Test New Vendor</vendor_name>
          <vendor_id>203060</vendor_id>
        </success_message>
      </message>
    </results>
  </parameters>
</MCM>

WADL

<?xml version="1.0" encoding="utf-8"?>
<application>
   <resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
     <resource path="Vendor">
       <method name="POST">
         <request>
           <param name="key" type="xsd:string" style="query" required="true"/>
           <param name="VendorName" type="xsd:string" style="body" required="true"/>
           <param name="AccountNumber" type="xsd:int" style="body"/>
           <param name="ParentCompany" type="xsd:string" style="body"/>
           <param name="PrimaryContact" type="xsd:string" style="body"/>
           <param name="OtherPhone" type="xsd:string" style="body"/>
           <param name="OtherEmail" type="xsd:string" style="body"/>
           <param name="Category" type="xsd:string" style="body"/>
           <param name="Fax" type="xsd:string" style="body"/>
           <param name="Website" type="xsd:string" style="body"/>
           <param name="Rating" type="xsd:string" style="body"/>
           <param name="AssignedToUser" type="xsd:string" style="body"/>
           <param name="Type" type="xsd:string" style="body"/>
           <param name="TaxAuthority" type="xsd:string" style="body"/>
           <param name="CreditLimit" type="xsd:decimal" style="body"/>
           <param name="CreditLimitExpires" type="xsd:date" style="body"/>
           <param name="PriceBook" type="xsd:string" style="body"/>
           <param name="DefaultCurrency" type="xsd:string" style="body"/>
           <param name="Discount" type="xsd:decimal" style="body"/>
           <param name="PaymentMethod" type="xsd:string" style="body"/>
           <param name="TermsAndConditions" type="xsd:string" style="body"/>
           <param name="Carrier" type="xsd:string" style="body"/>
           <param name="ShippingMethod" type="xsd:string" style="body"/>
           <param name="DeliverTo" type="xsd:string" style="body"/>
           <param name="Street" type="xsd:string" style="body"/>
           <param name="City" type="xsd:string" style="body"/>
           <param name="Postcode" type="xsd:string" style="body"/>
           <param name="State" type="xsd:string" style="body"/>
           <param name="Country" type="xsd:string" style="body"/>
           <param name="Telephone" type="xsd:string" style="body"/>
           <param name="Email" type="xsd:string" style="body"/>
           <param name="Description" type="xsd:string" style="body"/>
         </request> 
         <response status="200"> 
            <representation mediaType="application/xml" element="yn:ResultSet"/> 
         </response> 
         <response status="400"> 
            <representation mediaType="application/xml" element="ya:Error"/> 
         </response> 
       </method> 
     </resource> 
   </resources>
 </application>