Add Bulk Quote

Use this operation to add new Quotes object.

Parameters

Body Params
JSON:json
Quote details needs to be passed as body parameter,it should be in JSON format.
XML:string
Quote 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 the base URL.For eg. if you enter xyzcompany name, the url https://{yourCompany}.agiliron.net/agiliron/api-40.php/Bulk-Quote will change to https://xyzcompany.agiliron.net/agiliron/api-40.php/Bulk-Quote
callback_urlstring
The callback URL need to passed in the base URL , which means after the code execution this file gets called.For eg. https://abc.php, the url https://{yourCompany}.agiliron.net/agiliron/api-40.php/Bulk-Quote?callback_url=https://abc.php&key=xyzkey
In this case after execution of code the curl call will made on https://abc.php.
sendRecordNostring
The value as true or false need to passed for this parameter in the base URL.For eg. if you want record number with response then send value as true ,For eg.
https://xyzcompany.agiliron.net/agiliron/api-40.php/Bulk-Quote&key=xyzkey&sendRecordNo=true.
By default it will be false.
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

{
	"Quotes": {
		"Quote": [{
			"ChannelId": "123",
			"ChannelName": "Amazon",
			"Subject": "Test New Quote",
			"PotentialName": "New Potential",
			"QuoteStage": "Created",
			"ValidTill": "01-24-2020",
			"CustomerNo": "",
			"RelatedSO": "0",
			"AccountId": "9505",
			"AccountName": "Doe Inc.",
			"AccountPhone": "23242342",
			"AccountEmailAddress": "[email protected]",
			"ContactId": "1490",
			"ContactFirstName": "John",
			"ContactLastName": "Doe",
			"ContactPhone": "3324324",
			"ContactEmailAddress": "[email protected]",
			"Team": "Team A",
			"BillingName": "John Doe",
			"BillingStreet": "1234 Doe St., Ste 1234",
			"BillingCity": "Oakland",
			"BillingState": "CA",
			"BillingZipCode": "94601",
			"BillingCountry": "United States",
			"ShipToName": "John Doe",
			"ShipToPhone": "",
			"ShipToEmailAddress": "",
			"ShippingStreet": "4567 Doe Circle",
			"ShippingCity": "San Francisco",
			"ShippingState": "CA",
			"ShippingZipCode": "94104",
			"ShippingCountry": "United States",
			"OrderDiscount": "5.50",
			"SubTotal": "28.50",
			"ShippingCost": "2.35",
			"SalesTaxAuthority": "California State",
			"SalesTaxes": "1.93",
			"GrandTotal": "32.78",
			"DefaultCurrency": "USD",
			"ExchangeRate": "1",
			"DefaultPriceBook": "Bargains",
			"AssignedTo": "admin",
			"TermsAndConditions": "Terms go here",
			"Description": "Description goes here",
			"Carrier": "UPS",
			"ShippingMethod": "2nd Day Air",
			"DeliverFrom": "OAK",
			"QuoteCustomFields": {
				"CustomField": [{
						"Name": "CustomFied1",
						"Value": "Custom info 1"
					},
					{
						"Name": "CustomFied2",
						"Value": "Custom info 2"
					}
				]
			},
			"OrderDetails": {
				"OD": [{
						"ProductsName": "Test New Product1",
						"ProductCode": "TNP1",
						"ProductSKUCode": "",
						"ProductNotes": "Product notes goes here.",
						"ProductQty": "1",
						"ProductPrice": "15",
						"ProductDiscount": "0",
						"ProductTotal": "30"
					},
					{
						"ProductsName": "Test New Product2",
						"ProductCode": "TNP2",
						"ProductSKUCode": "",
						"ProductNotes": "Product notes goes here.",
						"ProductQty": "1",
						"ProductPrice": "5",
						"ProductDiscount": "0",
						"ProductTotal": "10"
					}
				]
			}
		},
		{
			"ChannelId": "123",
			"ChannelName": "Amazon",
			"Subject": "Test New Quote 2",
			"PotentialName": "New Potential",
			"QuoteStage": "Created",
			"ValidTill": "01-24-2020",
			"CustomerNo": "",
			"RelatedSO": "0",
			"AccountId": "9505",
			"AccountName": "Doe Inc.",
			"AccountPhone": "23242342",
			"AccountEmailAddress": "[email protected]",
			"ContactId": "1490",
			"ContactFirstName": "John",
			"ContactLastName": "Doe",
			"ContactPhone": "3324324",
			"ContactEmailAddress": "[email protected]",
			"Team": "Team A",
			"BillingName": "John Doe",
			"BillingStreet": "1234 Doe St., Ste 1234",
			"BillingCity": "Oakland",
			"BillingState": "CA",
			"BillingZipCode": "94601",
			"BillingCountry": "United States",
			"ShipToName": "John Doe",
			"ShipToPhone": "",
			"ShipToEmailAddress": "",
			"ShippingStreet": "4567 Doe Circle",
			"ShippingCity": "San Francisco",
			"ShippingState": "CA",
			"ShippingZipCode": "94104",
			"ShippingCountry": "United States",
			"OrderDiscount": "5.50",
			"SubTotal": "28.50",
			"ShippingCost": "2.35",
			"SalesTaxAuthority": "California State",
			"SalesTaxes": "1.93",
			"GrandTotal": "32.78",
			"DefaultCurrency": "USD",
			"ExchangeRate": "1",
			"DefaultPriceBook": "Bargains",
			"AssignedTo": "admin",
			"TermsAndConditions": "Terms go here",
			"Description": "Description goes here",
			"Carrier": "UPS",
			"ShippingMethod": "2nd Day Air",
			"DeliverFrom": "OAK",
			"QuoteCustomFields": {
				"CustomField": [{
						"Name": "CustomFied1",
						"Value": "Custom info 1"
					},
					{
						"Name": "CustomFied2",
						"Value": "Custom info 2"
					}
				]
			},
			"OrderDetails": {
				"OD": [{
						"ProductsName": "Test New Product1",
						"ProductCode": "TNP1",
						"ProductSKUCode": "",
						"ProductNotes": "Product notes goes here.",
						"ProductQty": "1",
						"ProductPrice": "15",
						"ProductDiscount": "0",
						"ProductTotal": "30"
					},
					{
						"ProductsName": "Test New Product2",
						"ProductCode": "TNP2",
						"ProductSKUCode": "",
						"ProductNotes": "Product notes goes here.",
						"ProductQty": "1",
						"ProductPrice": "5",
						"ProductDiscount": "0",
						"ProductTotal": "10"
					}
				]
			}
		}]
	}
}
<Quotes>
   <Quote>
      <ChannelId>123</ChannelId>
      <ChannelName>Amazon</ChannelName>
      <Subject>Test New Quote</Subject>
      <PotentialName>New Potential</PotentialName>
      <QuoteStage>Created</QuoteStage>
      <ValidTill>01-24-2020</ValidTill>
      <CustomerNo></CustomerNo>
      <RelatedSO>0</RelatedSO>
      <AccountId>9505</AccountId>
      <AccountName>Doe Inc.</AccountName>
      <AccountPhone>23242342</AccountPhone>
      <AccountEmailAddress>[email protected]</AccountEmailAddress>
      <ContactId>1490</ContactId>
      <ContactFirstName>John</ContactFirstName>
      <ContactLastName>Doe</ContactLastName>
      <ContactPhone>3324324</ContactPhone>
      <ContactEmailAddress>[email protected]</ContactEmailAddress>
      <Team>Team A</Team>
      <BillingName>John Doe</BillingName>
      <BillingStreet>1234 Doe St., Ste 1234</BillingStreet>
      <BillingCity>Oakland</BillingCity>
      <BillingState>CA</BillingState>
      <BillingZipCode>94601</BillingZipCode>
      <BillingCountry>United States</BillingCountry>
      <ShipToName>John Doe</ShipToName>
      <ShipToPhone></ShipToPhone>
      <ShipToEmailAddress></ShipToEmailAddress>
      <ShippingStreet>4567 Doe Circle</ShippingStreet>
      <ShippingCity>San Francisco</ShippingCity>
      <ShippingState>CA</ShippingState>
      <ShippingZipCode>94104</ShippingZipCode>
      <ShippingCountry>United States</ShippingCountry>
      <OrderDiscount>5.50</OrderDiscount>
      <SubTotal>28.50</SubTotal>
      <ShippingCost>2.35</ShippingCost>
      <SalesTaxAuthority>California State</SalesTaxAuthority>
      <SalesTaxes>1.93</SalesTaxes>
      <GrandTotal>32.78</GrandTotal>
      <DefaultCurrency>USD</DefaultCurrency>
      <ExchangeRate>1</ExchangeRate>
      <DefaultPriceBook>Bargains</DefaultPriceBook>
      <AssignedTo>admin</AssignedTo>
      <TermsAndConditions>Terms go here</TermsAndConditions>
      <Description>Description goes here</Description>
      <Carrier>UPS</Carrier>
      <ShippingMethod>2nd Day Air</ShippingMethod>
      <DeliverFrom>OAK</DeliverFrom>
      <QuoteCustomFields>
         <CustomField>
            <Name>CustomFied1</Name>
            <Value>Custom info 1</Value>
         </CustomField>
         <CustomField>
            <Name>CustomFied2</Name>
            <Value>Custom info 2</Value>
         </CustomField>
      </QuoteCustomFields>
      <OrderDetails>
         <OD>
            <ProductsName>Test New Product1</ProductsName>
            <ProductCode>TNP1</ProductCode>
            <ProductSKUCode></ProductSKUCode>
            <ProductNotes>Product notes goes here.</ProductNotes>
            <ProductQty>1</ProductQty>
            <ProductPrice>15</ProductPrice>
            <ProductDiscount>0</ProductDiscount>
            <ProductTotal>30</ProductTotal>
         </OD>
         <OD>
            <ProductsName>Test New Product2</ProductsName>
            <ProductCode>TNP2</ProductCode>
            <ProductSKUCode></ProductSKUCode>
            <ProductNotes>Product notes goes here.</ProductNotes>
            <ProductQty>1</ProductQty>
            <ProductPrice>5</ProductPrice>
            <ProductDiscount>0</ProductDiscount>
            <ProductTotal>10</ProductTotal>
         </OD>
      </OrderDetails>
   </Quote>
   <Quote>
      <ChannelId>123</ChannelId>
      <ChannelName>Amazon</ChannelName>
      <Subject>Test New Quote 2</Subject>
      <PotentialName>New Potential</PotentialName>
      <QuoteStage>Created</QuoteStage>
      <ValidTill>01-24-2020</ValidTill>
      <CustomerNo></CustomerNo>
      <RelatedSO>0</RelatedSO>
      <AccountId>9505</AccountId>
      <AccountName>Doe Inc.</AccountName>
      <AccountPhone>23242342</AccountPhone>
      <AccountEmailAddress>[email protected]</AccountEmailAddress>
      <ContactId>1490</ContactId>
      <ContactFirstName>John</ContactFirstName>
      <ContactLastName>Doe</ContactLastName>
      <ContactPhone>3324324</ContactPhone>
      <ContactEmailAddress>[email protected]</ContactEmailAddress>
      <Team>Team A</Team>
      <BillingName>John Doe</BillingName>
      <BillingStreet>1234 Doe St., Ste 1234</BillingStreet>
      <BillingCity>Oakland</BillingCity>
      <BillingState>CA</BillingState>
      <BillingZipCode>94601</BillingZipCode>
      <BillingCountry>United States</BillingCountry>
      <ShipToName>John Doe</ShipToName>
      <ShipToPhone></ShipToPhone>
      <ShipToEmailAddress></ShipToEmailAddress>
      <ShippingStreet>4567 Doe Circle</ShippingStreet>
      <ShippingCity>San Francisco</ShippingCity>
      <ShippingState>CA</ShippingState>
      <ShippingZipCode>94104</ShippingZipCode>
      <ShippingCountry>United States</ShippingCountry>
      <OrderDiscount>5.50</OrderDiscount>
      <SubTotal>28.50</SubTotal>
      <ShippingCost>2.35</ShippingCost>
      <SalesTaxAuthority>California State</SalesTaxAuthority>
      <SalesTaxes>1.93</SalesTaxes>
      <GrandTotal>32.78</GrandTotal>
      <DefaultCurrency>USD</DefaultCurrency>
      <ExchangeRate>1</ExchangeRate>
      <DefaultPriceBook>Bargains</DefaultPriceBook>
      <AssignedTo>admin</AssignedTo>
      <TermsAndConditions>Terms go here</TermsAndConditions>
      <Description>Description goes here</Description>
      <Carrier>UPS</Carrier>
      <ShippingMethod>2nd Day Air</ShippingMethod>
      <DeliverFrom>OAK</DeliverFrom>
      <QuoteCustomFields>
         <CustomField>
            <Name>CustomFied1</Name>
            <Value>Custom info 1</Value>
         </CustomField>
         <CustomField>
            <Name>CustomFied2</Name>
            <Value>Custom info 2</Value>
         </CustomField>
      </QuoteCustomFields>
      <OrderDetails>
         <OD>
            <ProductsName>Test New Product1</ProductsName>
            <ProductCode>TNP1</ProductCode>
            <ProductSKUCode></ProductSKUCode>
            <ProductNotes>Product notes goes here.</ProductNotes>
            <ProductQty>1</ProductQty>
            <ProductPrice>15</ProductPrice>
            <ProductDiscount>0</ProductDiscount>
            <ProductTotal>30</ProductTotal>
         </OD>
         <OD>
            <ProductsName>Test New Product2</ProductsName>
            <ProductCode>TNP2</ProductCode>
            <ProductSKUCode></ProductSKUCode>
            <ProductNotes>Product notes goes here.</ProductNotes>
            <ProductQty>1</ProductQty>
            <ProductPrice>5</ProductPrice>
            <ProductDiscount>0</ProductDiscount>
            <ProductTotal>10</ProductTotal>
         </OD>
      </OrderDetails>
   </Quote>
