Impression endpoints

  • Main Url : https://api.clearad.io/v1/impression/

Creating Impression

  • url: - Main Url
  • method: - POST
  • body: - JSON

    {
     "publisherId": String,
     "dailyImpressions": [
      {
       "advertiser": {
         "description": String,
         "id": "ObjectId"
         },
     "date": Timestamp,
     "data": "JSON_OBJECT",
     }
     ]
    }
    
  • response_code: -

    200  - Added impression
    405  - Invalid input
    

Getting all of impressions

  • url: - Main Url
  • method: - GET
  • response_code: -

    200  - JSON_Array
    401  - Unauthorized
    
  • response_example:-

    [
        {
            "advertiser": {
            "description": "description",
            "id": "id"
        },
            "date": "2000-01-23T00:00:00.000Z",
        "data": {},
        "id": "id",
        "status": Boolean,
        "txId": "String" or "Null"
        }
    ]
    

Getting Immpression by id

  • url: - Main Url + {impressionId}
  • method: - GET
  • response_code: -

    200  - JSON_Object
    400  - Invalid ObjectId value
    401  - Unauthorized
    
  • response_example:-

    {
    "advertiser": {
    "description": "description",
    "id": "id"
    },
    "date": "2000-01-23T00:00:00.000Z",
    "data": {},
    "id": "id",
    "status": Boolean,
    "txId": "String" or "Null"
    }
    

Modifying details of Impression

  • url: - Main Url
  • method: - PUT
  • body: -

    {
    "advertiser": {
     "description": String,
     "id": "ObjectId"
     },
       "date": Timestamp,
    "data": {},
    "id": "ObjectId"
    }
    
  • response_code: -

    200  - successfull updated
    400  - Invalid ID supplied
    401  - Unauthorized
    404  - Impression not found