Notifications

Receiving notification list

Parameters

HTTP method

Access rights

URL

Parameters

Note

GET web_notificator https://api.admitad.com/web_notificator/v1/web_notificator/ Parameter request list

Returns the list of available notifications*.

  • * Returns the result in the JSON format.

 

Parameter request list

Name

Type

Allowed values

Note

category char
  • finance — Finance

  • system — System

  • promotions — Promotions

  • other — Other

Example: ?category=finance

Returns notifications with the specified category.

status char
  • not_read — Unread

  • read — Read

Example: ?status=read

Returns notifications with the specified status.

start_date string

Example: ?start_date=%d.%m.%Y %H:%M:%S

Returns notifications that have been received since the specified date.

end_date string

Example: ?end_date=%d.%m.%Y %H:%M:%S

Returns notifications that were received before the specified date.

search string

Example: ?search=test_subject

Search by notification title.

limit integer limit, offset parameters  
offset integer limit, offset parameters  

 

Example of use

Example of a request with utility ``curl``:

curl -L -H 'Authorization: Bearer access_token -X GET https://api.admitad.com/web_notificator/v1/web_notificator/

Example of the response from the API server in the JSON format:

{
"id": 6,
"status": "finance",
"category": "read",
"when_read": null,
"date_created": '15.02.2021 16:08:40',
"translate": {
"id": 5,
"subject": "dsf",
"text": "sdfsd"
}
}

 

Description of API server response fields

Name

Type

Description

id int

Notification ID

status char

Notification status. Example:

  • not_read — Unread

  • read — Read

category char

Notification category

when_read datetime

Date the notification was read.

Format: %Y-%m-%dT%H:%M:%S

Example: 2020-12-02T17:15:28

date_created datetime

Date the notification was received.

Format: %Y-%m-%dT%H:%M:%S

Example: 2020-12-02T17:15:28

translate object

Object with notification information.

The “translate” object parameters

Name

Type

Description

id int

Object ID.

subject char

Notification title.

text char

Notification text.

 

Description of API server response fields

Name

Type

Description

id int

Notification ID

status char

Notification status. Example:

  • not_read — Unread

  • read — Read

category char

Notification category

when_read datetime

Date the notification was read.

Format: %Y-%m-%dT%H:%M:%S

Example: 2020-12-02T17:15:28

date_created datetime

Date the notification was received.

Format: %Y-%m-%dT%H:%M:%S

Example: 2020-12-02T17:15:28

translate object

Object with notification information.

 

Changing notification

Parameters

HTTP method

Access rights

URL

Parameters

Note

POST web_notificator https://api.admitad.com/web_notificator/v1/web_notificator/{id}/mark_as_read/  
  • Returns an updated notification, where id is the notification ID.*

  • * Returns the result in the JSON format.

 

Example of use

Example of a request with utility ``curl``:

curl -L -H 'Authorization: Bearer access_token' -H "Content-Type: application/json" -X POST https://api.admitad.com/web_notificator/v1/web_notificator/63/mark_as_read/'

Example of the response from the API server in the JSON format:

{
"id": 6,
"status": "read",
"category": "finance",
"when_read": "2020-12-02T17:15:28",
"date_created": '15.02.2021 16:08:40',
"translate": {
"id": 5,
"subject": "dsf",
"text": "sdfsd"
}
}

 

Description of API server response fields

Name

Type

Description

id int

Notification ID

status char

Notification status. Example:

  • not_read — Unread

  • read — Read

category char

Notification category

when_read datetime

Date the notification was read.

Format: %Y-%m-%dT%H:%M:%S

Example: 2020-12-02T17:15:28

date_created datetime

Date the notification was received.

Format: %Y-%m-%dT%H:%M:%S

Example: 2020-12-02T17:15:28

translate object

Object with notification information.

 

Mark all notifications as read

Parameters

HTTP method

Access rights

URL

Parameters

Note

POST web_notificator https://api.admitad.com/web_notificator/v1/web_notificator/mark_all_as_read/  

Marks all notifications as read.

  • * Returns status code 200 with a blank response body.

 

Example of use

Example of a request with utility ``curl``:

curl -L -H 'Authorization: Bearer access_token -X POST https://api.admitad.com/web_notificator/v1/web_notificator/mark_all_as_read/