Submit a request

Nerdio Help Center

NMM Distributor API - examples


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.

mceclip16.png

mceclip17.png

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.

mceclip18.png

mceclip20.png

Example #3

A negative use-case, API response when NMM Installs are already claimed by another distributor.

mceclip21.png

mceclip22.png

Example #4

A negative use-case, API response when the APIKey is incorrect.

mceclip23.png

mceclip24.png

 

/usage

Collect consumption 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.

mceclip8.png

mceclip9.png

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:

  1. Period start and end dates must be in the mm/dd/yyyy format.
  2. The response matches the invoice you see in the Mothership portal:
    mceclip10.png
    Nerdio Tip For the best understanding of the API response JSON, view the invoice in the Mothership portal first.
     
  3. Note the Type column in the invoice. Type indicates if line item is a chargeable item or a discount.
    mceclip11.png
  4. The possible values for Type are:
    1. 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:
      mceclip12.png
      In the API response JSON, use the Install ID to uniquely identify each partner:
      mceclip13.png
    2. Discount: entries of this type indicate a reduction in cost applied to a specific account or specific partner (install) or the invoice overall.
    3. 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.
    4. 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.

Example #2

A negative use-case, API response when usage information is not available for the specified period.

mceclip6.png

mceclip7.png

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.

mceclip14.png

mceclip15.png

 

/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.

mceclip0.png

mceclip2.png

{ "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.

mceclip3.png

mceclip5.png

Was this article helpful?
0 out of 0 found this helpful

Comments

Please sign in to leave a comment.