Versions Compared

Key

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

Beskrivning

Speglar fakturorna i Raindance och exponerar dom i ett sökbart API.
Fakturor äldre än 18 månader hämtas ej och är inte sökbara.

Livscykelstatus

Produktionssatt men under fortsatt utveckling

Lösningsbeskrivning

Gliffy
imageAttachmentIdatt1097203735
macroId32e1e479-99b1-4663-89fd-4313489a8eb2
baseUrlhttps://sundsvall.atlassian.net/wiki
nameinvoice-cache-gliffy
diagramAttachmentIdatt1097465897
containerId1097334811
timestamp1663250616385

Hantering av personuppgifter

Vissa personuppgifter i det fall fakturan tillhör en enskild firma

API specifikation

Expand
titleAPI-nyckel för test-miljö. Klicka på "Authorize" nedan och ange denna nyckel för att testa API:et

eyJ4NXQiOiJPV1l4TkRJd016ZGhPREk1WVdRNU1EZGxPREkzT1RZeU1qTXpZemN4TW1NMU0yRTFaREF5WXpGa01qQmpNV0ZrTkROa1pXVTFPRFk1T1dJMlpHRTBZZyIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJQRVJTT05BTFwvbWFyMTRoYW5AY2FyYm9uLnN1cGVyIiwiYXBwbGljYXRpb24iOnsib3duZXIiOiJQRVJTT05BTFwvbWFyMTRoYW4iLCJ0aWVyUXVvdGFUeXBlIjpudWxsLCJ0aWVyIjoiVW5saW1pdGVkIiwibmFtZSI6IkRlZmF1bHRBcHBsaWNhdGlvbiIsImlkIjozNCwidXVpZCI6IjAxZGJiYjRkLTQzZDQtNDUwMy04MGM0LWRhYTBhNDUzMjJjYiJ9LCJpc3MiOiJodHRwczpcL1wvYXBpLWltLXRlc3Quc3VuZHN2YWxsLnNlOjQ0M1wvb2F1dGgyXC90b2tlbiIsInRpZXJJbmZvIjp7IlVubGltaXRlZCI6eyJ0aWVyUXVvdGFUeXBlIjoicmVxdWVzdENvdW50IiwiZ3JhcGhRTE1heENvbXBsZXhpdHkiOjAsImdyYXBoUUxNYXhEZXB0aCI6MCwic3RvcE9uUXVvdGFSZWFjaCI6dHJ1ZSwic3Bpa2VBcnJlc3RMaW1pdCI6MCwic3Bpa2VBcnJlc3RVbml0IjpudWxsfX0sImtleXR5cGUiOiJQUk9EVUNUSU9OIiwic3Vic2NyaWJlZEFQSXMiOlt7InN1YnNjcmliZXJUZW5hbnREb21haW4iOiJjYXJib24uc3VwZXIiLCJuYW1lIjoiSW52b2ljZUNhY2hlIiwiY29udGV4dCI6IlwvaW52b2ljZWNhY2hlXC8xLjAiLCJwdWJsaXNoZXIiOiJQRVJTT05BTFwvbWFyMTRoYW4iLCJ2ZXJzaW9uIjoiMS4wIiwic3Vic2NyaXB0aW9uVGllciI6IlVubGltaXRlZCJ9XSwiaWF0IjoxNjYzMjUxMDIwLCJqdGkiOiI0MzNmYjRlZC02ZjMzLTRiYzUtYjkzNC1jZDA2MWUyMjdhYjcifQ==.A_3i4Rww_rgCzPDR20zCgigeeuDUJWZ49tpypTxilXw-1tz9bZtIy9EIRjsmz70uQ9V4NbmOIZVR-mVtydqQe25l87jk7hCSWKt2o11z5uZcXYPTpwq5Ojv9Rw6O_UwL3-O4e1A1YrKg-wLpzwG71gpbV_pYOh8vPVSCRBnihBHzXOIvaDkYRO37lOIx8a65h03W4YKn1gU-x7hdetqRceb7gNmdjRKBVSl0W6ssnrihiQjwpmFR7TzqRgnX20VoRKryhsAysZw_Ic-yUKGD3pUJkshRSAtZUU5F7CGD1YS6H4u9C83Mpc7Nuqutk2PLZEFWXcK1nYJIxDUerh0x-w==

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://microservicesapi-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

Team Dynasty
teamdynasty@sundsvall.se

Källkod

FAQ