Browse the help center

Shares API endpoints

Endpoint reference for the Shares tag (6 endpoints): User access shares — grant a user access to advertisers and sites

Reference network manager admin

User access shares — grant a user access to advertisers and sites. 6 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see REST API overview. Parameters marked form go in an application/x-www-form-urlencoded request body.

GET /rest-api/advertiserShares.do

Request examples

Get advertiser shares for user.

ParameterInTypeRequiredDescription
basicInfoquerybooleannoWhen true, includes additional advertiser details (active status, creation date, contact name/email, description, category IDs) in the response for each share entry
basicInfoIdsqueryarray<string>noComma-separated list of advertiser IDs for which to include basic information. If omitted or empty while basicInfo is true, basic info is included for all advertisers
userIdqueryintegernoUnique identifier of the user whose advertiser shares should be retrieved. If omitted, returns shares for the currently authenticated user

Responses: 200 — Advertiser shares retrieved successfully. Errors follow the shared conventions.

DELETE /rest-api/advertiserShares/{userId}/{advertiserId}.do

Request examples

Remove advertiser share.

ParameterInTypeRequiredDescription
userIdpathintegeryesID of the user whose share is removed
advertiserIdpathintegeryesID of the advertiser the share is on

Responses: 200 — Share removed: {success, userId, advertiserId} · 404 — No such user or advertiser, or the user has no share on it. Errors follow the shared conventions.

POST /rest-api/advertiserShares/update.do

Request examples

Update advertiser share.

ParameterInTypeRequiredDescription
advertiserIdformintegeryesUnique identifier of the advertiser to share. Must be a positive number referencing an existing, non-deleted advertiser
shareTypeformstringyesAccess level to grant. Allowed values: IS_OWNER (full ownership), CAN_EDIT (read/write access), CAN_VIEW (read-only access) Values: IS_OWNER, CAN_EDIT, CAN_VIEW.
userIdformintegernoUnique identifier of the user to grant the share to. If omitted, the share is created for the currently authenticated user

Responses: 200 — Advertiser share updated successfully · 500 — Internal server error. Errors follow the shared conventions.

GET /rest-api/siteShares.do

Request examples

Get site shares for user.

ParameterInTypeRequiredDescription
userIdqueryintegernoUnique identifier of the user whose site shares should be retrieved. If omitted, returns shares for the currently authenticated user
basicInfoquerybooleannoWhen true, includes additional site details (active status, creation date, contact name/email, description, category IDs) in the response for each share entry
basicInfoIdsqueryarray<string>noComma-separated list of site IDs for which to include basic information. If omitted or empty while basicInfo is true, basic info is included for all sites

Responses: 200 — Site shares retrieved successfully. Errors follow the shared conventions.

DELETE /rest-api/siteShares/{userId}/{siteId}.do

Request examples

Remove site share.

ParameterInTypeRequiredDescription
userIdpathintegeryesID of the user whose share is removed
siteIdpathintegeryesID of the site the share is on

Responses: 200 — Share removed: {success, userId, siteId} · 404 — No such user or site, or the user has no share on it. Errors follow the shared conventions.

POST /rest-api/siteShares/update.do

Request examples

Update site share.

ParameterInTypeRequiredDescription
siteIdformintegeryesUnique identifier of the site to share. Must be a positive number referencing an existing, non-deleted site
shareTypeformstringyesAccess level to grant. Allowed values: IS_OWNER (full ownership), CAN_EDIT (read/write access), CAN_VIEW (read-only access) Values: IS_OWNER, CAN_EDIT, CAN_VIEW.
userIdformintegernoUnique identifier of the user to grant the share to. If omitted, the share is created for the currently authenticated user

Responses: 200 — Site share updated successfully · 500 — Internal server error. Errors follow the shared conventions.

Related pages

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.