Сейчас онлайн  

/v1/bookmarks/

V2 user bookmarks — list / add / remove / reorder. Bookmarks here are arbitrary destinations the user has chosen to save: a forum thread, a location market page, a user profile, a specific listing. Each row carries its own title + url + description, persisted per-user in `ATUserBookmarks` (added in 000002 migration). V2 newsfeed post URLs also cache `Cache-ATDiscussionPosts_ID` for indexed post bookmark counts. This replaces the earlier sidebar-pin model (set_pin / set_reorder on /v1/sidebar/) where bookmarks were registry-key references — keeping a pinned copy of an item that already lived in the main nav was redundant by design and showed up as duplicate rows in the sidebar. Auth: every endpoint requires an authenticated user ($_APIUserID > 0). The library layer (\AT\ATV2Bookmarks) enforces ownership on every read and write so a stolen/forged bookmark id never lets one user touch another's row.
GET

/v1/bookmarks/get_list

#
Returns the authenticated user's active bookmarks, ordered by their chosen sort (drag-reorderable on the v2 Bookmarks page). Empty array for users with no bookmarks; ErrorInvalidUser for anonymous callers.
Пример запроса (cURL)
curl --get \
  'https://ru.appointmenttrader.com/v1/bookmarks/get_list' \
  --data-urlencode 'key={{API_KEY}}'

Возвращает

JSON
See the shared response schema and synthetic example.
Поля ответа
ПолеТипОбязательноОписание
$bookmarks_get_list_Response Да
$.oneOf[0] Да
$.oneOf[0].allOf[0]object Да
$.oneOf[0].allOf[0].RequestUserAliasstring Да
$.oneOf[0].allOf[0].RequestPathstring | null Да
$.oneOf[0].allOf[0].RequestStatus = "Succeeded" Да
$.oneOf[0].allOf[0].ResponseCodeinteger Да
$.oneOf[0].allOf[0].ResponseMessageAPIResponseMessage Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1]array Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2]object Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[0].allOf[0].RequestImpersonatedByUserAliasstring Нет
$.oneOf[0].allOf[1]object Да
$.oneOf[0].allOf[1].Payloadarray Да
$.oneOf[0].allOf[1].Payload[]object Нет
$.oneOf[0].allOf[1].Payload[].IDDatabaseInteger ДаInteger value; legacy MySQL reads may serialize it as a numeric string.
$.oneOf[0].allOf[1].Payload[].ID.oneOf[0]integer Да
$.oneOf[0].allOf[1].Payload[].ID.oneOf[1]string Да
$.oneOf[0].allOf[1].Payload[].Titlestring Да
$.oneOf[0].allOf[1].Payload[].URLstring Да
$.oneOf[0].allOf[1].Payload[].Description Да
$.oneOf[0].allOf[1].Payload[].Description.anyOf[0]string Да
$.oneOf[0].allOf[1].Payload[].Description.anyOf[1]null Да
$.oneOf[0].allOf[1].Payload[].Cache-ATDiscussionPosts_ID Да
$.oneOf[0].allOf[1].Payload[].Cache-ATDiscussionPosts_ID.anyOf[0]DatabaseInteger ДаInteger value; legacy MySQL reads may serialize it as a numeric string.
$.oneOf[0].allOf[1].Payload[].Cache-ATDiscussionPosts_ID.anyOf[0].oneOf[0]integer Да
$.oneOf[0].allOf[1].Payload[].Cache-ATDiscussionPosts_ID.anyOf[0].oneOf[1]string Да
$.oneOf[0].allOf[1].Payload[].Cache-ATDiscussionPosts_ID.anyOf[1]null Да
$.oneOf[0].allOf[1].Payload[].CreatedDatestring Да
$.oneOf[0].allOf[1].Payload[].SortOrderDatabaseInteger ДаInteger value; legacy MySQL reads may serialize it as a numeric string.
$.oneOf[0].allOf[1].Payload[].SortOrder.oneOf[0]integer Да
$.oneOf[0].allOf[1].Payload[].SortOrder.oneOf[1]string Да
$.oneOf[1]object Да
$.oneOf[1].RequestUserAliasstring Да
$.oneOf[1].RequestPathstring | null Да
$.oneOf[1].RequestStatus = "Failed" Да
$.oneOf[1].ResponseCodeinteger Да
$.oneOf[1].ResponseMessageAPIResponseMessage Да
$.oneOf[1].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[1].ResponseMessage.oneOf[1]array Да
$.oneOf[1].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[1].ResponseMessage.oneOf[2]object Да
$.oneOf[1].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[1].RequestImpersonatedByUserAliasstring Нет
Пример ответа
{
    "RequestStatus": "Succeeded",
    "ResponseCode": 100,
    "ResponseMessage": "Synthetic success example.",
    "RequestPath": "/v1/bookmarks/get_list",
    "RequestUserAlias": "example-user",
    "Payload": []
}
Машиночитаемая документация метода
POST

/v1/bookmarks/set_add

