---
swagger: "2.0"
info:
  description: "# API Overview #\n\nGives an authorized organization (financing partner,\
    \ like a bank) access to export credit cover application documents that are submitted\
    \ for AGA-approval by the exporter in the myAGA customer portal. Those applications\
    \ can be queried and read from the myAGA portal platform to an external platform.\
    \ New \"draft\" applications may be appended pre-filled to the exporter's list\
    \ of open applications.\n\nThe API is supposed to be used by a server of a specific\
    \ financing partner (bank), usually in unattended access, e.g. batch or polling\
    \ mode. \n\n\n### Documents ###\n\n* Application documents exchanged in the API\
    \ contain the json-structured core data as single attributes or sub-objects or\
    \ array of objects. The application documents are covered by the **exportCoverageApplications**\
    \ endpoint group.\n\n* Alongside the application core there are usually binary\
    \ attachment streams (\"file uploads\", covered by the **attachments** endpoint\
    \ group) that contain uploads of any kind of document needed for processing the\
    \ application - like certifcates, reports or detailled project presentations.\n\
    \n### Endpoints ### \n\n* The API allows to query applications that are already\
    \ in a \"submitted\" state and therefore won't change. In this case the exporter\
    \ has already completed his application for export credit cover and now for example\
    \ wants to add an associated financing credit by a bank without the need to enter\
    \ the same data again. The exporter must have selected and confirmed the partner\
    \ actively in the myAGA UI.\n\n* New applications may be sent by the financing\
    \ partner (bank) to the myAGA platform to have them listed in the exporter's workspace\
    \ as application drafts for further processing. This covers the case when an external\
    \ partner (e.g. bank) wants to help the exporter on entering the basic facts for\
    \ his export credit cover application with AGA. The exporter will check this draft\
    \ application and continue to enter the remaining data.\n\n* The API allows the\
    \ exchange of application entities in both directions, as the structure is identical.\
    \ But it has to be noted that applications which were saved by a \"PUSH\" operation\
    \ are of state \"draft\" and therefore not supposed to be seen on subsequent API\
    \ collection queries. It can however curently be retrieved by direct reference\
    \ access - which could be revoked in future releases.\n\n* As the API is intended\
    \ for server-to-server use, operations like patch or delete are not provided.\n\
    \ \n### Notes ###\n\n* The API will show only those applications that are associated\
    \ with the ID of the API user (financing partner), which is not visible in the\
    \ API but determined on authorization. The partner's id is generally considered\
    \ internal to the backend system and not part of any request or data structure\
    \ throughout the API. This prevents unauthorized access across partners (banks).\
    \ Please contact AGA for further details.\n\n* Even if myAGA Portal could basically\
    \ accept every application that has a valid \"Deckungsnehmer\" identifier (see\
    \ ExportCoverageApplication definition) - as the exporter has to check and finish\
    \ the process in the portal UI - the user of this API should generally be able\
    \ to handle (tag and log) a rejection caused by validation, at least in future\
    \ releases of the service. Any validation fails will be explained in detail in\
    \ the Error response.\n\n* All APIs are protected by Oauth2 client credential\
    \ flow, any necessary access codes must be negotiated with AGA. \n\n* All country\
    \ codes are ISO 3166-1 alpha-2 and ISO 3166-2 (subdivision) country codes as defined\
    \ by EH. See the following country code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)\n\
    \  Subdivision codes are neccessary for certain countries like the Arab Emirates\
    \ (AE) where several subdivisions are distinguished (e.g. AE-AZ for Abu Dhabi).\
    \ The complete subdivision code consists of the 2-letter country code, a \"-\"\
    \ and an alphanumeric subdivision part.\n* There is also no explicit codeList\
    \ for currency fields. All currency fields contain the usual EUR or GBP codes,\
    \ values coming from the ISO 4217 nomenclature. See the following currency code\
    \ [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)\n\
    \n\n# History #\nDate     | Remarks\n---------|--------\n14/02/19 | Initial Release\n\
    28/02/19 | EH review changes\n14/03/19 | add categoryCode to attachment push\n\
    28/03/19 | finetuning for V1.0.0 launch\n"
  version: 1.0.0
  title: myAGA applications for export credit cover
  contact:
    email: java@di-unternehmer.com
host: my.agaportal.de
basePath: /api/myaga/export/v1
tags:
- name: ExportCoverageApplications
  description: Access to export credit cover applications
