Payt notifications API

Operations about notifications

OpenAPI Specification

payt-notifications-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: API Endpoints administrations notifications API
  description: This page allows you to explore the available API endpoints. Select a resource (e.g. debtors) and an endpoint (e.g. /v1/debtors) to inspect an example response and available parameters. An authorization header containing a Bearer token is required, see [Authentication](/authentication/authorization).
  version: 1.0.0
servers:
- url: https://api.paytsoftware.com
  description: Production
- url: https://demo-api.paytsoftware.com
  description: Demo / testing
security:
- bearerAuth: []
tags:
- name: notifications
  description: Operations about notifications
paths:
  /v1/notifications:
    get:
      description: Get administration notifications
      parameters:
      - in: query
        name: administration_id
        description: Administration identifier
        required: true
        schema:
          type: string
      - in: query
        name: ids
        description: Filter notifications with a comma separated list of internal ids
        required: false
        schema:
          type: string
      - in: query
        name: debtor_ids
        description: Filter messages with a comma separated list of internal debtor ids
        required: false
        schema:
          type: string
      - in: query
        name: invoice_ids
        description: Filter messages with a comma separated list of internal invoice ids
        required: false
        schema:
          type: string
      - in: query
        name: credit_case_ids
        description: Filter messages with a comma separated list of internal credit_case ids
        required: false
        schema:
          type: string
      - in: query
        name: updated_after
        description: ISO8601 UTC Timestamp to filter records updated after it
        required: false
        schema:
          type: string
          format: date-time
      - in: query
        name: fields
        description: 'JSON object defining fields to receive (e.g {"only": ["field1", {"field2": ["field3"]}]})'
        required: false
        schema:
          type: string
      - in: query
        name: cursor
        description: The record identifier after which to start the page
        required: false
        schema:
          type: string
      - in: query
        name: per_page
        description: How many records will be returned per page, (1..500), defaults to 100
        required: false
        schema:
          type: integer
          format: int32
          minimum: 1
          maximum: 500
          default: 100
      responses:
        '200':
          description: Paginated list of notifications
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_NotificationsPageEntity'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: Access not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
      tags:
      - notifications
      operationId: getV1Notifications
      summary: Get administration notifications
  /v1/notifications/{id}:
    get:
      description: Get administration notification by id
      parameters:
      - in: path
        name: id
        description: Notification identifier
        required: true
        schema:
          type: string
      - in: query
        name: administration_id
        description: Administration identifier
        required: true
        schema:
          type: string
      - in: query
        name: fields
        description: 'JSON object defining fields to receive (e.g {"only": ["field1", {"field2": ["field3"]}]})'
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Notification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_V1_NotificationEntity'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: Access not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
      tags:
      - notifications
      operationId: getV1NotificationsId
      summary: Get administration notification by id
components:
  schemas:
    CustomerApi_V1_NotificationDetailsEntity:
      type: object
      properties:
        bounce_reason:
          type: string
          description: Reason for a bounced mail (only for mail_bounced notification_type)
    CustomerApi_ErrorEntity:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
      required:
      - code
      - message
      description: CustomerApi_ErrorEntity model
    CustomerApi_V1_NotificationEntity:
      type: object
      properties:
        notification_type:
          type: string
          description: Notification type (see the [Notification model](https://docs.paytsoftware.com/models/notification)).
        resource_type:
          type: string
          description: Resource type the notification is about (administration|credit_case|debtor|invoice)
        acknowledged_by_user:
          allOf:
          - $ref: '#/components/schemas/CustomerApi_V1_UserEntity'
          description: User who acknowledged the notification
        details:
          allOf:
          - $ref: '#/components/schemas/CustomerApi_V1_NotificationDetailsEntity'
          description: Notification details
        credit_case_id:
          type: string
          description: Associated credit_case identifier
        debtor_id:
          type: string
          description: Associated debtor identifier
        administration_id:
          type: string
          description: Owning administration identifier
        id:
          type: string
          description: Unique identifier
        invoice_id:
          type: string
          description: Associated invoice identifier
        created_at:
          type: string
          format: date-time
          description: Timestamp at which the notification was created
        acknowledged_at:
          type: string
          format: date-time
          description: Timestamp at which the notification was acknowledged
        updated_at:
          type: string
          format: date-time
          description: Timestamp at which the notification was last updated
      required:
      - notification_type
      - resource_type
      - acknowledged_by_user
      - details
      - administration_id
      - id
      - created_at
      description: CustomerApi_V1_NotificationEntity model
    CustomerApi_V1_UserEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
        name:
          type: string
          description: Name
        email_address:
          type: string
          description: Email address
      required:
      - id
      - name
      - email_address
    CustomerApi_NotificationsPageEntity:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerApi_V1_NotificationEntity'
          description: Notification
        pagination:
          allOf:
          - $ref: '#/components/schemas/CustomerApi_PaginationEntity'
          description: Pagination details
      required:
      - data
      description: CustomerApi_NotificationsPageEntity model
    CustomerApi_PaginationEntity:
      type: object
      properties:
        cursor:
          type: string
          description: Cursor for fetching the next page
      required:
      - cursor
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth2 access token or static API token. See [Authorization](/authentication/authorization) for how to obtain one.