For you to start using the AppNotch API for multi-tenant, you need few things setup before even going through this document, first you need to contact AppNotch to be able to publish a live (public/private) Multi-Tenant App, once the app is live and ready to be used by the API, AppNotch will then give you four properties that you will need in order for you to start calling the API endpoints.
For you to start using the AppNotch API for multi-tenant, this flow diagram will help you to easily
understand the multi-tenant feature and its implementation.
For you to start calling the AppNotch API endpoints, you need to generate your own JWT and include your generated token on your call to the API endpoints. you can take a look at our C# implementation of our API to understand how we generate the JWT Token dynamically here in GitHub
This call will allow the users to create their tenant using the API, to get more information about this endpoint click here
to see the documentation.
{ "appId": <MASTER APP ID>, "displayName": "Bob's Plumbing", "iconUrl": "http://imagehosting.com/AGOEN32SDSAE392DSAJ", "splashUrl": "http://imagehosting.com/AOEUHGDEG832KGd", "url": "http://bobdoesplumbing.com/", "disabled": false, "hidden": false, "displayOrder": 4, "description": null, "firstName": "First Name", "lastName": "Last Name", "phone": "222-111-4444", "supportEmail": "sample@test.com", "supportSite": "http:mysupportsite.com", "footer": {}, "tag": "My Custom Tag", "socialDescription": "My Social Description usually set by the master app", "rollOverId": 0 }
{ "id": <TENANT ID>, "appId": <MASTER APP ID>, "firstName": "First Name", "lastName": "Last Name", "phone": "222-111-4444", "supportEmail": "sample@test.com", "supportSite": "http:mysupportsite.com", "footer": {}, "tag": "My Custom Tag", "socialDescription": "My Social Description usually set by the master app", "displayName": "Bob's Plumbing", "iconUrl": "http://imagehosting.com/AGOEN32SDSAE392DSAJ", "splashUrl": "http://imagehosting.com/AOEUHGDEG832KGd", "url": "http://bobdoesplumbing.com", "disabled": false, "hidden": false, "displayOrder": 4, "createDate": "2017-04-29T15:11:24.8336543Z", "footerUrl": "http://app.appnotch.com/converter/footer/tenant/412", "shareContent": "https://a2bc.app.link/ag7GFe26dE", "branchUrl": "https://a2bc.app.link/ag7GFe26dE", "description": "Some description regarding the tenant app" }
Code | Desciption |
---|---|
400 |
Bad Request :
|
403 |
Forbidden :
You do not have access to call this endpoint, contact AppNotch to check the configuration of your
api credentials.
|
404 |
Not Found :
The App that you are trying to create this Tenant does not exists.
|
409 |
Conflict :
Another tenant exists with the same url under the Master App.
|
This call will create a new Tenant Member (Admin for the Tenant), so that they can login to Tenant Dashboad and be able to
modify their app themselves, or send in push notifications.
{ "email": "sample@email.com", "password": "myPassword", "createdBy": <IDENTITY ID>, "name": "My Name", "phoneNumber": "222-111-5555" }
{ "id": 1, "email": "sample@email.com", "createdBy": <IDENTITY ID>, "name": "My Name", "phoneNumber": "222-111-5555" }
Code | Desciption |
---|---|
400 |
Bad Request :
|
403 |
Forbidden :
You do not have access to call this endpoint, contact AppNotch to check the configuration of your
api credentials.
|
409 |
Conflict :
Member with the given email address already exists
|
This call will associate a Tenant Member to a Tenant. when the association is completed, the tenant app will then be listed in his/her Tenant Dashboard.
{ "id": 1, "email": "sample@email.com", "createdBy": <IDENTITY ID>, "name": "My Name", "phoneNumber": "222-111-5555" }
Code | Desciption |
---|---|
404 |
Not Found :
|
403 |
Forbidden :
You do not have access to call this endpoint, contact AppNotch to check the configuration of your
api credentials.
|
409 |
Conflict :
Member has already access to this tenant.
|
Other end-points that you might be interested in using, This allows api users to Get/Send push notification to an existing Tenant.
This call will get all the push notification specific to the app.
[ { "id": 34, "title": "Welcome to our app", "url": "", "message": "Use the Coupon Code APP2016 to get $10 off you purchase.", "dateSent": "2017-04-26T18:19:58.7502416Z", "isGeo": false, "previewerOnly": true, "isExternalLink": false, "mediaImage": null }, { "id": 42, "title": "Save a Ton with This Coupon!", "url": "http://www.appnotch.com/CouponCodeGenerator", "message": "Use the Coupon Code ABC123 For a 20% Discount this week only!", "dateSent": "2017-05-04T18:19:58.7507424Z", "isGeo": false, "previewerOnly": false, "isExternalLink": false, "mediaImage": null }, { "id": 45, "title": "We have a new location near you!", "url": "http://www.mystore.com/stlouislocation/", "message": "St Louisians, There is a new Store Located in Soulard", "dateSent": "2017-05-06T18:19:58.7507424Z", "isGeo": true, "previewerOnly": false, "isExternalLink": false, "mediaImage": null } ]
Code | Desciption |
---|---|
403 |
Forbidden :
You do not have access to call this endpoint, contact AppNotch to check the configuration of your
api credentials.
|
404 |
Not Found :
|
This call will send a push notification directly to the app and will be recieved by the end-users who installs the app.
{ "title": "Testing The Previewer", "message": "This is a Test push to Make sure this is working...", "url": "", "previewerOnly": true, "isExternalLink": false }
{ "id": 34, "title": "Welcome to our app", "url": "", "message": "Use the Coupon Code APP2016 to get $10 off you purchase.", "dateSent": "2017-04-26T18:06:13.8778073Z", "isGeo": false, "previewerOnly": true, "isExternalLink": false, "mediaImage": null }
Code | Desciption |
---|---|
400 |
Bad Request :
If any of the required properties is not set
|
403 |
Forbidden :
You do not have access to call this endpoint, contact AppNotch to check the configuration of your
api credentials.
|
404 |
Not Found :
|
This call will get all the push notification specific to tenant.
[ { "id": 34, "title": "Welcome to our app", "url": "", "message": "Use the Coupon Code APP2016 to get $10 off you purchase.", "dateSent": "2017-04-26T18:19:58.7502416Z", "isGeo": false, "previewerOnly": true, "isExternalLink": false, "mediaImage": null }, { "id": 42, "title": "Save a Ton with This Coupon!", "url": "http://www.appnotch.com/CouponCodeGenerator", "message": "Use the Coupon Code ABC123 For a 20% Discount this week only!", "dateSent": "2017-05-04T18:19:58.7507424Z", "isGeo": false, "previewerOnly": false, "isExternalLink": false, "mediaImage": null }, { "id": 45, "title": "We have a new location near you!", "url": "http://www.mystore.com/stlouislocation/", "message": "St Louisians, There is a new Store Located in Soulard", "dateSent": "2017-05-06T18:19:58.7507424Z", "isGeo": true, "previewerOnly": false, "isExternalLink": false, "mediaImage": null } ]
Code | Desciption |
---|---|
403 |
Forbidden :
You do not have access to call this endpoint, contact AppNotch to check the configuration of your
api credentials.
|
404 |
Not Found :
|
This call will send a push notification directly to the tenant and will be recieved by the end-users who installs the app.
{ "title": "Testing The Previewer", "message": "This is a Test push to Make sure this is working...", "url": "", "previewerOnly": true, "isExternalLink": false }
{ "id": 34, "title": "Welcome to our app", "url": "", "message": "Use the Coupon Code APP2016 to get $10 off you purchase.", "dateSent": "2017-04-26T18:06:13.8778073Z", "isGeo": false, "previewerOnly": true, "isExternalLink": false, "mediaImage": null }
Code | Desciption |
---|---|
400 |
Bad Request :
If any of the required properties is not set
|
403 |
Forbidden :
You do not have access to call this endpoint, contact AppNotch to check the configuration of your
api credentials.
|
404 |
Not Found :
|