blog_image
19 Jan 2025

API Get Ads Details Documentation

API Documentation: Get Advertisement Details


Endpoint

POST /api/ads/detail

Description

This API is used to retrieve detailed information about a specific advertisement.



Request Format

URL:
/api/ads/detail

Method:
POST

Headers:

  • Content-Type: application/json

Body Parameters:
The request body must be in JSON format with the following fields:

  1. token (string): The authentication token for the API. This field is required.
  2. ads_id (integer): The ID of the advertisement to retrieve details for. This field is required.

Example Request Body:

{
    "token": "8|koJNODexEl8Kif3BW7wpiZFrrAAenbxl0fkZ6rwWb0a83fb1",
    "ads_id": 1
}


Response Format

Success Response:

  • status (boolean): Indicates whether the operation was successful.
  • message (string): A descriptive message about the operation.
  • data (object): Contains detailed information about the advertisement.

Example Success Response:

{
    "status": true,
    "message": "Successfully get detail ads.",
    "data": {
        "id": 1,
        "user_id": 15,
        "ads_type": 2,
        "title": "promo akhir tahun",
        "ads_body": "https://klik.cyberszone.com/assets/images/ptc/2025/01/13/67847913766821736734995.png",
        "amount": "46.00000000",
        "duration": 10,
        "max_show": 10,
        "showed": 0,
        "remain": 10,
        "reject_reason": null,
        "schedule": [
            {
                "day": "sunday",
                "start": "09:22",
                "end": "13:22"
            }
        ],
        "status": 1,
        "created_at": "2025-01-13T02:19:52.000000Z",
        "updated_at": "2025-01-19T10:29:10.000000Z",
        "views": []
    }
}