</Quotes>

Sample Response

{
	"MCM": {
		"response": {
			"objectType": "Quote",
			"syncTime": "2021-12-28 00:56:41"
		},
		"parameters": {
			"results": {
				"message": {
					"status": "Success",
					"success_message": " Bulk Quote Add Initiated Successfully. "
				}
			}
		}
	}
}
<MCM>
    <response>
        <objectType>Quote</objectType>
        <syncTime>2021-06-11 04:13:24</syncTime>
    </response>
    <parameters>
        <results>
            <message>
                <status>Success</status>
                <success_message> Bulk Quote Add Initiated Successfully. </success_message>
            </message>
        </results>
    </parameters>
</MCM>

WADL

<application>
   <resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
      <resource path="Bulk-Quote">
         <method name="POST">
            <request>
               <param name="key" type="xsd:string" style="query" required="true" />
               <param name="Subject" type="xsd:string" style="body" required="true" />
               <param name="PotentialName" type="xsd:string" style="body" />
               <param name="QuoteStage" type="xsd:string" style="body" />
               <param name="CustomerNo" type="xsd:string" style="body" />
               <param name="RelatedSO" type="xsd:int" style="body" />
               <param name="AccountName" type="xsd:int" style="body" required="true" />
               <param name="AccountPhone" type="xsd:string" style="body" />
               <param name="AccountEmailAddress" type="xsd:string" style="body" />
               <param name="ContactFirstName" type="xsd:string" style="body" required="true" />
               <param name="ContactLastName" type="xsd:string" style="body" required="true" />
               <param name="ContactPhone" type="xsd:string" style="body" />
               <param name="ContactEmailAddress" type="xsd:string" style="body" />
               <param name="BillingName" type="xsd:string" style="body" />
               <param name="BillingStreet" type="xsd:string" style="body" />
               <param name="BillingCity" type="xsd:string" style="body" />
               <param name="BillingState" type="xsd:string" style="body" />
               <param name="BillingZipCode" type="xsd:string" style="body" />
               <param name="BillingCountry" type="xsd:string" style="body" />
               <param name="ShipToName" type="xsd:string" style="body" />
               <param name="ShipToPhone" type="xsd:string" style="body" />
               <param name="ShipToEmailAddress" type="xsd:string" style="body" />
               <param name="ShippingStreet" type="xsd:string" style="body" />
               <param name="ShippingCity" type="xsd:string" style="body" />
               <param name="ShippingState" type="xsd:string" style="body" />
               <param name="ShippingZipCode" type="xsd:string" style="body" />
               <param name="ShippingCountry" type="xsd:string" style="body" />
               <param name="OrderDiscount" type="xsd:decimal" style="body" />
               <param name="SubTotal" type="xsd:decimal" style="body" />
               <param name="ShippingCost" type="xsd:decimal" style="body" />
               <param name="SalesTaxAuthority" type="xsd:string" style="body" />
               <param name="SalesTaxes" type="xsd:decimal" style="body" />
               <param name="GrandTotal" type="xsd:decimal" style="body" />
               <param name="DefaultCurrency" type="xsd:string" style="body" />
               <param name="DefaultPriceBook" type="xsd:string" style="body" />
               <param name="AssignedTo" type="xsd:string" style="body" />
               <param name="TermsAndConditions" type="xsd:string" style="body" />
               <param name="Description" type="xsd:string" style="body" />
               <param name="Carrier" type="xsd:string" style="body" />
               <param name="ShippingMethod" type="xsd:string" style="body" />
               <param name="DeliverFrom" type="xsd:string" style="body" />
               <param name="OrderDetails">
                 <param name="ProductsName" type="xsd:string" style="body" />
                 <param name="ProductCode" type="xsd:string" style="body" required="true"/>
                 <param name="ProductSKUCode" type="xsd:string" style="body" />
                 <param name="ProductNotes" type="xsd:string" style="body"/>
                 <param name="ProductQty" type="xsd:int" style="body" required="true"/>
                 <param name="ProductPrice" type="xsd:decimal" style="body"/>
                 <param name="ProductDiscount" type="xsd:decimal" style="body"/>
                 <param name="ProductTotal" type="xsd:decimal" style="body"/>
               </param>
            </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>
