Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Beskrivning

<Beskriv vad din applikation/mikrotjänst gör>

Livscykelstatus

<någon av: design, under utveckling, test, produktion, under avveckling, avvecklad>

Lösningsbeskrivning

<Infoga en Gliffy-bild som visuellt beskriver lösningen>Speglar fakturorna i Raindance och exponerar dom i ett sökbart API. Fakturor som är äldre än 18 månader hämtas ej

Livscykelstatus

Produktionssatt men under fortsatt utveckling

Lösningsbeskrivning

Gliffy
macroId32e1e479-99b1-4663-89fd-4313489a8eb2

Hantering av personuppgifter

<Vilka personuppgifter hanteras och varför?>Vissa personuppgifter i det fall fakturan tillhör en enskild firma

API specifikation

<API specifikation i Swagger-UI (använd plug-in).
Publicera även en API-Key mot Sandbox som gör att man kan testköra API:et.

API-specifikationen skall såklart reflektera att API-design följts fullt ut.>

Swagger ui
openapi: 3.0.1
info:
  title: api-invoicecache
  contact: {}
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  version: "1.0"
servers:
  - url: https://microservices-test.sundsvall.se/invoicecache
    description: Generated server url
paths:
  /getInvoices:
    get:
      tags:
        - Invoice Cache
      operationId: getInvoices
      parameters:
        - name: request
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/InvoiceRequest'
      responses:
        "200":
          description: Successful Operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoicesResponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
  /api-docs:
    get:
      tags:
        - API
      summary: OpenAPI
      operationId: getApiDocs
      responses:
        "200":
          description: OK
          content:
            application/yaml:
              schema:
                type: string
      x-auth-type: None
      x-throttling-tier: Unlimited
      x-wso2-mutual-ssl: Optional
components:
  schemas:
    InvoiceRequest:
      type: object
      properties:
        page:
          minimum: 1
          type: integer
          description: Page number
          format: int32
          example: 1
          default: 1
        limit:
          maximum: 1000
          minimum: 1
          type: integer
          description: Result size per page
          format: int32
          example: 100
          default: 100
        invoiceDateFrom:
          type: string
          description: Fetch invoices from (and including) this date.
          format: date
          example: 2022-01-01
        invoiceDateTo:
          type: string
          description: "Fetch invoices up to (and including) this date, includes invoices\
            \ to this date"
          format: date
          example: 2022-12-31
        dueDateFrom:
          type: string
          description: Fetch invoices that are due from (and including) this date.
          format: date
          example: 2022-01-01
        dueDateTo:
          type: string
          description: Fetch invoices that are due up to (and including) this date
          format: date
          example: 2022-12-31
        legalIds:
          type: array
          description: List of legalId for organizations or private firms
          example:
            - "5592841234"
            - "5592841235"
          items:
            type: string
            description: List of legalId for organizations or private firms
            example: "[\"5592841234\",\"5592841235\"]"
        ocrNumber:
          type: string
          description: Ocr number for the invoice
          example: "8907131234"
        invoiceNumbers:
          type: array
          description: Invoice numbers to fetch
          example:
            - "1234567"
            - "2345678"
          items:
            type: string
            description: Invoice numbers to fetch
            example: "[\"1234567\",\"2345678\"]"
      description: Invoice request model
    Address:
      type: object
      properties:
        city:
          type: string
          description: City
          example: Sundsvall
        street:
          type: string
          description: Street address
          example: Storgatan 10
        postcode:
          type: string
          description: Postal code
          example: "85740"
        careOf:
          type: string
          description: Care of
          example: John Doe
      description: Model for the Address
    Invoice:
      type: object
      properties:
        customerName:
          type: string
          description: Customer name
          example: Fritjofs Blommor
        customerType:
          type: string
          description: Customer type
          example: XH
        invoiceNumber:
          type: string
          description: Invoice number
          example: "53489546"
        invoiceStatus:
          type: string
          description: Invoice status
          example: PAID
          enum:
            - PAID
            - UNPAID
            - PARTIALLY_PAID
            - DEBT_COLLECTION
            - PAID_TOO_MUCH
            - UNKNOWN
        ocrNumber:
          type: string
          description: OCR Number
          example: "8907136421"
        legalId:
          type: string
          description: LegalId for organization or private firm
          example: "5592841234"
        reference:
          type: string
          description: Invoice reference
          example: Fritjof Fritjofsson
        invoiceDueDate:
          type: string
          description: When the invoice is due to be paid
          format: date
          example: 2022-05-05
        invoiceDate:
          type: string
          description: When the invoice was created
          format: date
          example: 2022-04-05
        paidAmount:
          type: number
          description: Amount already paid on the invoice.
          example: 4995.0
        totalAmount:
          type: number
          description: Amount to pay including VAT (SEK)
          example: 4995.0
        invoiceName:
          type: string
          description: "Filename of the invoice, if it is present"
          example: Faktura_5555555_to_9988776655.pdf
        vat:
          type: number
          description: Vat amount in SEK
          example: 999.0
        amountVatExcluded:
          type: number
          description: Amount without vat
          example: 3996.0
        invoiceType:
          type: string
          description: Invoice type
          example: NORMAL or CREDIT
          enum:
            - NORMAL
            - CREDIT
        invoiceAddress:
          $ref: '#/components/schemas/Address'
      description: Model for the Invoice
    InvoicesResponse:
      type: object
      properties:
        invoices:
          type: array
          items:
            $ref: '#/components/schemas/Invoice'
        _meta:
          $ref: '#/components/schemas/MetaData'
      description: Response with invoices
    MetaData:
      type: object
      properties:
        page:
          type: integer
          description: Current page
          format: int32
          readOnly: true
          example: 5
        limit:
          type: integer
          description: Displayed objects per page
          format: int32
          readOnly: true
          example: 20
        count:
          type: integer
          description: Displayed objects on current page
          format: int32
          readOnly: true
          example: 13
        totalRecords:
          type: integer
          description: Total amount of hits based on provided search parameters
          format: int64
          readOnly: true
          example: 98
        totalPages:
          type: integer
          description: Total amount of pages based on provided search parameters
          format: int32
          readOnly: true
          example: 23
      description: Metadata model
      readOnly: true
    Problem:
      type: object
      properties:
        instance:
          type: string
          format: uri
        type:
          type: string
          format: uri
        parameters:
          type: object
          additionalProperties:
            type: object
        status:
          $ref: '#/components/schemas/StatusType'
        title:
          type: string
        detail:
          type: string
    StatusType:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        reasonPhrase:
          type: string
  securitySchemes: {}

Säkerhetsklassning

Säkerhetsklass <0, 1, 2, 3, 4>

Autentiseringsmetod: <API Key, Oauth2>

Teknisk ägare

<Kontaktuppgifter till utvecklare/teknisk förvaltare>Team Dynasty
teamdynasty@sundsvall.se

Källkod

<Länk till källkoden på GIThub (om det finns)>

FAQ

<FAQ>