openapi: 3.0.0
info:
  title: Assets API
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: |
    # Changelog
    All notable changes to the API.

    ## 2020-11-01

    > **new** Support for generate merchant sales terms
    > - [GET /v1/merchant/terms/sales_terms/{country}/{organization_number}/{data}](/assets-api/merchant-terms/v1_assets_merchant_country_organization_terms_sales_get)
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
tags:
  - name: merchant-terms
    x-displayName: Terms generator
paths:
  /merchant/terms/sales_terms/{country}/{organization_number}/{data}:
    get:
      operationId: v1_assets_merchant_country_organization_terms_sales_get
      summary: v1_assets_merchant_country_organization_terms_sales_get
      tags:
        - merchant-terms
      parameters:
        - name: country
          description: Country for organization
          in: path
          required: true
          schema:
            type: string
            minLength: 2
            maxLength: 2
            enum:
              - 'no'
        - name: organization_number
          description: Unique identifier for the company
          in: path
          required: true
          example: 919656395
          schema:
            type: string
            maxLength: 255
        - name: data
          in: path
          description: |
            Company details JSON encoded with base64 url encoding

            Payload:
            ```
            {
              "company_name": "Dintero AS",
              "contact_address": "Gaustadalléen 21, 0349 Oslo",
              "contact_email": "support@dintero.com",
              "contact_phone_number": "+47 22 34 34 54",
              "currencies": ["NOK", "SEK"]
            }
            ```
          required: true
          schema:
            type: string
            format: base64Url
      responses:
        '200':
          description: Sales terms
          content:
            text/html:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      x-mint:
        metadata:
          title: Sales terms
          sidebarTitle: Sales terms
x-tagGroups:
  - name: Merchant
    tags:
      - merchant-terms
servers:
  - url: https://assets.dintero.com/v1
components:
  responses:
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too Many Requests
      headers:
        Retry-After:
          description: |
            Indicates how long the user agent should wait
            in seconds before making a follow-up request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
