Read Salesorder

Retrieves the details of a Salesorder object that has been previously created.

Parameters

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/SalesOrder will change to https://xyzcompany.agiliron.net/agiliron/api-40.php/SalesOrder
Query Params
filter:string
In this parameter fieldname needs to be provided with condition and value
to fetch related details.for eg. Subject,eq,Salesorder subject

1) To fetch SalesOrder with status equal to shipped and custom field(Test CheckBox) value is no or off, the following url must be used

https://xyzcompany.agiliron.net/agiliron/api-40/SalesOrder?filter=Status,eq,Created | Invoiced | Shipped;Test CheckBox,eq,0&key=xyzkey

2) To fetch SalesOrder with created date between 01-15-2020 to 01-31-2020 (Use | between two dates), the following url must be used

https://xyzcompany.agiliron.net/agiliron/api-40/SalesOrder?filter=OrderDate,bt,01-15-2020 | 01-31-2020&key=xyzkey

3) To fetch SalesOrder with created datetime between 01-15-2020 01:03:10 to 01-31-2020 20:00:00 (Use | between two dates), the following url must be used

https://xyzcompany.agiliron.net/agiliron/api-40/SalesOrder?filter=OrderDate,bt,01-15-2020 01:03:10| 01-31-2020 20:00:00&key=xyzkey

4) To fetch SalesOrder with DeliverFrom 'OAK' OR 'PDX' (Use OR between two values), the following url must be used

https://xyzcompany.agiliron.net/agiliron/api-40/SalesOrder?filter=DeliverFrom,eq,OAK OR PDX&key=xyzkey

List of condition abbrevations to be used:
"cs": contain string (string contains value)
"sw": start with (string starts with value)
"ew": end with (string end with value)
"neq": not equal (string or number should not match)
"eq": equal (string or number matches exactly)
"lt": lower than (number is lower than value)
"le": lower or equal (number is lower than or equal to value)
"ge": greater or equal (number is higher than or equal to value)
"gt": greater than (number is higher than value)
"bt": between (number is between two comma separated values)
customview:string
In this parameter customview name needs to be provided to fetch related details.For eg. To fetch SalesOrder customview with name as Paid Customview, the following url must be used

https://xyzcompany.agiliron.net/agiliron/api-40/SalesOrder?customview=Paid Customview&key=xyzkey
page:int
Page number needs to be passed in this variable ,to paginate the response.For eg. To fetch SalesOrder with status equal to shipped and custom field(Test CheckBox) value is no or off and page equal to 10, the following url must be used

https://xyzcompany.agiliron.net/agiliron/api-40/SalesOrder?filter=Status,eq,Created | Invoiced | Shipped;Test CheckBox,eq,0&page=10&key=xyzkey
pageSize:int
In this parameter pageSize number needs to be provided to fetch related page details.For eg. To fetch SalesOrder with status equal to shipped and custom field(Test CheckBox) value is no or off and page size equal to 10, the following url must be used

