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: Admin 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 | Yes | 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. |
targetPartnerTenantId | string | No | A GUID formatted partner tenant ID that identifies the partner to whom the transfer is targeted. The partner authorization context resolves to the partner tenant ID if omitted. |
targetPartnerEmailId | string | No | A GUID formatted partner tenant ID that identifies the partner to whom the transfer is targeted. The partner authorization context resolves to the partner tenant ID if omitted. |
transferType | string | Yes | A string defining type of transfer. 3 represents NewCommerce and 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": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"partnertenantid": "a94dcde1-ecd7-wace-a6ef-ef73ba6b8ba5",
"sourcePartnerName": "Test_Test_IP4_AG",
"sourcePartnerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"targetPartnerName": "Test_Test_DB_AG",
"targetPartnerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"targetPartnerEmailId": "817512d3-0689-47a0-bbf2-a7f11ae1fc11",
"transferDirection": 2,
"ignoreEligibilityCheck": false,
"lastModifiedUser": "1671774b-679f-4543-a152-1f8b14006c0e",
"lineItems": [{
"id": 0,
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"billingCycle": "unknown",
"quantity": 0,
"productType": 5,
"status": "InProgress"
}],
"links": {
"self": {
"uri": "/customers/aaaabbbb-0000-cccc-1111-dddd2222eeee/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: aaaa0000-bb11-2222-33cc-444444dddddd
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": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"partnertenantid": "817512d3-0689-47a0-bbf2-a7f11ae1fc11",
"sourcePartnerName": "Test_Test_IP4_AG",
"sourcePartnerTenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"targetPartnerName": "Test_Test_DB_AG",
"targetPartnerTenantId": "817512d3-0689-47a0-bbf2-a7f11ae1fc11",
"targetPartnerEmailId": "817512d3-0689-47a0-bbf2-a7f11ae1fc11",
"transferDirection": 1,
"ignoreEligibilityCheck": false,
"lastModifiedUser": "7ffdaa28-3b1c-4a61-b580-e1aa6ecf833c",
"links": {
"self": {
"uri": "/customers/aaaabbbb-0000-cccc-1111-dddd2222eeee/transfers/43fb1d3a-79fe-45a9-863e-9a4acf17b630",
"method": "GET",
"headers": []
}
}
}