Remove favorite interface

Remove the collection record of a specified product or document, supporting the deletion of specific items from the user's collection list.

Precautions

  • This interface uses the POST method and requires data to be submitted in application/ format
  • Provide the document ID to specify the collection item to be removed.
  • Only logged-in users can remove their favorite records
  • If the specified document has not been favorited, a successful status is returned
  • After successful removal, it will no longer appear in the user's favorite list

Request address

{ๅŸŸๅๅœฐๅ€}/api/favorite/delete

Description:{ๅŸŸๅๅœฐๅ€}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/favorite/delete

Request syntax

POST {ๅŸŸๅๅœฐๅ€}/api/favorite/delete
Content-Type: application/json

Request header

This interface only involves public request headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Request Parameters

Field Name Type Required Description
archive_id integer Yes Document ID

Response Headers

This interface only involves public response headers. More information, please refer toCommon Request Headers (Common Request Headers).

Return parameters

Field Name Type Description
code integer Error code
message string Error Description

Example Usage

Request Example

POST /api/favorite/delete HTTP/1.1
Host: www.anqicms.com
Content-Type: application/json

{
  "archive_id": 1
}

Successful response example

{
  "code": 0,
  "msg": "ๅˆ ้™คๆˆๅŠŸ"
}

Failed response example

{
  "code": -1,
  "msg": "ๅ‚ๆ•ฐ้”™่ฏฏ"
}

Error Code

Error code Description
0 OK
-1 Error, the reason is indicated in msg
1001 Not logged in
1002 Unauthorized
200 API request OK