All Classes Pages
DeleteCustomerGrantExamples Class Reference

More...

Detailed Description

Examples for delete grants provided by a customer

Example 1 - Delete multiple grants of a customer

This example demonstrates the following:

  • Deleting grants provided to multiple customers (2 customers in this example).

XML

Request

Method URL
DELETE /ws/v12/interaction/customer/1000/grant

Request headers

Name Value
X-egain-session Valid session ID
Accept application/xml
Content-Type application/xml
Accept-Language en-US

Request body

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<grants  xmlns="http://bindings.egain.com/ws/model/v12/gen/interaction/customer">
    <grantsTo>
        <customer id="1001"/>
        <customer id="1020"/>
    </grantsTo>
</grants>

Response
HTTP/1.1 204 No Content

Response headers

Name Value
X-egain-session current session ID
Content-Type application/xml

     


JSON

Request

Method URL
DELETE /ws/v12/interaction/customer/1000/grant

Request headers

Name Value
X-egain-session Valid session ID
Accept application/json
Content-Type application/json
Accept-Language en-US

Request body

{
    "grantsTo": {
        "customer": [
            {
                "id": "1001"
            },
            {
                "id": "1020"
            }
        ]
    }
}

Response
HTTP/1.1 204 No Content

Response headers

Name Value
X-egain-session current session ID
Content-Type application/json