Reply
New Member
Posts: 34
Registered: ‎12-13-2017
Kudos: 27

Re: UCRM API

Is it possible to interact with the API with client 'userIdent' as apposed to the client 'id'? For either pulling down data, or posting data like payments etc.

Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

@kysevenle no, always the system ID must be used in API - this works for all entities. However, you can use this API endpoint for client look up based on userIdent (Custom ID). Then, when the the client is retrieved, you can use other API calls with the proper client ID.
https://ucrm.docs.apiary.io/#reference/clients/clients/get
Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

@Brandon-W this sounds good, we could enhance the API to allow this. However, please create a new feature request to help us prioritize this. https://community.ubnt.com/t5/UCRM-Feature-Requests/idb-p/UCRM-Ideas
Emerging Member
Posts: 116
Registered: ‎03-19-2018
Kudos: 18
Solutions: 4

Re: UCRM API

[ Edited ]

Thank you @UBNT-Petr I've submitted the feature request.

 

 

https://community.ubnt.com/t5/UCRM-Feature-Requests/Charge-with-Stripe-via-API/idi-p/2302845

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Emerging Member
Posts: 116
Registered: ‎03-19-2018
Kudos: 18
Solutions: 4

Re: UCRM API

[ Edited ]

What is the currencyId for on a payment plan?

 

And is it possible to create a "linked subscription" via the api?

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

[ Edited ]

@Brandon-W please find the currency list attached below but note, that the API enables to create only IPpay subscriptions so far. The purpose of this is mostly for migrating existing subscriptions from other crm tools.

 

We will make it more clear in the apiary docs. 

 

Can you describe how and for what purposes you want to create subscriptions via API?

Emerging Member
Posts: 116
Registered: ‎03-19-2018
Kudos: 18
Solutions: 4

Re: UCRM API

Thank you @UBNT-Petr

 

As I mentioned previously, I have created a frontend "checkout" of sorts that allows a user to create a client, schedule a job and select a service. The ideal situation would be for the checkout to create a subscription for the service automatically instead of requiring the extra step of logging into UCRM to make the payment.

 

I have a plugin I've been developing to act as the middleware for the frontend application to submit info to UCRM. The plugin will accept a stripe token and can setup the client/subscription in stripe, and I believe it will be able to create a subscription in UCRM as well, if it is indeed referred to as "payment plan" on the API. But currently if you go into the UCRM admin there is a notification upon creating a subscription (since I have custom subscriptions turned off) that says "You are creating linked subscription. The amount will be changed automatically, when the service price changes." And I wasn't sure if this feature applies to a subscription created via the api.

 

If not, this means the subscription will have to be updated to match changes to the service manually. Which would not be ideal.

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

@Brandon-W ok, understand. If you are able to create the subscription on your own and then pass the information about the subscription to UCRM, this could work and we could extend the API to allow this.

However, this is the current state:
- this API endpoint works only for creating IPpay subscriptions (https://ucrm.docs.apiary.io/#reference/payment-plans/clientspayment-plans/post)
- and this is only for "custom subscriptions"
- if you want to add Stripe "Linked subscription" into UCRM via API, you would need to pass the client's ServiceId to let UCRM know which service should be linked with the subscription

... please create a feature request for this, and post its link here. It will help us to prioritize this request.
Emerging Member
Posts: 116
Registered: ‎03-19-2018
Kudos: 18
Solutions: 4

Re: UCRM API

Feature request submitted. https://community.ubnt.com/t5/UCRM-Feature-Requests/API-Linked-Subscriptions/idi-p/2330968

 

This would be tremendously helpful, hope it can be implemented soon, otherwise I think I'll look into setting up a script to handle syncing payment plans and services for the time being.

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

Thanks, we will triage that. Ping us later for update if you wish.
New Member
Posts: 1
Registered: ‎05-02-2018

Re: UCRM API

Hello.  Is it possible to get the IP address of a site device (such as an AP) using the API?  The /devices and device-interfaces endpoints don't seem to include this, although it's there in the web interface.  Maybe I'm missing something obvious; can you help?

 

Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

@sloach we will look into that. You can also consider using UNMS which is more convenient for network management and network data.
Emerging Member
Posts: 116
Registered: ‎03-19-2018
Kudos: 18
Solutions: 4

Re: UCRM API

[ Edited ]

I'm using 2.11.0-beta3 and the endpoint that works for GET and POST on payment plans is /payment-plans but the api docs https://ucrm.docs.apiary.io/#reference/payment-plans/clientspayment-plans/post says it should be /clients/payment-plans

 

I'm not sure if this is a problem or if the docs just need to be updated. Thought I should mention that /clients/payment-plans returns a 404

 

Also, is there an ETA on when other payment plans can be added? Like Stripe? It seems a bit odd that IPPay is the only option to the api when stripe is already available for creation within the admin.

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Highlighted
Ubiquiti Employee
Posts: 989
Registered: ‎03-21-2016
Kudos: 153
Solutions: 116

Re: UCRM API

Hello @Brandon-W, the URL in docs was wrong, thank you for reporting it, it's now fixed.

Member
Posts: 347
Registered: ‎03-02-2017
Kudos: 79
Solutions: 3

Re: UCRM API

[ Edited ]

@UBNT-Petr@UBNT-Ondra
do you have any more useful documentation referring to the ucrm api here https://ucrm.docs.apiary.io

 

Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

@ZipVault are you looking for something specific?
This is the API doc for stable version: https://ucrm.docs.apiary.io
for beta version: https://ucrmbeta.docs.apiary.io/#

and some explanation and example can be found in our knowledge base: https://help.ubnt.com/hc/en-us/articles/115003906007-UCRM-API-Usage
New Member
Posts: 34
Registered: ‎12-13-2017
Kudos: 27

Re: UCRM API

Could you provide an api endpoint that returns all service devices in one call similar to how you can get all service, or clients in one call?

Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

@kysevenle for now, we don't plan to extend this part of API as it will be refactored soon after the integration with UNMS but ou can get the data you need using 2 calls instead of 1.
Emerging Member
Posts: 116
Registered: ‎03-19-2018
Kudos: 18
Solutions: 4

Re: UCRM API

@UBNT-Petr is there an ETA for linked subscriptions and different payment plan types via the API?

HTML, SCSS, Javascript(Ember.js), Ruby(Ruby on Rails), PHP
Ubiquiti Employee
Posts: 2,982
Registered: ‎12-10-2015
Kudos: 1053
Solutions: 239

Re: UCRM API

@Brandon-W, unfortunately, no ETA still. Your feature requests sound good and we hope, that we will find some resources to implement it someday but it would be great to get more votes for the requests. Until then we need to focus on features desperately requested by more users. Thanks for understanding.
Reply