Update a service request
Applies to: Partner Center | Partner Center for Microsoft Cloud for US Government
How to update an existing customer service request that a Cloud Solution Provider has filed with Microsoft on the customer's behalf.
In Partner Center, this operation can be performed by first selecting a customer. Then, select Service requests on the left sidebar followed by selecting the service request in question. To finish, make the desired changes to the service request then select Submit.
Prerequisites
Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials only.
A service request ID.
C#
To update a customer's service request, call the IServiceRequestCollection.ById method with the service request ID to identify and return the service request interface. Then call the IServiceRequest.Patch or PatchAsync method to update the service request. To provide the updated values, create a new, empty ServiceRequest object and set only the property values that you want to change. Then pass that object in the call to the Patch or PatchAsync method.
// IAggregatePartner partnerOperations;
// ServiceRequest existingServiceRequest;
ServiceRequest updatedServiceRequest = partnerOperations.ServiceRequests.ById(existingServiceRequest.Id).Patch(new ServiceRequest
{
NewNote = note
});
Sample: Console test app. Project: Partner Center SDK Samples Class: UpdatePartnerServiceRequest.cs
REST request
Request syntax
Method | Request URI |
---|---|
PATCH | {baseURL}/v1/servicerequests/{servicerequest-id} HTTP/1.1 |
URI parameter
Use the following URI parameter to update the service request.
Name | Type | Required | Description |
---|---|---|---|
servicerequest-id | guid | Y | A GUID that identifies the service request. |
Request headers
For more information, see Partner Center REST headers.
Request body
The request body should contain a ServiceRequest resource. The only required values are those to be updated.
Request example
PATCH https://api.partnercenter.microsoft.com/v1/servicerequests/616122292874576 HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: f9a030bd-e492-4c1a-9c70-021f18234981
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
X-Locale: en-US
Content-Type: application/json
Host: api.partnercenter.microsoft.com
Content-Length: 508
Expect: 100-continue
{
"Id": null,
"Title": null,
"Description": null,
"Severity": "unknown",
"SupportTopicId": null,
"SupportTopicName": null,
"Status": "none",
"Organization": null,
"PrimaryContact": null,
"LastUpdatedBy": null,
"ProductName": null,
"ProductId": null,
"CreatedDate": "0001-01-01T00:00:00",
"LastModifiedDate": "0001-01-01T00:00:00",
"LastClosedDate": "0001-01-01T00:00:00",
"NewNote": {
"CreatedByName": null,
"CreatedDate": null,
"Text": "Sample Note"
},
"Notes": null,
"CountryCode": null,
"FileLinks": null,
"Attributes": {
"ObjectType": "ServiceRequest"
}
}
REST response
If successful, this method returns a Service Request resource with updated properties in the response body.
Response success and error codes
Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. For the full list, see Partner Center REST Error Codes.
Response example
HTTP/1.1 200 OK
Content-Length: 566
Content-Type: application/json; charset=utf-8
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
MS-RequestId: f9a030bd-e492-4c1a-9c70-021f18234981
MS-CV: rjLONPum/Uq94UQA.0
MS-ServerId: 030011719
Date: Mon, 09 Jan 2017 23:31:15 GMT
{
"title": "TrialSR",
"description": "Ignore this SR",
"severity": "critical",
"supportTopicId": "32444671",
"supportTopicName": "Cannot manage my profile",
"id": "616122292874576",
"status": "open",
"organization": {
"id": "3b33e682-00c3-41ee-9dd2-a548adf56438",
"name": "TEST_TEST_BugBash1"
},
"productId": "15960",
"createdDate": "2016-12-22T20:31:17.24Z",
"lastModifiedDate": "2017-01-09T23:31:15.373Z",
"lastClosedDate": "0001-01-01T00:00:00",
"notes": [{
"createdByName": "Account",
"createdDate": "2017-01-09T23:31:15.373",
"text": "Sample Note"
}
],
"attributes": {
"objectType": "ServiceRequest"
}
}