- name: Attachments
  description: Access to attached documents (files) of applications
- name: Reference data
  description: Specific reference data lists describing attributes of applications or attachemts to applications
schemes:
- https
paths:
  /exportCoverageApplications:
    get:
      tags:
      - ExportCoverageApplications
      summary: query on applications
      description: "Queries the list of export credit cover applications that are\
        \ in submitted state.\n\nThe API will show only those applications that are\
        \ associated with the ID of the API user by the exporter when he was entering\
        \ the application data. Only manually entered and successfully submitted applications\
        \ are shown.\n\nThe list is returned paged and sorted by time the exporter\
        \ published the application. The list starts with new applications and ends\
        \ with old ones.\n\nThe `sinceExportCoverageApplicationId` parameter can be\
        \ used to filter out old applications. If this parameter is given, the referenced\
        \ application and all older ones are removed from the result.\n\n**_Note_**\
        \ \n* The collection API will show only applications that were manually entered\
        \ by the exporter in the myAGA portal to reflect the use case \"API user polls\
        \ for submitted applications\".\n* Applications saved by POST may be retrieved\
        \ by id, but won't appear in this collection query. \n"
      operationId: getApplications
      produces:
      - application/json
      parameters:
      - name: sinceExportCoverageApplicationId
        in: query
        description: the first myAGA application to remove from the result
        required: false
        type: string
      responses:
        200:
          description: |
            Applications that match the search criteria. The response is paginated as defined in the "API guide lines" https://confluence.eulerhermes.com/display/AR/API+Design+Guidelines#APIDesignGuidelines-Pagination. The default page size is 20. It is also sorted by descending applicationDate
          schema:
            type: array
            items:
              $ref: '#/definitions/ExportCoverageApplication'
        400:
          description: bad input parameter
        401:
          description: unauthorized
        500:
          description: |
            internal server error, the server encountered an unexpected condition which prevented it from fulfilling the request
      security:
      - OAuth2:
        - application-read
        - application-write
    post:
      tags:
      - ExportCoverageApplications
      summary: create a new application
      description: |
        Save a new application filled with data in the workspace of the exporter who is referenced by the AGA specific dnNo in the exporterAgaIdentifier. This designation is maintained throughout myAGA context as an essential domain specific term. It's derived from German "Deckungsnehmer".
        Currently it's not possible to create new customer accounts via API means. The exporter has to be known to AGA and a validated myAGA account has to be registred and activated beforehand.
        At the moment there will be no modification allowed after the application is posted except upload of documents (see attachments API).
        Every push operation will create a new instance of the transferred data, there is currently no check available to match e.g. external references in order to prevent accidental multiple uploads.
      operationId: saveApplication
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        description: Application details
        required: true
        schema:
          $ref: '#/definitions/ExportCoverageApplication'
      responses:
        201:
          description: |
            Created application reference. This reference is a standard link to the draft intended for use with GET exportCoverageApplication/{exportCoverageApplicationId}, to grab the id the client could either reload the complete application or extract it from this URL.
          headers:
            Location:
              type: string
              format: url
              description: A link to the draft
        400:
          description: Invalid input, validation details are provided in Error structure
          schema:
            $ref: '#/definitions/Error'
        401:
          description: unauthorized
        500:
          description: |
            internal server error, the server encountered an unexpected condition which prevented it from fulfilling the request
      security:
      - OAuth2:
        - application-write
  /exportCoverageApplications/{exportCoverageApplicationId}:
    get:
      tags:
      - ExportCoverageApplications
      summary: get details
      description: |
        Reads the details of one single application. This application has been either uploaded by this API user or associated by the exporter to this API user.
      operationId: getApplication
      produces:
      - application/json
      parameters:
      - name: exportCoverageApplicationId
        in: path
        description: the myAGA application reference
        required: true
        type: string
      responses:
        200:
          description: |
            Application.
          schema:
            $ref: '#/definitions/ExportCoverageApplication'
        400:
          description: bad input parameter
        401:
          description: unauthorized
        403:
          description: authorized user has no access to this id
        404:
          description: the requested application does not exist
        500:
          description: |
            internal server error, the server encountered an unexpected condition which prevented it from fulfilling the request
      security:
      - OAuth2:
        - application-read
        - application-write
  /exportCoverageApplications/{exportCoverageApplicationId}/attachments:
    get:
      tags:
      - Attachments
      summary: query on attachments of an application
      description: |
        Queries the list of attachments that are assigned to one specific application. The list is paged.
        The access to certain attachment types is restricted depending on the source of the application. Those created by this API are not resticted but applications entrered and submitted by the exporter restrict access only to a subset of category types.

        The returned metadata contains the application-independent ID of the attachment which will serve as download identifier of the attachment's binary content when used with the GET exportCoverageApplication/{exportCoverageApplicationId}/attachments/{attachmentId} operation.

        Currently this list cannot be filtered by user-definable by API parameters. However it is filtered by restriced categoryCodes, the subset is provided by AGA (please contact). Following codes of submitted application attachments are accessible at the moment:

        category name   | description
        ----------------|------------
        CUSTOMER_REPORT | annual report
      operationId: getAttachmentList
      produces:
      - application/json
      parameters:
      - name: exportCoverageApplicationId
        in: path
        description: |
          Unique id of the application for which the attachment metadata should be queried.
        required: true
        type: integer
        default: 1
      responses:
        200:
          description: |
            application signatures, paginated (default page size 20) and sorted (default column is category,name asc)
          schema:
            type: array
            items:
              $ref: '#/definitions/AttachmentMetaData'
        401:
          description: unauthorized
        403:
          description: user authroized but access forbidden for this applicationId or attachment (see above)
        404:
          description: resource not found (ExportCoverageApplication does not exist)
        500:
          description: |
            internal server error, the server encountered an unexpected condition which prevented it from fulfilling the request
      security:
      - OAuth2:
        - application-read
        - application-write
    post:
      tags:
      - Attachments
      summary: upload a new attachment content to an existing application
      description: |
        Uploads a data stream (file) to an already saved application (referenced in the metadata parameter).
        Upload is only allowed on applications in draft state and will only be accepted on applications that were created by this API user. The API follows common HTTP upload procedures.
        The Content Metadata (see below) will be filled from file upload data (e.g. filename, size, MIME-type), currently only the
        category will be transferred by a formData field.

        About Metadata:
        * Uploads may be seen like file system files. Internally the myAGA backend stores data in database-like structures and metadata in a table, so the identifying item of the stream is its id (and not the name), which is returned in the link result. IDs of attachments are unique across all applications.
        * This API will accept only category types that are defined in the categoryType reference data list (but it will accept any of it). Please note that AGA will only allow read access to a reduced subset of types, see GET.
        * For commonly used types see AttachmentMeta model.
        * The number of documents in a category is not restricted. API users should provide meaningful filenames. The portal will not overwrite streams with existing names as it cretes a unique id for every upload and the names are treated as unchecked metadata information.
      operationId: uploadAttachment
      consumes:
      - multipart/form-data
      produces:
      - application/json
      parameters:
      - name: exportCoverageApplicationId
        in: path
        description: the application for which the attachment query is performed
        required: true
        type: string
      - name: file
        in: formData
        description: the file to be uploaded
        required: true
        type: file
      - name: categoryCode
        in: formData
        description: |
          The category code. Valid codes for upload may be queried by the refData endpoint.
        required: true
        type: string
      responses:
        201:
          description: "Created attachment content. This reference is a standard link\
            \ to the attachment intended for downloading the content as binary stream\
            \ with GET attachments/{id}. To grab the id the client could either reload\
            \ the attachment list or extract it from this URL. \n"
          headers:
            Location:
              type: string
              format: url
              description: A link to download the newly created attachment
        401:
          description: unauthorized
        403:
          description: user authorised, but upload forbidden on this id
        404:
          description: resource not found
        500:
          description: |
            internal server error, the server encountered an unexpected condition which prevented it from fulfilling the request
      security:
      - OAuth2:
        - application-write
  /exportCoverageApplications/{exportCoverageApplicationId}/attachments/{attachmentId}:
    get:
      tags:
      - Attachments
      summary: get details
      description: |
        Downloads the binary content of one specific attachment. As every attachment reference is unique across all applications, there is no need to provide the application reference too.
      operationId: downloadAttachment
      produces:
      - application/json
      parameters:
      - name: exportCoverageApplicationId
        in: path
        description: |
          Unique id of the application for which the attachment metadata should be queried.
        required: true
        type: integer
        default: 1
      - name: attachmentId
        in: path
        description: the attachment reference
        required: true
        type: string
      responses:
        200:
          description: |
            download on referenced stream is ready.
          schema:
            type: file
        400:
          description: bad input parameter
        401:
          description: unauthorized
        403:
          description: authorized user has no access to this id
        404:
          description: the requested application or attachment does not exist
        500:
          description: |
            internal server error, the server encountered an unexpected condition which prevented it from fulfilling the request
      security:
      - OAuth2:
        - application-read
        - application-write
  /exportCoverageApplications/refData/attachmentCategories:
    get:
      tags:
      - Reference data
      summary: get available category types
      description: |
        Generates a list of every valid attachment category that is accepted with operations on applications that were created by this API. The access to attachments of application created and submitted by the exporter is restricted to a subset of this list, see **GET attachments** operation.
        Access to this list is not paginated and unsorted.
        This reference data is specific to **attachments** in this API.
      operationId: getAttachmentCategoryList
      produces:
      - application/json
      parameters: []
      responses:
        200:
          description: |
            list of all available attachment categories, contact AGA for further reference
          schema:
            type: array
            items:
              $ref: '#/definitions/AttachmentCategory'
        401:
          description: unauthorized
        500:
          description: |
            internal server error, the server encountered an unexpected condition which prevented it from fulfilling the request
