Skip to content

Portals ​

Overview ​

A portal (brand portal) is a DamInstance row in dam_instances: the external site a workspace uses to distribute assets to partners. Each portal has a brand_name, a url (a slug on the shared portal frontend, or a custom domain when is_domain = 1), logo, favicon, JSON settings, is_slider, is_active and is_public_portal. A workspace can have up to workspaces.max_instances portals.

Partners are DealerUsers (the dam-api guard). Access to a portal is a DamInstancesUsers row with instance_status = 1. What a partner sees is controlled per portal by DamInstancePermission rows on assets, folders and collages:

visibilityMeaning
0Public: shown in this portal
1Private
2Protected: folder is navigable because something beneath it is public, but not published itself
no rowPrivate

The rules live in App\Services\DAM\FolderVisibilityRecalculator, which change-permission, move, folder delete, archive and restore use to recompute ancestor folders deepest first.

Admin API (/api/v1/digital-assets/instance/*, tile/*, permission/*, dealer/*) manages portals. The Portal API (/dam/v1) serves them to partners. Portal login is covered in Authentication.

Endpoints ​

Admin API (/api/v1/digital-assets) ​

MethodPathController@methodPurpose
GET/instance/get, /instance/instance-list, /instance/detailDamInstanceController@getInstance, @getInstanceList, @getDetailRead portals
POST/instance/createDamInstanceController@createCreate a portal
POST/instance/updateDamInstanceController@updateUpdate name, URL, domain, logo, favicon, active flag
PUT/instance/update-settingsDamInstanceController@updateSettingsMerge keys into settings JSON
POST/instance/change-portal-visibilityDamInstanceController@changePortalVisibilityMake a portal public or private
POST/instance/create-user, /instance/update-userDamInstanceController@createUser, @updateUserInvite or edit a partner
GET/instance/get-user, /instance/get-user-details, /instance/user-activityDamInstanceController@getUserByInstanceId, @getUserDetail, @userActivityPartner lists and activity
POST/instance/delete-restore-user, /instance/delete-userDamInstanceController@deleteOrRestoreUser, @deleteUserDeactivate, restore or delete a partner
POST/instance/user-resend-invitation, /instance/revoke-invitationDamInstanceController@resendUserInvitation, @revokeUserInvitationInvitation management
POST/instance/dealer-activateDamInstanceController@activateDealerUserActivate a partner
GET POST/instance/banner/all, /create, /update, /update-ordering, /deleteInstanceBannerControllerPortal banners
GET POST PATCH DELETE/tile/list, /create, /update, /update-order, /update-slider-config, /deleteDamTilesControllerPortal home tiles
POST/permission/change-permissionDamPermissionController@changePermissionPublish or unpublish assets, folders and collages per portal
POST/permission/bulk-instance-visibilityDamPermissionController@bulkInstanceVisibilityCurrent per-portal visibility of a selection
GET POST/dealer/*, /dealer/user/*DealerControllerDealers (App\Models\LM\Dealer) and their users

Portal API (/dam/v1) ​

MethodPathController@methodPurpose
POST/check-public-portalAuthController@checkPublicPortalLoginPublic portal sign-in by URL (throttle:30,1)
POST/verify-domainDashboardController@verifyDomainResolve a custom domain
GET/digital/common-dataDashboardController@getAllCommonDataPortal home data
GET/digital/get-tiles, /digital/get-bannersDashboardController@getTiles, @getBannersActive tiles and banners by position
GET/digital/trending-recent-assets, /digital/all-popular-dataDashboardController@getTrendingOrRecentAssets, @getAllPopularDataHome page lists
GET/digital/check-account-statusDashboardController@checkAccountStatusPartner account status
POST/digital/instance/update-userDashboardController@updateUserPartner edits their profile

Folder, collage and asset reads are listed in Folders, Collages and Assets. The full visibility rules are in Permissions and Portal Visibility.

Workflows ​

Create a portal ​

update re-sends the CNAME email when a custom domain is turned on or changed, and validates uniqueness against other portals. update-settings and change-portal-visibility look the portal up by instance_id only; they do not call checkUser or check the workspace.

Public portal switch ​

A public portal works by sharing one anonymous partner account per portal. Since PR #453 POST /dam/v1/check-public-portal signs the visitor in as that account in one call and returns the normal login payload plus url and id; it never returns the account's email or password (the old endpoint did, and the frontend then called /dam/v1/login). The anonymous account cannot change its password (403) or profile from the portal. See Authentication: portal sign-in link and public portal.

Invite a partner ​

The invitation link points to https://{custom domain}/{workspace}/generate-password?invitation_token= or DAM_FRONTEND_URL/{portal url}/generate-password?...; the partner sets a password through POST /dam/v1/generate-password. Pending partners get instance_status = 0 until they accept. delete-restore-user toggles all of a partner's portal rows: active rows are set to status 0 and soft deleted, otherwise they are restored.

Publish content to portals ​

instance_ids must be present (an empty list makes the items private everywhere) and each id must exist. Each id list is capped at 5000. Only live assets and existing folders and collages receive new rows. If inline reindexing fails, asset ids are queued through ReindexAssetsByIds. bulk-instance-visibility returns, per portal, which of the given asset_ids and folder_ids are public, for the admin dialog.

Partner reads the portal ​

Tiles need title, url and an image (jpeg, png, jpg, gif, svg, 2 MB). Banners need image and image_name and reject images over 20 MB. All tile and banner admin endpoints require the manage_banner_and_tiles plan feature. tile/update-slider-config sets is_slider on the portal.

Data ​

Model / tableUse
DamInstance / dam_instancesPortals
DamInstancesUsers / dam_instances_usersPartner access per portal
DealerUsers / dealer_usersPartners, including the anonymous public user
DealerUserInvitationsInvitation tokens
DamInstancePermission / dam_instance_permissionsPer-portal visibility rows (polymorphic permissionable_type)
DamTile / dam_tiles, InstanceBanner / instance_bannersHome page content
WorkspaceBrandingBranding created with a portal
Dealer (App\Models\LM\Dealer)Dealer companies