<?php
	$url = "https://{your_custom_url}"; //this custom url will be called after the code is executed
	$curlConn = curl_init();
	curl_setopt($curlConn, CURLOPT_CUSTOMREQUEST, "POST");
	curl_setopt($curlConn, CURLOPT_POSTFIELDS,$results); //$results contain the result set
	curl_setopt($curlConn,CURLOPT_URL,$url);
	curl_setopt($curlConn, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt($curlConn, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($curlConn, CURLOPT_RETURNTRANSFER, 1);
	$ret = curl_exec($curlConn);
?>
<result>
   <SuccessNumber>1</SuccessNumber>
   <FailureNumber>1</FailureNumber>
   <Success>
      <Quote>
         <QuoteNo>123</QuoteNo>
         <QuoteId>23432</QuoteId>
      </Quote>
   </Success>
   <Failure>
      <Quote>
         <QuoteNo></QuoteNo>
         <Message>Quote No cannot be blank</Message>
      </Quote>
   </Failure>
</result>
{
	"result": {
		"SuccessNumber": "1",
		"FailureNumber": "1",
		"Success": {
			"Quote": {
				"QuoteNo": "123",
				"QuoteId": "23432"
			}
		},
		"Failure": {
			"Quote": {
				"QuoteNo": "",
				"Message": "Quote No cannot be blank"
			}
		}
	}
}