#
Add (or refresh) a bookmark for the authenticated user. Idempotent on URL: if the user already has a live bookmark for the supplied url, the existing row is returned (with title / description updated to the new values) instead of creating a duplicate. The url must be either http(s) absolute or root-relative ("/foo/bar"). Anything else (javascript:, data:, mailto:, naked schemes) is rejected with ErrorBadParameters so untrusted page code can't smuggle exotic urls into the user's collection. Canonical v2 newsfeed post URLs populate Cache-ATDiscussionPosts_ID so the feed can count how many users bookmarked a post without parsing URLs. A user's first bookmark for a v2 forum post sends the post author a push-only Priority notification tagged back to that discussion post.

Параметры

ИмяТипОбязательноПо умолчаниюОписание
title string Да — Display title for the card on the bookmarks page (max 250 chars; truncated).
url string Да — Destination url. Absolute http(s) or root-relative path.
description string Нет "" Optional descriptive subtitle. Plain text, no markup.
isWritingRequest bool Нет false Set true to actually persist the bookmark.
Пример запроса (cURL)
curl --request POST \
  'https://ru.appointmenttrader.com/v1/bookmarks/set_add' \
  --data-urlencode 'key={{API_KEY}}' \
  --data-urlencode 'title={{title}}' \
  --data-urlencode 'url={{url}}' \
  --data-urlencode 'description={{description}}' \
  --data-urlencode 'isWritingRequest={{isWritingRequest}}'

Возвращает

JSON
See the shared response schema and synthetic example.
Поля ответа
ПолеТипОбязательноОписание
$bookmarks_set_add_Response Да
$.oneOf[0] Да
$.oneOf[0].allOf[0]object Да
$.oneOf[0].allOf[0].RequestUserAliasstring Да
$.oneOf[0].allOf[0].RequestPathstring | null Да
$.oneOf[0].allOf[0].RequestStatus = "Succeeded" Да
$.oneOf[0].allOf[0].ResponseCodeinteger Да
$.oneOf[0].allOf[0].ResponseMessageAPIResponseMessage Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1]array Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2]object Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[0].allOf[0].RequestImpersonatedByUserAliasstring Нет
$.oneOf[0].allOf[1]object Да
$.oneOf[0].allOf[1].Payloadobject Да
$.oneOf[0].allOf[1].Payload.idinteger Да
$.oneOf[0].allOf[1].Payload.urlstring Да
$.oneOf[0].allOf[1].Payload.postId Да
$.oneOf[0].allOf[1].Payload.postId.anyOf[0]integer Да
$.oneOf[0].allOf[1].Payload.postId.anyOf[1]null Да
$.oneOf[0].allOf[1].Payload.bookmarkCount Да
$.oneOf[0].allOf[1].Payload.bookmarkCount.anyOf[0]integer Да
$.oneOf[0].allOf[1].Payload.bookmarkCount.anyOf[1]null Да
$.oneOf[1]object Да
$.oneOf[1].RequestUserAliasstring Да
$.oneOf[1].RequestPathstring | null Да
$.oneOf[1].RequestStatus = "Failed" Да
$.oneOf[1].ResponseCodeinteger Да
$.oneOf[1].ResponseMessageAPIResponseMessage Да
$.oneOf[1].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[1].ResponseMessage.oneOf[1]array Да
$.oneOf[1].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[1].ResponseMessage.oneOf[2]object Да
$.oneOf[1].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[1].RequestImpersonatedByUserAliasstring Нет
Пример ответа
{
    "RequestStatus": "Succeeded",
    "ResponseCode": 100,
    "ResponseMessage": "Synthetic success example.",
    "RequestPath": "/v1/bookmarks/set_add",
    "RequestUserAlias": "example-user",
    "Payload": {
        "id": 0,
        "url": "synthetic-example",
        "postId": 0,
        "bookmarkCount": 0
    }
}
Машиночитаемая документация метода
POST

/v1/bookmarks/set_remove

#
Remove a bookmark owned by the authenticated user. This is a hard delete. Removing a bookmark that doesn't exist or isn't owned by this user returns Error rather than silently succeeding, so client UI can distinguish "deleted" from "wasn't yours to delete".

Параметры

ИмяТипОбязательноПо умолчаниюОписание
bookmarkID int Да — The ID returned by set_add or get_list.
isWritingRequest bool Нет false Set true to actually delete.
Пример запроса (cURL)
curl --request POST \
  'https://ru.appointmenttrader.com/v1/bookmarks/set_remove' \
  --data-urlencode 'key={{API_KEY}}' \
  --data-urlencode 'bookmarkID={{bookmarkID}}' \
  --data-urlencode 'isWritingRequest={{isWritingRequest}}'

Возвращает