https://xyzcompany.agiliron.net/agiliron/api-40/SalesOrder?filter=Status,eq,Created | Invoiced | Shipped;Test CheckBox,eq,0&pageSize=10&key=xyzkey
Header Params
Accept: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.
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
NOTE: For SalesOrder ,

  • OrdersId field contains Salesorderid.
  • OrderNo field contains channel order id.
  • AgilironOrderNo field contains order no.
{
	"Orders": {
		"Order": [{
			"OrderNo": 5531,
			"AgilironOrderNo": 2224,
			"SalesOrderId": 12224,
			"ChannelId": 2563,
			"ChannelName": "Amazon",
			"OrderDate": "01-24-2020 07:08:13",
			"OrderDateUTC": "01-24-2020 15:01:35",
			"ModifiedDate": "01-24-2020 07:08:13",
			"ModifiedTimeUTC": "01-24-2020 15:05:56",
			"Subject": "Test New SalesOrder",
			"PotentialName": "New Potential",
			"QuoteName": "15march",
			"AccountId": 156961,
			"AccountName": "Test Account",
			"AccountPhone": 2344452,
			"AccountEmailAddress": "[email protected]",
			"ContactId": 156962,
			"ContactFirstName": "Contact Firstname",
			"ContactLastName": "Contact Lastname",
			"ContactPhone": 56984663,
			"ContactEmailAddress": "[email protected]",
			"BillingName": "Contact Firstname Contact Lastname",
			"BillingStreet": "45623 Clean Drive",
			"BillingCity": "Oakland",
			"BillingState": "CA",
			"BillingZipCode": 94601,
			"BillingCountry": "UnitedStates",
			"ShipToName": "Jane Doe",
			"ShipToPhone": "(415)675-3134",
			"ShipToEmailAddress": "[email protected]",
			"ShippingStreet": "4567DoeCircle",
			"ShippingCity": "SanFrancisco",
			"ShippingState": "CA",
			"ShippingZipCode": 94104,
			"ShippingCountry": "UnitedStates",
			"OrderDiscount": 5.55,
			"OrderDiscountCode": "",
			"SubTotal": 270.43,
			"ShippingCost": 6.75,
			"SalesTaxAuthority": "",
			"SalesTaxes": 24.25,
			"GrandTotal": 301.43,
			"DefaultCurrency": "",
			"ExchangeRate": "",
			"Status": "Created,Paid,",
			"ShippingStatus": "Ready to Pick,",
			"AdditionalFees": 3.45,
			"DefaultPriceBook": "Default",
			"PaymentLineItems": {
				"Payment": [{
						"PaymentMethod": "Cash",
						"PaymentAmount": 9,
						"PaymentDate": "2021-01-19",
						"AmountDue": "6"
					},
					{
						"PaymentMethod": "Check",
						"PaymentAmount": 11,
						"PaymentDate": "2021-01-20",
						"CheckNumber": "",
						"CheckWriter": "Test",
						"AmountDue": "6"
					}
				]
			},
			"DueDate": "01-24-2020",
			"InvoiceNo": "1881",
			"InvoiceDate": "07-08-2021",
			"CallDate": "01-24-2020",
			"CustomerNo": 23276,
			"AssignedTo": "admin",
			"ExportToQuickbooks": 2,
			"Type": "ASAP",
			"Priority": "Standard",
			"Pending": "Nothing",
			"Salescommission": 30.14,
			"TermsAndConditions": "Prepaid",
			"Description": "Order notes goes here.",
			"Carrier": "USPS",
			"ShippingMethod": "Priority Mail 2-Day",
			"DeliverFrom": "OAK",
			"ShippingDate": "",
			"TrackingNo": "",
			"ActualShippingCost": 23,
			"SpecialHandling": "Special Instructions goes here.",
			"ShipQPriority": "Standard",
			"BackorderHandling": "ShipAsAvailable",
			"PacklistType": "Show Company Details and Logo",
			"AmazonPrimeShipping": "Yes",
			"Cancelled": "No",
			"OnHold": "No",
			"RelatedPOs": "",
			"RelatedDropShipPOs": "",
			"OrdersCustomFields": {
				"CustomField": [{
						"Name": "CustomFied1",
						"Value": "Custom info 1"
					},
					{
						"Name": "CustomFied2",
						"Value": "Custom info 2"
					}
				]
			},
			"OrderDetails": {
				"OD": [{
						"OrderLineNo": "0",
						"ProductsName": "Test New Product1",
						"ProductCode": "TNP1",
						"MatrixSKUCode": 0,
						"SerialNo": "",
						"ProductNotes": "Product notes goes here.",
						"ProductQty": 2,
						"ProductPrice": 15,
						"ProductDiscount": 0,
						"ProductTotal": 30,
						"LineItemLocation": "OAK",
						"LineItemShippingCarrier": "UPS",
						"LineItemShippingMethod": "UPS Ground",
						"LineItemTrackingNumber": "221133",
						"LineItemShippingCost": "0.00",
						"LineItemShippingDate": "07-08-2021",
						"LineItemStatus": "Created,"
					},
					{
						"OrderLineNo": "1",
						"ProductsName": "Test Matrix Product2",
						"ProductCode": "TMP2",
						"MatrixSKUCode": "13420",
						"SerialNo": "",
						"ProductNotes": "Product notes goes here.",
						"ProductQty": 2,
						"ProductPrice": 5,
						"ProductDiscount": 0,
						"ProductTotal": 10,
						"LineItemLocation": "OAK",
						"LineItemShippingCarrier": "UPS",
						"LineItemShippingMethod": "UPS Ground",
						"LineItemTrackingNumber": "221133",
						"LineItemShippingCost": "0.00",
						"LineItemShippingDate": "07-08-2021",
						"LineItemStatus": "Created,"
					}
				]
			}
		}],
		"TotalRecords": 1,
		"CurrentPage": 1,
		"TotalPages": 1,
		"PageSize": 50
	}
}
<Orders>
    <Order>
      	<OrderNo>5531</OrderNo>
      	<AgilironOrderNo>2224</AgilironOrderNo>
      	<SalesOrderId>12224</SalesOrderId>
        <ChannelId>2563</ChannelId>
        <ChannelName>Amazon</ChannelName>
        <OrderDate>01-24-2020 07:08:13</OrderDate>
      	<OrderDateUTC>01-24-2020 15:01:35</OrderDateUTC>
        <ModifiedDate>01-24-2020 07:08:13</ModifiedDate>
      	<ModifiedTimeUTC>01-24-2020 15:05:56</ModifiedTimeUTC>
        <Subject>Test New SalesOrder</Subject>
      	<PotentialName>New Potential</PotentialName>
      	<QuoteName>15march</QuoteName>
      	<AccountId>156961</AccountId>
        <AccountName>Test Account</AccountName>
      	<AccountPhone>2344452</AccountPhone>
        <AccountEmailAddress>[email protected]</AccountEmailAddress>
      	<ContactId>156962</ContactId>
        <ContactFirstName>Contact Firstname</ContactFirstName>
        <ContactLastName>Contact Lastname</ContactLastName>
        <ContactPhone>56984663</ContactPhone>
        <ContactEmailAddress>[email protected]</ContactEmailAddress>
        <BillingName>Contact Firstname Contact Lastname</BillingName>
        <BillingStreet>45623 Clean Drive</BillingStreet>
        <BillingCity>Oakland</BillingCity>
        <BillingState>CA</BillingState>
        <BillingZipCode>94601</BillingZipCode>
        <BillingCountry>UnitedStates</BillingCountry>
        <ShipToName>Jane Doe</ShipToName>
        <ShipToPhone>(415)675-3134</ShipToPhone>
        <ShipToEmailAddress>[email protected]</ShipToEmailAddress>
        <ShippingStreet>4567DoeCircle</ShippingStreet>
        <ShippingCity>SanFrancisco</ShippingCity>
        <ShippingState>CA</ShippingState>
        <ShippingZipCode>94104</ShippingZipCode>
        <ShippingCountry>UnitedStates</ShippingCountry>
        <OrderDiscount>5.55</OrderDiscount>
        <OrderDiscountCode></OrderDiscountCode>
        <SubTotal>270.430</SubTotal>
        <ShippingCost>6.750</ShippingCost>
        <SalesTaxAuthority></SalesTaxAuthority>
        <SalesTaxes>24.250</SalesTaxes>
        <GrandTotal>301.430</GrandTotal>
        <DefaultCurrency></DefaultCurrency>
        <ExchangeRate></ExchangeRate>
        <Status>Created,Paid,</Status>
      	<ShippingStatus>Ready to Pick,</ShippingStatus>
        <AdditionalFees>3.45</AdditionalFees>
        <DefaultPriceBook>Default</DefaultPriceBook>
        <PaymentLineItems>
            <Payment>
                <PaymentMethod>Cash</PaymentMethod>
                <PaymentAmount>9</PaymentAmount>
                <PaymentDate>2021-01-19</PaymentDate>
                <AmountDue>6</AmountDue>
            </Payment>
            <Payment>
                <PaymentMethod>Check</PaymentMethod>
                <PaymentAmount>11</PaymentAmount>
                <PaymentDate>2021-01-20</PaymentDate>
                <CheckNumber></CheckNumber>
                <CheckWriter>Test</CheckWriter>
                <AmountDue>6</AmountDue>
            </Payment>
        </PaymentLineItems>
        <DueDate>01-24-2020</DueDate>
      	<InvoiceNo>1881</InvoiceNo>
        <InvoiceDate>07-08-2021</InvoiceDate>
        <CallDate>01-24-2020</CallDate>
        <CustomerNo>23276</CustomerNo>
        <AssignedTo>admin</AssignedTo>
        <ExportToQuickbooks>2</ExportToQuickbooks>
        <Type>ASAP</Type>
        <Priority>Standard</Priority>
        <Pending>Nothing</Pending>
        <Salescommission>30.140</Salescommission>
        <TermsAndConditions>Prepaid</TermsAndConditions>
        <Description>Order notes goes here.</Description>
        <Carrier>USPS</Carrier>
        <ShippingMethod>Priority Mail 2-Day</ShippingMethod>
        <DeliverFrom>OAK</DeliverFrom>
        <ShippingDate></ShippingDate>
        <TrackingNo></TrackingNo>
        <ActualShippingCost>23.00</ActualShippingCost>
        <SpecialHandling>Special Instructions goes here.</SpecialHandling>
        <ShipQPriority>Standard</ShipQPriority>
        <BackorderHandling>ShipAsAvailable</BackorderHandling>
        <PacklistType>Show Company Details and Logo</PacklistType>
        <AmazonPrimeShipping>Yes</AmazonPrimeShipping>
        <Cancelled>No</Cancelled>
      	<OnHold>No</OnHold>
      	<RelatedPOs></RelatedPOs>
      	<RelatedDropShipPOs></RelatedDropShipPOs>
        <OrdersCustomFields>
            <CustomField>
                <Name>CustomFied1</Name>
                <Value>Custom info 1</Value>
            </CustomField>
            <CustomField>
                <Name>CustomFied2</Name>
                <Value>Custom info 2</Value>
            </CustomField>
        </OrdersCustomFields>
        <OrderDetails>
            <OD>
              	<OrderLineNo>0</OrderLineNo>
                <ProductsName>Test New Product1</ProductsName>
                <ProductCode>TNP1</ProductCode>
                <MatrixSKUCode>0</MatrixSKUCode>
                <SerialNo></SerialNo>
                <ProductNotes>Product notes goes here.</ProductNotes>
                <ProductQty>2</ProductQty>
                <ProductPrice>15</ProductPrice>
                <ProductDiscount>0</ProductDiscount>
                <ProductTotal>30</ProductTotal>
              	<LineItemLocation>OAK</LineItemLocation>
                <LineItemShippingCarrier>UPS</LineItemShippingCarrier>
                <LineItemShippingMethod>UPS Ground</LineItemShippingMethod>
                <LineItemTrackingNumber>221133</LineItemTrackingNumber>
                <LineItemShippingCost>0.00</LineItemShippingCost>
                <LineItemShippingDate>07-08-2021</LineItemShippingDate>
              	<LineItemStatus>Created,</LineItemStatus>
            </OD>
            <OD>
              	<OrderLineNo>1</OrderLineNo>
                <ProductsName>Test Matrix Product2</ProductsName>
                <ProductCode>TMP2</ProductCode>
                <MatrixSKUCode>13420</MatrixSKUCode>
                <SerialNo></SerialNo>
                <ProductNotes>Product notes goes here.</ProductNotes>
                <ProductQty>2</ProductQty>
                <ProductPrice>5</ProductPrice>
                <ProductDiscount>0</ProductDiscount>
                <ProductTotal>10</ProductTotal>
              	<LineItemLocation>OAK</LineItemLocation>
                <LineItemShippingCarrier>UPS</LineItemShippingCarrier>
                <LineItemShippingMethod>UPS Ground</LineItemShippingMethod>
                <LineItemTrackingNumber>221133</LineItemTrackingNumber>
                <LineItemShippingCost>0.00</LineItemShippingCost>
                <LineItemShippingDate>07-08-2021</LineItemShippingDate>
              	<LineItemStatus>Created,</LineItemStatus>
            </OD>
        </OrderDetails>
    </Order>
  	<TotalRecords>1</TotalRecords>
    <CurrentPage>1</CurrentPage>
    <TotalPages>1</TotalPages>
    <PageSize>50</PageSize>
</Orders>

WADL

<?xml version="1.0" encoding="utf-8"?>
<application>
   <resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
     <resource path="SalesOrder">
       <method name="GET">
         <resource path="{filter}">
         <request>
           <param name="key" type="xsd:string" style="query" required="true"/>
         </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>