News API (1.0.0)
Download OpenAPI specification:Download
E-mail: tech@interactionpartners.ch
News CRUD API
News items of a company (without content)
Authorizations:
apiKeyAuth
query Parameters
| offset | integer >= 0 Number of records to skip for pagination |
| limit | integer [ 0 .. 20 ] Maximum number of records to return (max 20) |
| sort | string Sort by creation or publication dates. For example to sort by created_at ASC use "sort=created_at". For DESC it would be "sort=-created_at". |
Responses
Response samples
- 200
- 401
Content type
application/json
{- "total": 230,
- "limit": 20,
- "offset": 0,
- "items": [
- {
- "id": 789,
- "name": "Internal news item name (actual titles are in translations)",
- "author_email": "some-author@example.com",
- "company_isin": "US123456789",
- "news_date": "2022-02-22",
- "news_datetime": "2023-08-01T06:56:11+00:00",
- "published_at": "2022-02-22T22:22:22+01:00",
- "ad_hoc": false,
- "created_at": "2022-01-18T06:58:30Z",
- "updated_at": "2022-01-18T06:58:30Z"
}
]
}Create a news item
Authorizations:
apiKeyAuth
Request Body schema: application/json
Callback payload
| name | string |
| author_email required | string <email> |
| company_isin required | string |
| news_date | string Display date |
| news_datetime | string <date-time<ISO 8601>> Display datetime |
| published_at required | string Publishing date (if future then the item is scheduled for publishing) |
| ad_hoc required | boolean Default: false |
required | Array of objects (_NewsContentTranslation) |
object |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "Internal news item name (actual titles are in translations)",
- "author_email": "some-author@example.com",
- "company_isin": "US123456789",
- "news_date": "2022-02-22",
- "news_datetime": "2023-08-01T06:56:11+00:00",
- "published_at": "2022-02-22T22:22:22+01:00",
- "ad_hoc": false,
- "content": [
- {
- "language": "en",
- "title": "Breaking news about something",
- "content": "Lorem ipsum <img src=\"https://werwerwer\"/> dolor sit amet, consectetur adipiscing elit, sed do eiusmod..."
}
], - "publication": {
- "six": true
}
}Response samples
- 401
- 422
Content type
application/json
{- "errors": [
- {
- "message": "Unauthorized"
}
]
}News item details (with content)
Authorizations:
apiKeyAuth
path Parameters
| id required | integer News id |
Responses
Response samples
- 200
- 401
- 404
Content type
application/json
[- {
- "id": 789,
- "name": "Internal news item name (actual titles are in translations)",
- "author_email": "some-author@example.com",
- "company_isin": "US123456789",
- "news_date": "2022-02-22",
- "news_datetime": "2023-08-01T06:56:11+00:00",
- "published_at": "2022-02-22T22:22:22+01:00",
- "ad_hoc": false,
- "content": [
- {
- "language": "en",
- "title": "Breaking news about something",
- "content": "Lorem ipsum <img src=\"https://werwerwer\"/> dolor sit amet, consectetur adipiscing elit, sed do eiusmod...",
- "created_at": "2022-01-18T06:58:30Z",
- "updated_at": "2022-01-18T06:58:30Z"
}
], - "publication": {
- "six": true
}, - "created_at": "2022-01-18T06:58:30Z",
- "updated_at": "2022-01-18T06:58:30Z"
}
]Update news (substitutes all values, meaning works not like PATCH)
Authorizations:
apiKeyAuth
path Parameters
| id required | integer News id |
Request Body schema: application/json
Callback payload
| name | string |
| author_email required | string <email> |
| company_isin required | string |
| news_date | string Display date |
| news_datetime | string <date-time<ISO 8601>> Display datetime |
| published_at required | string Publishing date (if future then the item is scheduled for publishing) |
| ad_hoc required | boolean Default: false |
required | Array of objects (_NewsContentTranslation) |
object |
Responses
Request samples
- Payload
Content type
application/json
{- "name": "Internal news item name (actual titles are in translations)",
- "author_email": "some-author@example.com",
- "company_isin": "US123456789",
- "news_date": "2022-02-22",
- "news_datetime": "2023-08-01T06:56:11+00:00",
- "published_at": "2022-02-22T22:22:22+01:00",
- "ad_hoc": false,
- "content": [
- {
- "language": "en",
- "title": "Breaking news about something",
- "content": "Lorem ipsum <img src=\"https://werwerwer\"/> dolor sit amet, consectetur adipiscing elit, sed do eiusmod..."
}
], - "publication": {
- "six": true
}
}Response samples
- 401
- 404
- 422
Content type
application/json
{- "errors": [
- {
- "message": "Unauthorized"
}
]
}