getCustomerRequestByIdOrKey method

Future<CustomerRequestDTO> getCustomerRequestByIdOrKey({
  1. required String issueIdOrKey,
  2. List<String>? expand,
})

This method returns a customer request.

Permissions required: Permission to access the specified service desk.

Response limitations: For customers, only a request they created, was created on their behalf, or they are participating in will be returned.

Note: requestFieldValues does not include hidden fields. To get a list of request type fields that includes hidden fields, see /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field

Implementation

Future<CustomerRequestDTO> getCustomerRequestByIdOrKey(
    {required String issueIdOrKey, List<String>? expand}) async {
  return CustomerRequestDTO.fromJson(await _client.send(
    'get',
    'rest/servicedeskapi/request/{issueIdOrKey}',
    pathParameters: {
      'issueIdOrKey': issueIdOrKey,
    },
    queryParameters: {
      if (expand != null) 'expand': expand.map((e) => e).join(','),
    },
  ));
}