Read PurchaseOrder
Retrieves the details of a PurchaseOrder 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/PurchaseOrder will change to https://xyzcompany.agiliron.net/agiliron/api-40.php/PurchaseOrder |
Query Params | |
---|---|
filter: | string In this parameter fieldname needs to be provided with condition and value to fetch related details.for eg. Subject,eq,Purchaseorder subject 1) To fetch PurchaseOrder with status is 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/PurchaseOrder?filter=Status,eq,Created | Invoiced | Shipped;Test CheckBox,eq,0&key=xyzkey 2) To fetch PurchaseOrder 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/PurchaseOrder?filter=OrderDate,bt,01-15-2020 | 01-31-2020&key=xyzkey 3) To fetch PurchaseOrder 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/PurchaseOrder?filter=OrderDate,bt,01-15-2020 01:03:10| 01-31-2020 20:00:00&key=xyzkey 4) To fetch PurchaseOrder with Deliverto 'OAK' OR 'PDX' (Use OR between two values), the following url must be used https://xyzcompany.agiliron.net/agiliron/api-40/PurchaseOrder?filter=DeliverTo,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 PurchaseOrder customview with name as ABC Customview, the following url must be used https://xyzcompany.agiliron.net/agiliron/api-40/PurchaseOrder?customview=ABC Customview&key=xyzkey |
page: | int Page number needs to be passed in this variable ,to paginate the response.For eg. To fetch PurchaseOrder with status is 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/PurchaseOrder?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 PurchaseOrder with status is 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/PurchaseOrder?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 PurchaseOrder ,
- OrdersId field contains Purchaseorderid.
- OrderNo field contains RequisitionNo.
- AgilironOrderNo field contains order no.
{
"POOrders": {
"Order": [{
"OrderNo": 15135,
"AgilironOrderNo": 5698,
"PurchaseOrderId": 15698,
"OrderDate": "01-24-2020 07:21:21",
"OrderDateUTC": "01-24-2020 15:01:35",
"ModifiedDate": "01-24-2020 07:21:21",
"ModifiedTimeUTC": "01-24-2020 15:05:56",
"Subject": "Test New PurchaseOrder",
"VendorId": 3422,
"VendorName": "Vendor",
"VendorPhone": 2344452,
"VendorEmailAddress": "[email protected]",
"ContactId": 156962,
"ContactFirstName": "Contact Firstname",
"ContactLastName": "Contact Lastname",
"Phone": 56984663,
"Fax": 2342131,
"TrackingNo": 224433,
"EmailAddress": "[email protected]",
"BillTo": "",
"BillingStreet": "1234DoeSt.,Ste1234",
"BillingCity": "Oakland",
"BillingState": "CA",
"BillingZipCode": 94601,
"BillingCountry": "UnitedStates",
"ShipToName": "Your Company",
"ShippingStreet": "4567DoeCircle",
"ShippingCity": "SanFrancisco",
"ShippingState": "CA",
"ShippingZipCode": 94104,
"ShippingCountry": "UnitedStates",
"OrderDiscount": "",
"SubTotal": 270.43,
"ShippingCost": "",
"SalesTaxAuthority": "",
"SalesTaxes": 24.25,
"GrandTotal": 301.43,
"DefaultCurrency": "USD",
"ExchangeRate": 1,
"Status": "Created,Invoiced,Shipped,Paid,Completed,",
"ReceivedDate": "01-24-2020",
"PaymentLineItems": {
"Payment": [{
"PaymentMethod": "Cash",
"PaymentAmount": 9,
"PaymentDate": "01-20-2021",
"CheckNumber": "",
"CheckWriter": "",
"CreditCardNumber": "",
"CreditCardType": "",
"CreditCardOwner": "",
"CreditCardExpires": "MMYY",
"CreditCardSecurityCode": "",
"CreditCardAuthorization": "",
"InvoiceNumber": "",
"CustomerBankAccount": "",
"PaymentEmailAddress": ""
},
{
"PaymentMethod": "Check",
"PaymentAmount": 11,
"PaymentDate": "01-20-2021",
"CheckNumber": "",
"CheckWriter": "Test",
"CreditCardNumber": "",
"CreditCardType": "",
"CreditCardOwner": "",
"CreditCardExpires": "MMYY",
"CreditCardSecurityCode": "",
"CreditCardAuthorization": "",
"InvoiceNumber": "",
"CustomerBankAccount": "",
"PaymentEmailAddress": ""
}
]
},
"DueDate": "01-24-2020",
"AssignedTo": "admin",
"TermsAndConditions": "Prepaid",
"Description": "Order notes goes here.",
"Carrier": "",
"ShippingMethod": "",
"DeliverTo": "OAK",
"ExportToQuickbooks": 0,
"RelatedSalesOrders": 2308,
"OrdersCustomFields": {
"CustomField": [{
"Name": "CustomFied1",
"Value": "Custom info 1"
},
{
"Name": "CustomFied2",
"Value": "Custom info 2"
}
]
},
"OrderDetails": {
"OD": [{
"OrderLineNo": "0",
"ProductName": "Test New Product1",
"ProductCode": "TNP1",
"MatrixSKUCode": 0,
"SerialNo": "",
"ProductNotes": "Product notes goes here.",
"ProductsQuantityReceived": 0,
"ProductQty": 2,
"ProductPrice": 15,
"ProductDiscount": 0,
"ProductTotal": 30,
"VendorPartNumber": 4378403
},
{
"OrderLineNo": "1",
"ProductName": "Test New Product2",
"ProductCode": "TNP2",
"MatrixSKUCode": 0,
"SerialNo": "",
"ProductNotes": "Product notes goes here.",
"ProductsQuantityReceived": 0,
"ProductQty": 2,
"ProductPrice": 5,
"ProductDiscount": 0,
"ProductTotal": 10,
"VendorPartNumber": 4378403
}
]
}
}],
"TotalRecords": 1,
"CurrentPage": 1,
"TotalPages": 1,
"PageSize": 50
}
}
<POOrders>
<Order>
<OrderNo>15135</OrderNo>
<AgilironOrderNo>5698</AgilironOrderNo>
<PurchaseOrderId>15698</PurchaseOrderId>
<OrderDate>01-24-2020 07:21:21</OrderDate>
<OrderDateUTC>01-24-2020 15:01:35</OrderDateUTC>
<ModifiedDate>01-24-2020 07:21:21</ModifiedDate>
<ModifiedTimeUTC>01-24-2020 15:05:56</ModifiedTimeUTC>
<Subject>Test New PurchaseOrder</Subject>
<VendorId>3422</VendorId>
<VendorName>Vendor</VendorName>
<VendorPhone>2344452</VendorPhone>
<VendorEmailAddress>[email protected]</VendorEmailAddress>
<ContactId>156962</ContactId>
<ContactFirstName>Contact Firstname</ContactFirstName>
<ContactLastName>Contact Lastname</ContactLastName>
<Phone>56984663</Phone>
<Fax>2342131</Fax>
<TrackingNo>224433</TrackingNo>
<EmailAddress>[email protected]</EmailAddress>
<BillTo></BillTo>
<BillingStreet>1234DoeSt.,Ste1234</BillingStreet>
<BillingCity>Oakland</BillingCity>
<BillingState>CA</BillingState>
<BillingZipCode>94601</BillingZipCode>
<BillingCountry>UnitedStates</BillingCountry>
<ShipToName>Your Company</ShipToName>
<ShippingStreet>4567DoeCircle</ShippingStreet>
<ShippingCity>SanFrancisco</ShippingCity>
<ShippingState>CA</ShippingState>
<ShippingZipCode>94104</ShippingZipCode>
<ShippingCountry>UnitedStates</ShippingCountry>
<OrderDiscount></OrderDiscount>
<SubTotal>270.430</SubTotal>
<ShippingCost></ShippingCost>
<SalesTaxAuthority></SalesTaxAuthority>
<SalesTaxes>24.250</SalesTaxes>
<GrandTotal>301.430</GrandTotal>
<DefaultCurrency>USD</DefaultCurrency>
<ExchangeRate>1.00000</ExchangeRate>
<Status>Created,Invoiced,Shipped,Paid,Completed,</Status>
<ReceivedDate>01-24-2020</ReceivedDate>
<PaymentLineItems>
<Payment>
<PaymentMethod>Cash</PaymentMethod>
<PaymentAmount>9</PaymentAmount>
<PaymentDate>01-20-2021</PaymentDate>
<CheckNumber></CheckNumber>
<CheckWriter></CheckWriter>
<CreditCardNumber></CreditCardNumber>
<CreditCardType></CreditCardType>
<CreditCardOwner></CreditCardOwner>
<CreditCardExpires>MMYY</CreditCardExpires>
<CreditCardSecurityCode></CreditCardSecurityCode>
<CreditCardAuthorization></CreditCardAuthorization>
<InvoiceNumber></InvoiceNumber>
<CustomerBankAccount></CustomerBankAccount>
<PaymentEmailAddress></PaymentEmailAddress>
</Payment>
<Payment>
<PaymentMethod>Check</PaymentMethod>
<PaymentAmount>11</PaymentAmount>
<PaymentDate>01-20-2021</PaymentDate>
<CheckNumber></CheckNumber>
<CheckWriter>Test</CheckWriter>
<CreditCardNumber></CreditCardNumber>
<CreditCardType></CreditCardType>
<CreditCardOwner></CreditCardOwner>
<CreditCardExpires>MMYY</CreditCardExpires>
<CreditCardSecurityCode></CreditCardSecurityCode>
<CreditCardAuthorization></CreditCardAuthorization>
<InvoiceNumber></InvoiceNumber>
<CustomerBankAccount></CustomerBankAccount>
<PaymentEmailAddress></PaymentEmailAddress>
</Payment>
</PaymentLineItems>
<DueDate>01-24-2020</DueDate>
<AssignedTo>admin</AssignedTo>
<TermsAndConditions>Prepaid</TermsAndConditions>
<Description>Order notes goes here.</Description>
<Carrier></Carrier>
<ShippingMethod></ShippingMethod>
<DeliverTo>OAK</DeliverTo>
<ExportToQuickbooks>0</ExportToQuickbooks>
<RelatedSalesOrders>2308</RelatedSalesOrders>
<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>
<ProductName>Test New Product1</ProductName>
<ProductCode>TNP1</ProductCode>
<MatrixSKUCode>0</MatrixSKUCode>
<SerialNo>
</SerialNo>
<ProductNotes>Product notes goes here.</ProductNotes>
<ProductsQuantityReceived>0</ProductsQuantityReceived>
<ProductQty>2</ProductQty>
<ProductPrice>15</ProductPrice>
<ProductDiscount>0</ProductDiscount>
<ProductTotal>30</ProductTotal>
<VendorPartNumber>4378403</VendorPartNumber>
</OD>
<OD>
<OrderLineNo>1</OrderLineNo>
<ProductName>Test New Product2</ProductName>
<ProductCode>TNP2</ProductCode>
<MatrixSKUCode>0</MatrixSKUCode>
<SerialNo>
</SerialNo>
<ProductNotes>Product notes goes here.</ProductNotes>
<ProductsQuantityReceived>0</ProductsQuantityReceived>
<ProductQty>2</ProductQty>
<ProductPrice>5</ProductPrice>
<ProductDiscount>0</ProductDiscount>
<ProductTotal>10</ProductTotal>
<VendorPartNumber>4378403</VendorPartNumber>
</OD>
</OrderDetails>
</Order>
<TotalRecords>1</TotalRecords>
<CurrentPage>1</CurrentPage>
<TotalPages>1</TotalPages>
<PageSize>50</PageSize>
</POOrders>
WADL
<?xml version="1.0" encoding="utf-8"?>
<application>
<resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
<resource path="PurchaseOrder">
<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>
Updated over 1 year ago