JSON
See the shared response schema and synthetic example.
Поля ответа
ПолеТипОбязательноОписание
$bookmarks_set_remove_Response Да
$.oneOf[0] Да
$.oneOf[0].allOf[0]object Да
$.oneOf[0].allOf[0].RequestUserAliasstring Да
$.oneOf[0].allOf[0].RequestPathstring | null Да
$.oneOf[0].allOf[0].RequestStatus = "Succeeded" Да
$.oneOf[0].allOf[0].ResponseCodeinteger Да
$.oneOf[0].allOf[0].ResponseMessageAPIResponseMessage Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1]array Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2]object Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[0].allOf[0].RequestImpersonatedByUserAliasstring Нет
$.oneOf[0].allOf[1]object Да
$.oneOf[0].allOf[1].Payloadobject Да
$.oneOf[0].allOf[1].Payload.idinteger Да
$.oneOf[0].allOf[1].Payload.urlstring Да
$.oneOf[0].allOf[1].Payload.postId Да
$.oneOf[0].allOf[1].Payload.postId.anyOf[0]integer Да
$.oneOf[0].allOf[1].Payload.postId.anyOf[1]null Да
$.oneOf[0].allOf[1].Payload.bookmarkCount Да
$.oneOf[0].allOf[1].Payload.bookmarkCount.anyOf[0]integer Да
$.oneOf[0].allOf[1].Payload.bookmarkCount.anyOf[1]null Да
$.oneOf[1]object Да
$.oneOf[1].RequestUserAliasstring Да
$.oneOf[1].RequestPathstring | null Да
$.oneOf[1].RequestStatus = "Failed" Да
$.oneOf[1].ResponseCodeinteger Да
$.oneOf[1].ResponseMessageAPIResponseMessage Да
$.oneOf[1].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[1].ResponseMessage.oneOf[1]array Да
$.oneOf[1].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[1].ResponseMessage.oneOf[2]object Да
$.oneOf[1].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[1].RequestImpersonatedByUserAliasstring Нет
Пример ответа
{
    "RequestStatus": "Succeeded",
    "ResponseCode": 100,
    "ResponseMessage": "Synthetic success example.",
    "RequestPath": "/v1/bookmarks/set_remove",
    "RequestUserAlias": "example-user",
    "Payload": {
        "id": 0,
        "url": "synthetic-example",
        "postId": 0,
        "bookmarkCount": 0
    }
}
Машиночитаемая документация метода
POST

/v1/bookmarks/set_reorder

#
Replace the user's bookmark sort order with the supplied id list. IDs not currently owned by the user (or already deleted) are silently skipped; any owned bookmarks not present in the list keep their relative order, appended after the supplied ones — defensive in case the client view is stale.

Параметры

ИмяТипОбязательноПо умолчаниюОписание
orderedBookmarkIDs string Да — Comma-separated bookmark IDs in the desired order.
isWritingRequest bool Нет false Set true to actually persist the order.
Пример запроса (cURL)
curl --request POST \
  'https://ru.appointmenttrader.com/v1/bookmarks/set_reorder' \
  --data-urlencode 'key={{API_KEY}}' \
  --data-urlencode 'orderedBookmarkIDs={{orderedBookmarkIDs}}' \
  --data-urlencode 'isWritingRequest={{isWritingRequest}}'

Возвращает

JSON
See the shared response schema and synthetic example.
Поля ответа
ПолеТипОбязательноОписание
$bookmarks_set_reorder_Response Да
$.oneOf[0] Да
$.oneOf[0].allOf[0]object Да
$.oneOf[0].allOf[0].RequestUserAliasstring Да
$.oneOf[0].allOf[0].RequestPathstring | null Да
$.oneOf[0].allOf[0].RequestStatus = "Succeeded" Да
$.oneOf[0].allOf[0].ResponseCodeinteger Да
$.oneOf[0].allOf[0].ResponseMessageAPIResponseMessage Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1]array Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2]object Да
$.oneOf[0].allOf[0].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[0].allOf[0].RequestImpersonatedByUserAliasstring Нет
$.oneOf[0].allOf[1]object Да
$.oneOf[0].allOf[1].Payload = true Да
$.oneOf[1]object Да
$.oneOf[1].RequestUserAliasstring Да
$.oneOf[1].RequestPathstring | null Да
$.oneOf[1].RequestStatus = "Failed" Да
$.oneOf[1].ResponseCodeinteger Да
$.oneOf[1].ResponseMessageAPIResponseMessage Да
$.oneOf[1].ResponseMessage.oneOf[0]string | number | boolean | null Да
$.oneOf[1].ResponseMessage.oneOf[1]array Да
$.oneOf[1].ResponseMessage.oneOf[1][]APIResponseMessage Нет
$.oneOf[1].ResponseMessage.oneOf[2]object Да
$.oneOf[1].ResponseMessage.oneOf[2].*APIResponseMessage Нет
$.oneOf[1].RequestImpersonatedByUserAliasstring Нет
Пример ответа
{
    "RequestStatus": "Succeeded",
    "ResponseCode": 100,
    "ResponseMessage": "Synthetic success example.",
    "RequestPath": "/v1/bookmarks/set_reorder",
    "RequestUserAlias": "example-user",
    "Payload": true
}
Машиночитаемая документация метода