Get a self-serve policy by ID

Gets the specified self-serve policy using its ID.

Prerequisites

  • Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials.
  • A self-serve policy ID.

Examples

REST Request

Request syntax

Method Request URI
GET {baseURL}/v1/SelfServePolicy/{id} HTTP/1.1

URI parameter

Use the following path parameters to get the specified product.

Name Type Required Description
SelfServePolicy-id string Yes A string that identifies the self-serve policy.

Request headers

  • For more information, see Headers.

Request body

None.

Request example

GET https://api.partnercenter.microsoft.com/v1/SelfServePolicy/634f6379-ad54-449b-9821-564f737158ab_0431a72c-7d8a-4393-b25e-ef63f5efb415 HTTP/1.1
Authorization: Bearer  <token>
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533

REST response

If successful, the response body contains a SelfServePolicy resource.

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 error codes.

This method returns the following error codes:

HTTP Status Code Error code Description
404 600039 Self-serve policy not found.

Response example

HTTP/1.1 200 OK
Content-Length: 1918
Content-Type: application/json
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533
MS-RequestId: ac943950-ba3d-47a0-bd2a-c5617a7fefe8
Date: Tue, 23 Jan 2018 23:13:01 GMT

{
    "id": "634f6379-ad54-449b-9821-564f737158ab_0431a72c-7d8a-4393-b25e-ef63f5efb415",
    "selfServeEntity": {
        "selfServeEntityType": "customer",
        "tenantID": "0431a72c-7d8a-4393-b25e-ef63f5efb415"
    },
    "grantor": {
        "grantorType": "billToPartner",
        "tenantID": "634f6379-ad54-449b-9821-564f737158ab"
    },
    "permissions": [
        {
            "resource": "AzureReservedInstances",
            "action": "Purchase"
        },
        {
            "resource": "AzureSavingsPlan",
            "action": "Purchase"
        }
    ],
    "attributes": {
        "etag": "\"933523d1-3f63-4fc3-8789-5e21c02cdaed\"",
        "objectType": "SelfServePolicy"
    }
}