Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
anwendbar auf: Partnerzentrum | Partnerzentrum betrieben von 21Vianet | Partnerzentrum für die Microsoft-Cloud für die US-Regierung
Reaktiviert ein Abonnement , das zuvor wegen Nichtzahlung gesperrt wurde.
In Partner Center kann dieser Vorgang ausgeführt werden, indem Sie zuerst einen Kunden auswählen. Wählen Sie dann das betreffende Abonnement aus, das Sie umbenennen möchten. Um den Vorgang abzuschließen, wählen Sie die Schaltfläche Aktiv und dann Senden aus.
Voraussetzungen
Anmeldeinformationen wie unter Partner Center-Authentifizierung beschrieben. Dieses Szenario unterstützt die Authentifizierung mit eigenständigen App- und App+Benutzeranmeldeinformationen.
Eine Kunden-ID (
customer-tenant-id). Wenn Sie die Kunden-ID nicht kennen, können Sie sie im Partner Center nachschlagen, indem Sie den Arbeitsbereich Kunden auswählen, dann den Kunden aus der Kundenliste und anschließend Konto. Suchen Sie auf der Kontoseite des Kunden im Abschnitt Kundenkontoinfo nach der Microsoft-ID. Die Microsoft-ID ist identisch mit der Kunden-ID (customer-tenant-id).Eine Abonnement-ID.
C#
Um das Abonnement eines Kunden zu reaktivieren, rufen Sie zuerst das Abonnement ab und ändern Sie dann die Statuseigenschaft des Abonnements. Informationen zu Statuscodes finden Sie unter [SubscriptionStatus enumeration/dotnet/api/microsoft.store.partnercenter.models.subscriptions.subscriptionstatus). Nachdem die Änderung vorgenommen wurde, verwenden Sie Ihre IPartner.Customers-Auflistung , und rufen Sie die ById()- Methode auf. Rufen Sie dann die Subscriptions-Eigenschaft auf, gefolgt von der ById( )-Methode. Beenden Sie dann den Vorgang mit dem Aufruf der Patch()- Methode.
// IPartner partnerOperations;
// var selectedCustomer as Customer;
// var selectedSubscription as Subscription;
updatedSubscription = partnerOperations.Customers.ById(selectedCustomerId).Subscriptions.ById(selectedSubscription.Id).Patch(
new Subscription()
{
Status = SubscriptionStatus.Active
});
Beispiel: Konsolentest-App. Projekt: FeatureSamplesApplication. Klasse: UpdateSubscription
REST-Anforderung
Anforderungssyntax
| Methode | Anforderungs-URI |
|---|---|
| FLICKEN | {baseURL}/v1/customers/{customer-tenant-id}/subscriptions/{id-for-subscription} HTTP/1.1 |
URI-Parameter
In dieser Tabelle sind die erforderlichen Abfrageparameter aufgeführt, um das Abonnement zu reaktivieren.
| Name | Typ | Erforderlich | BESCHREIBUNG |
|---|---|---|---|
| Kunden-Mieter-ID | GUID | Ja | Eine GUID für den Kunden. |
| ID für Abonnement | GUID | Ja | Eine GUID für das Abonnement |
Anforderungsheader
Weitere Informationen finden Sie unter Partner Center REST-Header.
Anfragekörper
Im Anforderungstext ist eine vollständige Abonnement-Ressource erforderlich. Stellen Sie sicher, dass die Status-Eigenschaft aktualisiert wurde.
Beispielanfrage
PATCH https://api.partnercenter.microsoft.com/v1/customers/<customer-tenant-id>/subscriptions/<id-for-subscription> HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: ca7c39f7-1a80-43bc-90d8-ee7d1cad3831
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
Content-Type: application/json
Content-Length: 1029
Expect: 100-continue
Connection: Keep-Alive
{
"Id": "83ef9d05-4169-4ef9-9657-0e86b1eab1de",
"FriendlyName": "nickname",
"Quantity": 2,
"UnitType": "none",
"ParentSubscriptionId": null,
"CreationDate": "2015-11-25T06:41:12Z",
"EffectiveStartDate": "2015-11-24T08:00:00Z",
"CommitmentEndDate": "2016-12-12T08:00:00Z",
"Status": "active",
"AutoRenewEnabled": false,
"BillingType": "none",
"PartnerId": null,
"ContractType": "subscription",
"OrderId": "6183db3d-6318-4e52-877e-25806e4971be",
"Attributes": {
"Etag": "<etag>",
"ObjectType": "Subscription"
}
}
Anforderungsbeispiel für neuen Commerce
PATCH https://api.partnercenter.microsoft.com/v1/customers/<customer-tenant-id>/subscriptions/<id-for-subscription> HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 35163960-06c5-4677-9200-7e3b0cc1bb6e
MS-CorrelationId: bbbb1111-cc22-3333-44dd-555555eeeeee
Content-Type: application/json
Content-Length: 1029
Expect: 100-continue
Connection: Keep-Alive
{
"id": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"offerId": "CFQ7TTC0LH18:0001:CFQ7TTC0P0WS",
"offerName": "Microsoft 365 Business Basic",
"friendlyName": "Microsoft 365 Business Basic",
"productType": {
"id": "OnlineServicesNCE",
"displayName": "OnlineServicesNCE"
},
"quantity": 2,
"unitType": "Licenses",
"hasPurchasableAddons": false,
"creationDate": "2024-06-05T19:26:38.3667635Z",
"effectiveStartDate": "2024-06-05T00:00:00Z",
"commitmentEndDate": "2024-07-04T00:00:00Z",
"commitmentEndDateTime": "2024-07-04T23:59:59Z",
"cancellationAllowedUntilDate": "2024-06-12T19:27:03.440527Z",
"billingCycleEndDate": "2024-07-04T00:00:00Z",
"billingCycleEndDateTime": "2024-07-04T23:59:59Z",
"status": "active", // original value is "suspended”
"autoRenewEnabled": false,
"isTrial": false,
"billingType": "license",
"billingCycle": "monthly",
"termDuration": "P1M",
"renewalTermDuration": "",
"isMicrosoftProduct": true,
"partnerId": "",
"attentionNeeded": false,
"actionTaken": false,
"contractType": "subscription",
"links": {
"product": {
"uri": "/products/CFQ7TTC0LH18?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/CFQ7TTC0LH18/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/CFQ7TTC0LH18/skus/0001/availabilities/CFQ7TTC0P0WS?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/customers/a2ce50db-e1d9-4b3b-aa75-6de2bfcdd752/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"method": "GET",
"headers": []
}
},
"publisherName": "Microsoft Corporation",
"orderId": "79d9f5e2f43a",
"attributes": {
"objectType": "Subscription"
}
}
REST-Antwort
Bei erfolgreicher Ausführung gibt diese Methode aktualisierte Eigenschaften der Abonnementressource im Antworttext zurück.
Antworterfolgs- und Fehlercodes
Jede Antwort enthält einen HTTP-Statuscode, der Erfolg oder Fehler sowie zusätzliche Debuginformationen angibt. Verwende ein Tool für die Netzwerkablaufverfolgung, um diesen Code, den Fehlertyp und zusätzliche Parameter zu lesen. Die vollständige Liste findest du unter Fehlercodes.
Antwortbeispiel
PATCH https://api.partnercenter.microsoft.com/v1/customers/<customer-tenant-id>/subscriptions/<subscriptionID> HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-Contract-Version: v1
MS-RequestId: ca7c39f7-1a80-43bc-90d8-ee7d1cad3831
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
Content-Type: application/json
Content-Length: 1029
Expect: 100-continue
Connection: Keep-Alive
{
"Id": "83ef9d05-4169-4ef9-9657-0e86b1eab1de",
"FriendlyName": "nickname",
"Quantity": 2,
"UnitType": "none",
"ParentSubscriptionId": null,
"CreationDate": "2015-11-25T06:41:12Z",
"EffectiveStartDate": "2015-11-24T08:00:00Z",
"CommitmentEndDate": "2016-12-12T08:00:00Z",
"Status": "active",
"AutoRenewEnabled": false,
"BillingType": "none",
"PartnerId": null,
"ContractType": "subscription",
"Links": {
"Offer": {
"Uri": "/v1/offers/0CCA44D6-68E9-4762-94EE-31ECE98783B9",
"Method": "GET",
"Headers": []
},
"Entitlement": {
"Uri": "/entitlements?key=<key>",
"Method": "GET",
"Headers": []
},
"Self": {
"Uri": "/subscriptions?key=<key>",
"Method": "GET",
"Headers": []
}
},
"OrderId": "6183db3d-6318-4e52-877e-25806e4971be",
"Attributes": {
"Etag": "<etag>",
"ObjectType": "Subscription"
}
}
Antwortbeispiel für neuen Handel
PATCH https://api.partnercenter.microsoft.com/v1/customers/<customer-tenant-id>/subscriptions/<id-for-subscription> HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 35163960-06c5-4677-9200-7e3b0cc1bb6e
MS-CorrelationId: bbbb1111-cc22-3333-44dd-555555eeeeee
Content-Type: application/json
Content-Length: 1029
Expect: 100-continue
Connection: Keep-Alive
{
"id": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"offerId": "CFQ7TTC0LH18:0001:CFQ7TTC0P0WS",
"offerName": "Microsoft 365 Business Basic",
"friendlyName": "Microsoft 365 Business Basic",
"productType": {
"id": "OnlineServicesNCE",
"displayName": "OnlineServicesNCE"
},
"quantity": 2,
"unitType": "Licenses",
"hasPurchasableAddons": false,
"creationDate": "2024-06-05T19:26:38.3667635Z",
"effectiveStartDate": "2024-06-05T00:00:00Z",
"commitmentEndDate": "2024-07-04T00:00:00Z",
"commitmentEndDateTime": "2024-07-04T23:59:59Z",
"cancellationAllowedUntilDate": "2024-06-12T19:27:03.440527Z",
"billingCycleEndDate": "2024-07-04T00:00:00Z",
"billingCycleEndDateTime": "2024-07-04T23:59:59Z",
"status": "active",
"autoRenewEnabled": false,
"isTrial": false,
"billingType": "license",
"billingCycle": "monthly",
"termDuration": "P1M",
"renewalTermDuration": "",
"isMicrosoftProduct": true,
"partnerId": "",
"attentionNeeded": false,
"actionTaken": false,
"contractType": "subscription",
"links": {
"product": {
"uri": "/products/CFQ7TTC0LH18?country=US",
"method": "GET",
"headers": []
},
"sku": {
"uri": "/products/CFQ7TTC0LH18/skus/0001?country=US",
"method": "GET",
"headers": []
},
"availability": {
"uri": "/products/CFQ7TTC0LH18/skus/0001/availabilities/CFQ7TTC0P0WS?country=US",
"method": "GET",
"headers": []
},
"self": {
"uri": "/customers/a2ce50db-e1d9-4b3b-aa75-6de2bfcdd752/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"method": "GET",
"headers": []
}
},
"publisherName": "Microsoft Corporation",
"refundableQuantity": {
"totalQuantity": 1,
"details": [
{
"quantity": 1,
"allowedUntilDateTime": "2024-06-14T17:41:13.4675407Z"
}
]
},
"orderId": "79d9f5e2f43a",
"attributes": {
"objectType": "Subscription"
}
}