Add Product Vendor Pricebook

Use this operation to add an existing Product object to a Vendor Pricebook.

Parameters

Body Params
JSON:json
Product Vendor Pricebook details needs to be passed as body parameter,it should be in JSON format.
XML:string
Product Vendor Pricebook details needs to be passed as body parameter,it should be in XML format.
Path Params
yourCompany:string
The Company name need to passed in this variable.For eg. if you enter xyzcompany name, the url https://{yourCompany}.agiliron.net/agiliron/api-40.php/ProductsVendorPricebook will change to https://xyzcompany.agiliron.net/agiliron/api-40.php/ProductsVendorPricebook
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

{
	"ProductVendorPricebooks": {
		"ProductVendorPricebook": [{
				"ProductCode": "TP28feb",
				"VendorId": "152627",
				"Vendor": "Test New vendor 27aug1",
				"VendorNumber": "TESTNO9",
				"VendorPrice": "45.00",
				"PreferredOrderQty": "46",
				"OrderUnits": "each",
				"InventoryQty": "32",
				"Preferred": "No"
			},
			{
				"ProductCode": "TP28feb",
				"VendorId": "152628",
				"Vendor": "Test New vendor 27aug4",
				"VendorNumber": "TESTNO19",
				"VendorPrice": "46.00",
				"PreferredOrderQty": "47",
				"OrderUnits": "each",
				"InventoryQty": "33",
				"Preferred": "Yes"
			}
		]
	}
}
<ProductVendorPricebooks>
  <ProductVendorPricebook>
    <ProductCode>TP28feb</ProductCode>
    <VendorId>152627</VendorId>
    <Vendor>Test New vendor 27aug1</Vendor>
    <VendorNumber>55</VendorNumber>
    <VendorPrice>10</VendorPrice>
    <PreferredOrderQty>9</PreferredOrderQty>
    <OrderUnits>each</OrderUnits>
    <InventoryQty>2</InventoryQty>
    <Preferred>Yes</Preferred>
  </ProductVendorPricebook>
  <ProductVendorPricebook>
    <ProductCode>TP28feb</ProductCode>
    <VendorId>152628</VendorId>
    <Vendor>Test New vendor 27aug5</Vendor>
    <VendorNumber>56</VendorNumber>
    <VendorPrice>10</VendorPrice>
    <PreferredOrderQty>10</PreferredOrderQty>
    <OrderUnits>each</OrderUnits>
    <InventoryQty>3</InventoryQty>
    <Preferred>No</Preferred>
  </ProductVendorPricebook>
</ProductVendorPricebooks>

Sample Response

{
    "MCM": {
        "response": {
            "objectType": "Vendor",
            "syncTime": "2021-06-10 03:23:14"
        },
        "parameters": {
            "results": {
                "message": {
                    "status": "Success",
                    "success_message": {
                       "vendor_pricebook_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_pricebook_id>203060</vendor_pricebook_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="ProductsVendorPricebook">
       <method name="POST">
         <request>
           <param name="key" type="xsd:string" style="query" required="true"/>
           <param name="ProductCode" type="xsd:string" style="body" required="true"/>
           <param name="Vendor" type="xsd:string" style="body" required="true"/>
           <param name="VendorNumber" type="xsd:string" style="body"/>
           <param name="VendorPrice" type="xsd:decimal" style="body" required="true"/>
           <param name="PreferredOrderQty" type="xsd:int" style="body"/>
           <param name="OrderUnits" type="xsd:int" style="body"/>
           <param name="InventoryQty" type="xsd:int" style="body"/>
           <param name="Preferred" 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>

© Copyright 2022 Agiliron - All Rights Reserved.