securityDefinitions:
  OAuth2:
    type: oauth2
    tokenUrl: https://my.agaportal.de/oauth/token
    flow: application
    scopes:
      application-read: Grants query and read access to applications and attachments
      application-write: Grants upload access to save new applications and attachment streams
definitions:
  ExportCoverageApplication:
    type: object
    properties:
      exportCoverageApplicationId:
        type: string
        description: |
          A unique reference that identifies the application. This reference is guaranteed to be closely tied to the application during its whole lifecycle.
          Further details of this application may be requested using this reference value with the /exportCoverageApplications/{exportCoverageApplicationId} path endpoint method and this id also is used as reference in the attachment API group.
        readOnly: true
      exporterAgaIdentifier:
        $ref: '#/definitions/AgaCompanyIdentifier'
      applicationDate:
        type: string
        format: date
        description: |
          The date of submission of the application.
          The format is YYYY-MM-DD
        readOnly: true
      exportCountryCode:
        type: string
        example: AE
        description: |
          The AGA countryCode of the country where the exporter intends to export his goods or services to.
          Country codes are ISO 3166-1 alpha-2 country codes as defined by EH. See the following country code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)
      exportCountrySubdivisionCode:
        type: string
        example: AE-AZ
        description: |
          Country subdivision ISO 3166-2 subdivision codes, as defined by EH. See the following country code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)
      importerAgaIdentifier:
        $ref: '#/definitions/AgaCompanyIdentifier'
      importerAddress:
        $ref: '#/definitions/Address'
      hasAlternativeShipmentAddress:
        type: boolean
        description: |
          true if the importer uses a different shipping address
      shipmentAddress:
        $ref: '#/definitions/Address'
      hasPaymentExperience:
        type: boolean
        description: |
          true if there is a history of previous payments available.
      paymentExperienceDescription:
        $ref: '#/definitions/PaymentHistory'
      typeOfGoodsCode:
        type: string
        description: |
          Classifies the major part of exported goods or services in this project.
          Currently the following classifications are distinguished:
          * INVESTMENT - investment goods
          * CONSUMABLE - usuallay indicates faster project completion
        enum:
        - INVESTMENT
        - CONSUMABLE
      sectorCode:
        type: string
        description: |
          Identifies the classification of the customer's sector. Currently those values are defined:
          * PRIVATE - private sector
          * PUBLIC - public sector
        enum:
        - PRIVATE
        - PUBLIC
      isMilitary:
        type: boolean
        description: |
          Determines if the importer comes from military sector. This attribute can be combined with both private or public importers.
      shortDescription:
        type: string
        description: |
          One-line description of the export project.
        maxLength: 60
      projectDescription:
        type: string
        description: "Multi-line description of the export project. The API and myAGA\
          \ are not restricting the length of this field. \nClients with a technical\
          \ limitation should treat this information accordingly, e.g. store the data\
          \ in a local stream (like an attachment).\n"
      isContractSigned:
        type: boolean
        description: |
          true if the contract has already been signed.
      signedContracts:
        type: array
        description: "If contractSigned is set to \"true\", this list should contain\
          \ details of all signed contracts. \n"
        items:
          $ref: '#/definitions/SignedContract'
      hasCertificateOfOrigin:
        type: boolean
        description: "true if the origin is certified. \nGerman \"Warenursprungszeugnis\"\
          .\n"
      hasForeignSupplies:
        type: boolean
        description: "true if the exported product or parts depend on foreign supplies.\
          \ \n"
      foreignSupplies:
        type: array
        description: "If the exported products consist of parts supplied by foreign\
          \ suppliers, those parts may be specified in detail. \n"
        items:
          $ref: '#/definitions/ForeignSupplies'
      exportCurrencyCode:
        type: string
        description: |
          Currency of the export application (between exporter and AGA).
          Uses the standard ISO-4217 code for currencies (EUR, USD, ...). See the following currency code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)
        maxLength: 3
      estimatedEURValueAmount:
        type: number
        format: double
        description: |
          Estimate in EUR of the total export value as indicated in the "check" page of the myAGA UI. It provides corse steps coming from myAGA UI, but coming from other sources this parameter may contain any other value.
      estimatedCreditMonths:
        type: integer
        description: |
          The exporter gives this estimation on the first page (preliminary check) of the myAGA UI. It describes the expected period of the requested coverage. Although the granularity is down to months, this level of accuracy is only relevant in the short range below one year. The myAGA UI uses non-linear steps to cover this.
          value 0 (as opposed to undefined): Please note that currently by convention 0 stands for "L/C / Akkreditiv" meaning that a letter of credit has been received.
      orderCurrencyCode:
        type: string
        description: "Currency of the order (between importer and exporter).\nUses\
          \ the standard ISO-4217 code for currencies (EUR, USD, ...). See the following\
          \ currency code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)\
          \ \n"
        maxLength: 3
      orderValueAmount:
        type: number
        format: double
        description: |
          Total export value.
      servicesValueAmount:
        type: number
        format: double
        description: |
          Total value of included services.
      hasServices:
        type: boolean
        description: |
          true if the exported products not only contain goods but also services.
      isOverallProject:
        type: boolean
        description: |
          true if the project referenced here is the leading project and if the whole export consists of several subproject.
      isUsedGoods:
        type: boolean
        description: |
          true if the export consists at least partially of used goods.
      isSensitiveArea:
        type: boolean
        description: |
          true if the region where the import is located has restrictions based for example on culture or environemnt.
      isExportLicenceNeeded:
        type: boolean
        description: |
          true if the export is subject of an export permit license.
      deliveryDate:
        type: string
        format: date
        description: |
          The date of delivery if there is one shipment. Or the date of the _first_ shipment if there are more than one.
          Format is YYYY-MM-DD
      hasMultipleDeliveries:
        type: boolean
        description: |
          true if the delivery consists of multiple parts over a certain time period which should be explained by the fields deliveryDate and lastDeliveryDate.
      lastDeliveryDate:
        type: string
        format: date
        description: |
          The date of the last delivery if there is more than one shipment.
          Format is YYYY-MM-DD
      isCoverageCostIncluded:
        type: boolean
        description: "true if the exporter chooses to include (Hermes) coverage cost\
          \ in the financing amount \n"
      buyerCreditAmount:
        type: number
        format: double
        description: |
          estimation of the the credit value needed, calculated as difference between total order value and sum of advance payments
    description: "Represents the complete data of one export credit cover application.\n\
      Local files containing documents in various binary formats could be uploaded\
      \ and accessed by the **attachments** API endpoints.\n\nThe record contains\
      \ list of company identifiers. The most important one is the AGA specific exporterAgaIdentifier\
      \ where the identifing id is commonly known as \"dnNo\". This designation is\
      \ maintained throughout API and myAGA context as an essential domain specific\
      \ term. It's derived from German \"Deckungsnehmer\".    \n"
  Address:
    type: object
    properties:
      companyName:
        type: string
        description: Name of the company
      countryCode:
        type: string
        description: ISO 3166-1 alpha-2 Country Code
      subdivisionCode:
        type: string
        description: depending on the country, this contains the region, state, department, province, county...
      addressLine1:
        type: string
      addressLine2:
        type: string
      addressLine3:
        type: string
      streetNumber:
        type: string
      streetname:
        type: string
      town:
        type: string
      postalCode:
        type: string
      postalCodeTypeCode:
        type: string
      postOfficeBox:
        type: string
      isMainAddress:
        type: boolean
      alphabetCode:
        type: string
        description: Alphabet used by the fields of the address.
        enum:
        - latin
        - non-latin
    description: |
      Address information defined by EH, see [EH API Guidelines.](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000).

      The fields will be mapped to internal AGA structures. Currently when POSTing addressLine1, addressLine2, addressLine3, streetName and streetNumber will be imported. Currently when GETting addressLine1 and addressLine2 will be exported and addressLine3, streetName and streetNumber will not be filled.
  AgaCompanyIdentifier:
    type: object
    properties:
      dnNo:
        type: string
        example: "654321"
        description: |
          This is an internal identifier used for customers. The designation is maintained throughout API and myAGA context as an essential domain specific term. It is not translated and stands for German "Darlehensnehmer". Currently length and valid characters are restricted but API users should not rely on numeric appearance.
        pattern: ^[1-9]\d{5}$
      akNo:
        type: string
        example: "12345"
        description: |
          This is an internal identifier used for foreign contacts. The designation is maintained throughout API and myAGA context as an essential domain specific term. It is not translated and stands for German "Ausländischer Kunde". Currently length and valid characters are restricted but API users should not rely on numeric appearance.
        maxLength: 250
        pattern: ^[1-9]\d{4}$
      registrationId:
        type: string
        example: HRB 12260
        description: |
          The registration number at the registration court of the company. This is mandatory for German companies and together with the registrationCourt forms a unique national identifier.
        maxLength: 250
      registrationCourt:
        type: string
        example: Amtsgericht Wiesbaden
        description: |
          The registration authority where the company is registered. This is mandatory for German companies and together with the registrationId forms a unique national identifier.
        maxLength: 250
    description: "Company idendification information defined speficicly by EH-AGA,\
      \ due to the\nspecial status of AGA as mandete of the German government. \n\
      The identifiers here are not in common use in the EH context. \nIf needed, future\
      \ versions of this API will introduce the standard \nEH CompanyIdentifier type\
      \ list with well-declared id qualifiers to integrate common\nEH and international\
      \ identifications.\n"
  SignedContract:
    type: object
    properties:
      contractSignedDate:
        type: string
        format: date
        description: |
          the date of signing the contract.
          The format is YYYY-MM-DD
      contractReference:
        type: string
        description: |
          reference number assigned to the contract.
        maxLength: 50
    description: "Description of one signed contract. Used as part of the ExportCoverageApplication\
      \ object.    \n"
  ForeignSupplies:
    type: object
    properties:
      countryCode:
        type: string
        example: AE
        description: |
          The EH countryCode of the country where the supplies are ordered from.
          Country codes are ISO 3166-1 alpha-2 country codes as defined by EH. See the following country code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)
          The AGA countryCode of the country where the exporter intends to export his goods or services to.
      countrySubdivisionCode:
        type: string
        example: EA-AZ
        description: |
          Country subdivision ISO 3166-2 subdivision codes as defined by EH. See the following country code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)
      supplyCurrencyCode:
        type: string
        description: "The currency of the supply contract (between exporter and supplier).\
          \  \nUses the standard ISO-4217 code for currencies (EUR, USD, ...). See\
          \ the following currency code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)\
          \ \n"
      supplyAmount:
        type: number
        format: double
        description: |
          The total value (amount) of the shipments coming from the country specified.
    description: |
      Description of the foreign supplies obtained from a foreign country. Used only as part of the ExportCoverageApplication object.
  PaymentHistory:
    type: object
    properties:
      previousDealYears:
        type: string
        description: |
          Classifies the timespan of previous deals.
          Currently the following classifications are distinguished:
          * LESS_THAN_ONE less than 1 year
          * ONE_TO_FIVE 1 to 5 years
          * FIVE_TO_TEN 5 to 10 years
          * MORE_THAN_TEN > 10 years
        enum:
        - LESS_THAN_ONE
        - ONE_TO_FIVE
        - FIVE_TO_TEN
        - MORE_THAN_TEN
      previousDealCount:
        type: integer
        description: |
          Count of previous deals. Counts of more then 10 will be accepted and presented as "> 10" in UI.
      averagePaymentTerms:
        type: string
        description: |
          Determines the average/usual timespan of payment.
          * SHORT Indicates that a siginificant count was short-term (less than 2 years).
          * LONG Indicates that a siginificant count was long-term (2 years or more).
        enum:
        - SHORT
        - LONG
      averageDealCurrencyCode:
        type: string
        description: |
          Currency of the average value below.
          Uses the standard ISO-4217 code for currencies (EUR, USD, ...). See the following currency code [reference data API](https://confluence.eulerhermes.com/pages/viewpage.action?pageId=3738000)
        maxLength: 3
      averageDealAmount:
        type: number
        format: double
        description: |
          The average amount of previous deals.
      payment:
        type: string
        description: |
          Indicates overall payment behaviour.
          * ON_TIME always paid on time
          * DELAYED some or all payments were delayed
          * DEFAULT some or all payments were not paid
        enum:
        - ON_TIME
        - DELAYED
        - DEFAULT
      paymentProblemDescription:
        type: string
        description: |
          An optional description of past payment problems. The content length is not limited.
    description: |
      Describes the history details of previous payment experiences with a customer.
  AttachmentMetaData:
    type: object
    required:
    - applicationId
    properties:
      attachmentId:
        type: string
        example: "1234"
        description: |
          A unique reference that identifies the attachment. It is unique across applications. This reference is guaranteed to be closely tied to the attachment during its whole lifecycle.
      applicationId:
        type: string
        example: "354"
        description: |
          A unique reference that identifies the application.
      fileName:
        type: string
        example: report.pdf
        description: |
          This represents the local filename under which the contents of this attachment stream is known to the exporter.
        maxLength: 250
      contentType:
        type: string
        example: application/pdf
        description: |
          This MIME type is assigned to the http header when downloading the stream. Follows standard MIME-types without specific codelist.
        maxLength: 250
      categoryCode:
        type: string
        example: OTHER
        description: "The category code. Valid codes for upload may be queried by\
          \ the refData endpoint. The values - though constant in one release of myAGA\
          \ portal and also not user-changeable - are deliberatly provided as seperate\
          \ endpoint /referencedata/attachmentCategories, as the categories may change\
          \ frequently thoughout the portal's lifecycle. \nFor GET access on attachments\
          \ assiciated to an application that was submitted by the exporter restrictions\
          \ apply. See GET attachements operation.\n\nCommon attachment Categories:\n\
          category name   | description\n----------------|------------\nCUSTOMER_REPORT\
          \ | annual report\nOTHER           | any other document that should be transferred\n"
    description: |
      Represents the Metadata of attached binary streams, enabling uploads and downloads of document files belonging to the application.
  AttachmentCategory:
    type: object
    properties:
      categoryCode:
        type: string
        example: OTHER
        description: The category type.
      categoryLabel:
        type: string
        description: label associated to the category type
      contentLanguage:
        type: string
        description: ISO code of the language associated to the label, refers to referenceData/languages
    description: |
      Represents a category that is valid for the category field in AttachmentMeta.
      An API client must not provide any other attachment category codes than found in the name field of an AttachmentCategory entry.
      The list of allowed categoryTypes is subject to change over time.
      In future versions this entity will be extended by other static information like a human-readable translations.
  Error:
    type: object
    required:
    - errorCode
    - message
    properties:
      errorCode:
        type: string
        description: "code related to the error      | description\n-------------------------------|-------------\n\
          AGA_ERR_REST                   | REST or HTTP error \nAGA_ERR_JSON_PARSER\
          \            | json format error, e.g. missing apostroph\nAGA_ERR_JSON_MAPPING\
          \           | formal validation of json input\nAGA_ERR_GATEWAY_DATA_MAPPING\
          \   | mapping of gateway to internal API\nAGA_ERR_DATA_VALIDATION      \
          \  | backend validation error\n"
        enum:
        - AGA_ERR_REST
        - AGA_ERR_JSON_PARSER
        - AGA_ERR_JSON_MAPPING
        - AGA_ERR_GATEWAY_DATA_MAPPING
        - AGA_ERR_DATA_VALIDATION
      message:
        type: string
        description: description of the error
      debugId:
        type: string
        description: identifies the error event in logs
      errorDetails:
        type: array
        items:
          $ref: '#/definitions/Error_errorDetails'
      links:
        type: array
        items:
          type: string
          format: uri
          example: /exportCoverageApplications/123
  Error_errorDetails:
    required:
    - field
    - issue
    - value
    properties:
      field:
        type: string
        description: |
          name of parameter or body attribute to which the error is
          related
      value:
        type: string
        description: value of the field in error
      issue:
        type: string
        description: reason for the error
      location:
        type: string
        description: |
          location of the field in the error, either query, path, or body.
          If this field is not present, the default value is body