Add Product Vendor Pricebook
Use this operation to add an existing Product object to a Vendor Pricebook.
Parameters
| Body Params | |
|---|---|
| JSON: | json | 
| XML: | string | 
| Path Params | |
|---|---|
| yourCompany: | string | 
| Header Params | |
|---|---|
| Accept: | string | 
| Query Auth | |
|---|---|
| key: | string | 
| Header Auth | |
|---|---|
| apiKey: | string | 
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>Updated 5 months ago
