WebAPI – Changing a Request state and the service classification

WebAPI – Changing a Request state and the service classification

This method allows to change the request state and, if it is on the final state, it allows to classify the service.

The method to be used when changing the state of a request: 

POST {{url}/api/{{tenant}}/{{organization}}/requests/requests/changeStateRating/{{companyKey}}/{{requestKey}}/{{schemaEntityStateKey}}

 On the API request, the following must be specified:

  1. companyKey: company key;
  2. requestKey: request key;
  3. schemaEntityStateKey: key of the state being changed.

 This method allows to change the request state according to the following parameters filled in:

  1. stateChangeDate: state change date. If not filled in, the current date will be used;
  2. stateJustificationRemarks: state change reason. This field can be mandatory, is the state transition requires it.
  3. rate: service classification number, integer between 1 and 5. This information is only saved if the request state being changed is setup as a final state and not as canceled;
  4. rateRemarks: service classification remarks, this information is only saved if the request state being changed is setup as a final state and not as.

 

When this method is executed successfully, it returns HttpStatusCode.OK with the state change information.

Example for the parameters on the method:

 POST {{url}/api/{{tenant}}/{{organization}}/requests/requests/changeStateRating/{{companyKey}}/{{requestKey}}/{{schemaEntityStateKey}}?stateChangeDate=2021-11-24T10:59:20.000%2B00:00&stateJustificationRemarks=Motivo&rate=5&rateRemarks=pedido executado




    • Related Articles

    • WebAPI - Creating a request

      This method allows to create a request in a simplified manner. The method to be used when creating a request: POST url/api/mytenant/myorganization/Requests/requests Json example for creating a request: { "requestKey": "00001", "description": "Vidro ...
    • WebAPI- Changing the state of the request

      This method allows to change the state of a request.   The method to be used when changing the state of a request:  PUT {{url}/api/{{tenant}}/{{organization}}/requests/requests/{{companyKey}}/{{requestKey}}/schemaEntityState   The parameters on the ...
    • Webapi - How to create a part of the service type?

      This method allows to create a part of the service type in a simplified manner. The method to be used to create a part of the service type is: POST url/api/mytenant/myorganization/businesscore/parts Json example to create a part of the service type: ...
    • WebAPI – How can I change the work order state?

      This method allows you to change a work order state. The method to be used for changing the work order change is: Post {{url}/api/{{tenant}}/{{organization}}/maintenance/workorders/changeSchemaEntityState/{{companyKey}} The parameters in the method ...
    • WebAPI - Changing the request attribute

      This method allows to change a request field. The method to be used when changing the request attribute:  PUT  {{url}/api/{{tenant}}/{{organization}}/requests/requests/{{companyKey}}/{{requestKey}}/{{atributo}}   The parameters on the method are the ...