REST API - getCaseState - POST

The table summarizes the REST API - getCaseState - POST.

Request

Format POST <baseurl>/globaldata/casestatex
Body The case reference is embedded in the request body. You can obtain the case reference using findAllCases or getCaseReferencesForDataView.

You can also optionally specify that all allowable case state values be returned by including includeAllowedValues in the request body and setting it to "true". Default = "false".

Response

JSON Returns a JSON representation of the content of a GetCaseStateResponse element.
XML Returns a GetCaseStateResponse element (from the BusinessDataServices schema).

Example

Request
POST <baseurl>/globaldata/casestatex
Body
{
  "GetCaseStateRequestType": {
    "@includeAllowedValues": "true",
    "caseReference": "BDS-1-com.example.statefunbdp.Order-11-0"
  }
}
Response
    {
        "result":
        {
            "caseReference": "BDS-1-com.example.statefunbdp.Order-11-0",
            "value":
            {
                "label": "Created",
                "name": "CREATED"
            },
            "allowedValue":
            [
                {
                    "label": "Created",
                    "name": "CREATED"
                },
                {
                    "label": "Picking",
                    "name": "PICKING"
                },
                {
                    "label": "Dispatched",
                    "name": "DISPATCHED"
                },
                {
                    "label": "Cancelled",
                    "name": "CANCELLED"
                }
            ]
        }
    }