Koin Communication Services API

The Communication Services API from Koin — 1 operation(s) for communication services.

OpenAPI Specification

koin-communication-services-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Antifraud Access Communication Services API
  description: Antifraud services
  license:
    name: Apache License Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '2.0'
servers:
- url: https://api-sandbox.koin.com.br
  description: Sandbox domain url
tags:
- name: Communication Services
paths:
  /v1/payment/orders/{order_id}/account-validation:
    post:
      tags:
      - Communication Services
      summary: Validate account
      description: Validate account for communications
      operationId: validateAccountPOST
      parameters:
      - name: order_id
        in: path
        description: Order ID related to the transaction
        example: 5t1bc9001-6b5a-4f21-b5ee-fd32m4f436c6
        schema:
          type: string
        required: true
      - name: Content-Type
        in: header
        example: application/json
        description: The Media type of the body of the request. Default value for payment provider protocol is application/json
        schema:
          type: string
        required: true
      - name: Accept
        in: header
        example: application/json
        description: Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json
        schema:
          type: string
        required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateAccountType'
      responses:
        '200':
          description: Validate account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateAccountResponse'
              examples:
                Validate account successfully:
                  $ref: '#/components/examples/ValidateAccountExampleResponse'
                Unable to validate account:
                  $ref: '#/components/examples/UnableToValidateAccountExampleResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Invalid type:
                  value:
                    code: 400
                    message: Validation failed
                    causes:
                    - type has an illegal value, options are [Account_validation_whatsapp, Whatsapp]
        '404':
          description: Invalid order ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Communication failed:
                  value:
                    code: 404
                    message: Resource with order_id 3d8b0956-1a91-42a0-bbba-0b1154a3c529 not found.
components:
  examples:
    UnableToValidateAccountExampleResponse:
      value:
        status:
          type: Failed
          reason: 'Invalid orderId: c2b0b09e-d79b-4c1e-97a8-b1418543356c'
    ValidateAccountExampleResponse:
      value:
        status:
          type: Sent
  schemas:
    ErrorResponse:
      title: Error Response
      type: object
      properties:
        code:
          type: string
          description: Standardized error code.
        message:
          type: string
          description: Error message.
        causes:
          type: array
          description: List of error causes.
          items:
            type: string
    ValidateAccountResponse:
      title: Validate account successfully
      type: object
      required:
      - status
      properties:
        status:
          type: object
          required:
          - type
          properties:
            type:
              type: string
              enum:
              - Sent
              - Failed
              description: Account validation status.
            reason:
              type: string
              description: Reason for which it was not possible to validate the account. Only available in Failed status type.
    ValidateAccountType:
      title: Type
      required:
      - type
      type: object
      properties:
        type:
          type: string
          description: Validation channel
          enum:
          - Whatsapp