Forum Discussion

ztzsws1's avatar
ztzsws1
Copper Contributor
Nov 12, 2024

How can I get private offer info base on subscription Id?

When a customer places an order using a private offer link and the Landing Page is configured, I can obtain the current SubscriptionId.

However, when I use this subscriptionId to get the subscription detail (https://marketplaceapi.microsoft.com/api/saas/subscriptions/{subscriptionId}?api-version=2018-08-31), the returned offerId is the public offerId,  NOT the private offerId. How can I obtain the private offerId? Or where did I go wrong?  

In fact, I want to obtain the price information set for the private offer using the private offerId. 

Thank you!

{
    "id": "test",
    "publisherId": "publisherId",
    "offerId": "public_offer_id",
    "name": "name",
    "saasSubscriptionStatus": "Subscribed",
    "beneficiary": {
        "emailId": "",
        "objectId": "",
        "tenantId": "",
        "puid": ""
    },
    "purchaser": {
        "emailId": "",
        "objectId": "",
        "tenantId": "",
        "puid": ""
    },
    "planId": "planId",
    "term": {
        "startDate": "2024-07-18T00:00:00Z",
        "endDate": "2025-07-17T00:00:00Z",
        "termUnit": "P1Y"
    },
    "autoRenew": true,
    "isTest": false,
    "isFreeTrial": false,
    "allowedCustomerOperations": [
        "Delete",
        "Read",
        "Update"
    ],
    "sandboxType": "None",
    "created": "2024-07-18",
    "lastModified": "0001-01-01T00:00:00",
    "quantity": 4,
    "sessionMode": "None"
}

 

Resources