Applies to: Nerdio Manager for MSP (NMM) Distributors
Available in v1.1.0+
This KB lists examples of some common API calls and responses.
/register
Claim a MSP partner's existing and future NMM installs in their Azure Subscription. This API is typically used when partner purchases NMM in your portal.
Example #1
A positive use-case, the typical flow when you have fed all the right values to the API call and get a 200 response since the API call was successful.
Example #2
A positive use-case, the typical flow when you have fed all the right values to the API call and get a 200 response since the API call was successful. This example shows the response when a partner has multiple Installs of NMM in the same Azure subscription. While this is a rare use-case, program your end to absorb multiple InstallIDs.
Example #3
A negative use-case, API response when NMM Installs are already claimed by another distributor.
Example #4
A negative use-case, API response when the APIKey is incorrect.
/invoices
Collect invoice information. This API is typically used for monthly billing.
Example #1
A positive use-case, the typical flow when you have fed all the right values to the API call and get a 200 response since the API call was successful.
Download the attached JSON file for the entire response. Scroll down to bottom of KB article and look for file named "response_usage.json".
A few things to note about the /usage API and response:
- Period start and end dates must be in the mm/dd/yyyy format.
- The response matches the invoice you see in the Mothership portal:
Nerdio Tip For the best understanding of the API response JSON, view the invoice in the Mothership portal first.
- Note the Type column in the invoice. Type indicates if line item is a chargeable item or a discount.
- The possible values for Type are:
- Desktop users: entries of this type indicate consumption in a specific account of your partner. Generally a partner will have multiple accounts. As a result, you will see multiple entries of type "Desktop users" for the same partner (install). For example, in this screenshot we see that the partner "Nerdio Amol Inc." has created NMM accounts for three customers:
In the API response JSON, use the Install ID to uniquely identify each partner: - Discount: entries of this type indicate a reduction in cost applied to a specific account or specific partner (install) or the invoice overall.
- Upcharge: entries of this type indicate charges for services besides desktop users. They are applied to the invoice overall (not at the individual account or install level). These entries are rare and listed here only to make you aware.
- Price control: entries of this type indicate a floor or ceiling applied to the invoice overall. For example, Nerdio may have a contractual arrangement to charge you a minimum of $1,000 per month. These entries are rare and listed here only to make you aware.
- Desktop users: entries of this type indicate consumption in a specific account of your partner. Generally a partner will have multiple accounts. As a result, you will see multiple entries of type "Desktop users" for the same partner (install). For example, in this screenshot we see that the partner "Nerdio Amol Inc." has created NMM accounts for three customers:
Example #2
A negative use-case, API response when usage information is not available for the specified period.
Note: the response code is a 200 and the response body is empty.
Example #3
A negative use-case, API response when date range is incorrect.
/reactivate
Unsuspend all installs in an Azure subscription. This API is typically used to remove the temporary halt for non-payment.
Example #1
A positive use-case, the typical flow when you have fed all the right values to the API call and get a 200 response since the API call was successful.
{ "subscriptionId": "ae51ae63-XXXXX-XXXXX-XXXX-0c7a1c93d3f2", "installIDs": [ "fcXXXXXXXXXXXX5068e5e7a" ] }
Example #2
A negative use-case, showcases the API response when you provide an incorrect value for a parameter.
Comments
Please sign in to leave a comment.