Create a transfer for new commerce using Partner Center REST APIs

Partners can transfer new commerce subscriptions from one transacting partner to another. A target partner creates the transfer request. The source partner updates the transfer with line item details. This topic explains the API a target partner would call to create the transfer request. This topic is only relevant for Azure Plan reservations, savings plans and subscriptions and new commerce license-based subscriptions. More valuable information can be found in the subscriptions transfer documentation.

Prerequisites

  • Credentials as described in Partner Center authentication. This scenario supports authentication with both standalone App and App+User credentials.

  • A customer ID (customer-tenant-id). If you don't know the customer's ID, you can look it up in Partner Center by selecting the Customers workspace, then the customer from the customer list, then Account. On the customer’s Account page, look for the Microsoft ID in the Customer Account Info section. The Microsoft ID is the same as the customer ID (customer-tenant-id).

  • Appropriate roles: Global admin | Admin agent | Sales agent

REST request

Request syntax

Method Request URI
POST {baseURL}/v1/customers/{customer-id}/transfers HTTP/1.1

URI parameter

Use the following path parameter to identify the customer.

Name Type Required Description
customer-id string Yes A GUID formatted customer-id that identifies the customer.

Request headers

For more information, see Partner Center REST headers.

Request body

This table describes the TransferEntity properties in the request body for creating a new commerce transfer request.

Property Type Required Description
sourcePartnerTenantId string Yes A GUID formatted partner-id that identifies the partner initiating the transfer.
sourcePartnerName string No Optional. The name of the partner's organization who is initiating the transfer.
customerEmailId string Yes A string of the customer to receive notifications of the transfer creation.
customerName string No Optional. The name of the customer whose subscriptions are being transferred.
targetPartnerEmailId string Yes A GUID formatted partner-id that identifies the partner to whom the transfer is targeted.
transferType string Yes A string defining type of transfer. NewCommerce should be used for Azure plan and new commerce license-based subscriptions.

Request example

{
    "id": "43fb1d3a-79fe-45a9-863e-9a4acf17b630",
    "status": "InProgress",
    "transferType": 3,
    "customerEmailId": "",
    "createdTime": "2024-04-30T18:31:41.5133355Z",
    "lastModifiedTime": "2024-05-01T00:51:55Z",
    "expirationTime": "2024-05-31T00:00:00Z",
    "customerName": "ipdbtrans2",
    "customerTenantId": "a624f7f8-408b-4900-9320-df79e56bed55",
    "partnertenantid": "a94dcde1-ecd7-4ace-a6ef-ef73ba6b8ba5",
    "sourcePartnerName": "Test_Test_IP4_AG",
    "sourcePartnerTenantId": "a94dcde1-ecd7-4ace-a6ef-ef73ba6b8ba5",
    "targetPartnerName": "Test_Test_DB_AG",
    "targetPartnerTenantId": "817512a1-0689-47a0-bbf2-a7f11ae1fc11",
    "targetPartnerEmailId": "817512a1-0689-47a0-bbf2-a7f11ae1fc11",
    "transferDirection": 2,
    "ignoreEligibilityCheck": false,
    "lastModifiedUser": "1671774b-679f-4543-a152-1f8b14006c0e",
    "lineItems": [{
        "id": 0,
        "subscriptionId": "d0df8837-6db3-49d8-c2b3-1d94bc1ab42d",
        "billingCycle": "unknown",
        "quantity": 0,
        "productType": 5,
        "status": "InProgress"
    }],
    "links": {
        "self": {
            "uri": "/customers/a624f7f8-408b-4900-9320-df79e56bed55/transfers/43fb1d3a-79fe-45a9-863e-9a4acf17b630",
            "method": "GET",
            "headers": []
        }
    }
}

REST response

If successful, this method returns the populated TransferEnity resource in the response body.

Response success and error codes

Each response comes with an HTTP status code that indicates success or failure and more debugging information. Use a network trace tool to read this code, error type, and more parameters. For the full list, see Error Codes.

Response example

HTTP/1.1 201 Created
Content-Length: 138
Content-Type: application/json; charset=utf-8
MS-RequestId: 4fa6dad6-a89f-4875-8247-7294a10ae1cf
MS-CorrelationId: 0e93c70c-977c-4a88-9580-7cf084c73286
X-Locale: en-US,en-US

{
"id": "43fb1d3a-79fe-45a9-863e-9a4acf17b630",
"status": "Pending",
"transferType": 3,
"customerEmailId": "",
"createdTime": "2024-04-30T18:31:41.5133355Z",
"lastModifiedTime": "2024-04-30T18:31:41Z",
"expirationTime": "2024-05-31T00:00:00Z",
"customerName": "ipdbtrans2",
"customerTenantId": "a624f7f8-408b-4900-9320-df79e56bed55",
"partnertenantid": "817512a1-0689-47a0-bbf2-a7f11ae1fc11",
"sourcePartnerName": "Test_Test_IP4_AG",
"sourcePartnerTenantId": "a94dcde1-ecd7-4ace-a6ef-ef73ba6b8ba5",
"targetPartnerName": "Test_Test_DB_AG",
"targetPartnerTenantId": "817512a1-0689-47a0-bbf2-a7f11ae1fc11",
"targetPartnerEmailId": "817512a1-0689-47a0-bbf2-a7f11ae1fc11",
"transferDirection": 1,
"ignoreEligibilityCheck": false,
"lastModifiedUser": "7ffdaa28-3b1c-4a61-b580-e1aa6ecf833c",
"links": {
    "self": {
        "uri": "/customers/a624f7f8-408b-4900-9320-df79e56bed55/transfers/43fb1d3a-79fe-45a9-863e-9a4acf17b630",
        "method": "GET",
        "headers": []
    }
}
}