URL Routing
App’s (extension’s) viewport can be placed in several possible contexts, based on the type of the application:
- User context: Application can be displayed in a context without any e-shop ID or project ID defined.
- User ID is available through the designated API endpoint.
- E-shop context: Application can’t be displayed without an e-shop ID but can be displayed without any project ID.
- User ID is available through the designated API endpoint.
- E-shop ID is available in the current viewport’s URL.
- Project context: Application can’t be displayed without both e-shop ID and project ID.
- User ID is available through the designated API endpoint.
- E-shop ID is available in the current viewport’s URL.
- Project ID is also available in the current viewport’s URL.
URL Form
App’s (extension’s) primary viewport:
https://<your-extension-host>/[eshop/<eshopId>[/project/<projectId>]]
App’s widget viewport:
https://<your-extension-host>/widget/[eshop/<eshopId>[/project/<projectId>]]
Examples
App for eshops
MyEshopsApp is of type eshop, all these URLs are valid:
https://<your-extension-host>/eshop/123/project/456
https://<your-extension-host>/eshop/123
https://<your-extension-host>/widget/eshop/123/project/456
https://<your-extension-host>/widget/eshop/123
App for projects
MyProjectsApp is of type project, these URLs are valid:
https://<your-extension-host>/eshop/123/project/456
https://<your-extension-host>/widget/eshop/123/project/456
Behaviour of project app without having project ID specified in its URL is undefined.
https://<your-extension-host>/eshop/123
https://<your-extension-host>/widget/eshop/123
App for users
MyUsersApp is of type user, all these URLs are valid:
https://<your-extension-host>/eshop/123/project/456
https://<your-extension-host>/eshop/123
https://<your-extension-host>/
https://<your-extension-host>/widget/eshop/123/project/456
https://<your-extension-host>/widget/eshop/123
https://<your-extension-host>/widget/