Shares API endpoints
Endpoint reference for the Shares tag (6 endpoints): User access shares — grant a user access to advertisers and sites
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
Get advertiser shares for user.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
basicInfo | query | boolean | no | When true, includes additional advertiser details (active status, creation date, contact name/email, description, category IDs) in the response for each share entry |
basicInfoIds | query | array<string> | no | Comma-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 |
userId | query | integer | no | Unique 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
Remove advertiser share.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
userId | path | integer | yes | ID of the user whose share is removed |
advertiserId | path | integer | yes | ID 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
Update advertiser share.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
advertiserId | form | integer | yes | Unique identifier of the advertiser to share. Must be a positive number referencing an existing, non-deleted advertiser |
shareType | form | string | yes | Access 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. |
userId | form | integer | no | Unique 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
Get site shares for user.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
userId | query | integer | no | Unique identifier of the user whose site shares should be retrieved. If omitted, returns shares for the currently authenticated user |
basicInfo | query | boolean | no | When true, includes additional site details (active status, creation date, contact name/email, description, category IDs) in the response for each share entry |
basicInfoIds | query | array<string> | no | Comma-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
Remove site share.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
userId | path | integer | yes | ID of the user whose share is removed |
siteId | path | integer | yes | ID 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
Update site share.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
siteId | form | integer | yes | Unique identifier of the site to share. Must be a positive number referencing an existing, non-deleted site |
shareType | form | string | yes | Access 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. |
userId | form | integer | no | Unique 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
- REST API overview — authentication and conventions
- API endpoint reference by tag
- Network services and miscellaneous APIs