Delete Bulk Products
Deletes the details of a Products object that has been previously created.
Parameters
Body Params | |
---|---|
body: | string |
Path Params | |
---|---|
yourCompany: | string |
callback_url | string |
sendRecordNo | string
|
Header Params | |
---|---|
Accept: | string |
Query Auth | |
---|---|
key: | string |
Header Auth | |
---|---|
apiKey: | string |
Sample Code
{
"Products": {
"Product": [
{
"ProductCode": "TNP1"
},
{
"ProductCode": "TNP2"
}
]
}
}
<Products>
<Product>
<ProductCode>TNP1</ProductCode>
</Product>
<Product>
<ProductCode>TNP2</ProductCode>
</Product>
</Products>
WADL
<?xml version="1.0" encoding="utf-8"?>
<application>
<resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
<resource path="Bulk-Products">
<method name="DELETE">
<request>
<param name="key" type="xsd:string" style="query" required="true"/>
<param name="ProductCode" type="xsd:string" style="body" 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>
Sample Webhook
<?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>
<Product>
<ProductCode>TNP1234</ProductCode>
</Product>
</Success>
<Failure>
<Product>
<ProductCode>TNP123</ProductCode>
<Message>Invalid Product code</Message>
</Product>
</Failure>
</result>
{
"result": {
"SuccessNumber": "1",
"FailureNumber": "1",
"Success": {
"Product": {
"ProductCode": "TNP1234"
}
},
"Failure": {
"Product": {
"ProductCode": "TNP123",
"Message": "Invalid Product code"
}
}
}
}
<result>
<SuccessNumber>1</SuccessNumber>
<FailureNumber>1</FailureNumber>
<Success>
<Product>
<ProductCode>TNP1234</ProductCode>
<Record>1</Record>
</Product>
</Success>
<Failure>
<Product>
<ProductCode>TNP123</ProductCode>
<Message>Invalid vendor name</Message>
<Record>2</Record>
</Product>
</Failure>
</result>
{
"result": {
"SuccessNumber": "1",
"FailureNumber": "1",
"Success": {
"Product": {
"ProductCode": "TNP1234",
"Record": "1"
}
},
"Failure": {
"Product": {
"ProductCode": "TNP123",
"Message": "Invalid vendor name",
"Record": "2"
}
}
}
}
Updated about 21 hours ago