Versions Compared

Key

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

Beskrivning

API:t visar avtal kopplade till en anläggning.

Livscykelstatus

Under design

Lösningsbeskrivning

<Infoga en Gliffy-bild som visuellt beskriver lösningen>

Hantering av personuppgifter

<Vilka personuppgifter hanteras och varför?>

API specifikation

Swagger ui
---
openapi: 3.0.21
info:
  title: API-Agreement
API   description: "API used to get agreement of a facility"contact: {}
  version: 1."0.01"
tags:
  - name: Agreement API endpoints
  description: Agreement resources
paths:
  /agreements/{category}/facilities/{facilityId}:
    get:
      tags:
 
      - Agreement
API endpoints
      summary: Get agreementagreements by category and facility-id
      parametersoperationId: getAgreementsByCategoryAndFacilityId
      parameters:
      - name: category
 
        in: path
 
        description: CategoryAgreement  category
        required: true
          styleschema:
simple           explodetype: falsestring
          schemadescription: Category model
          typeenum:
string          - COMMUNICATION
example: 'ELECTRICITY'         - name:DISTRICT_HEATING
facilityId          - in:DISTRICT_COOLING
path          - description:ELECTRICITY
Facility ID         - WASTE_MANAGEMENT
required: true         - WATER
style: simple       example: ELECTRICITY
  explode: false   - name: facilityId
     schema:   in: path
        typedescription: stringId for the facility
        examplerequired: '1471222'true
      responses:  schema:
      "200":    type: string
     description: Successful operation   example: 1471222
      contentresponses:
        "404":
   application/json:       description: Not found
     schema:     content:
           $ref: '#/components/schemas/AgreementResponse'application/json:
        "400":      schema:
    description: Bad request           content$ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponseProblem'
        "500200":
          description: InternalSuccessful server erroroperation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceErrorResponseAgreementResponse'
components:   schemas:       AgreementResponse:  application/problem+json:
      type: object         propertiesschema:
            agreements:    $ref: '#/components/schemas/AgreementResponse'
         type: array"500":
              description: AgreementInternal Server error
            itemscontent:
                requiredapplication/json:
              schema:
   - customerId            $ref: '#/components/schemas/Problem'
     - billingId      application/problem+json:
            - agreementId schema:
                 - mainAgreement$ref: '#/components/schemas/Problem'
        "400":
          -description: fromDateBad request
          content:
      - toDate     application/json:
             - bindingschema:
                type$ref: object'#/components/schemas/Problem'
                propertiesapplication/problem+json:
              schema:
   customerId:             $ref: '#/components/schemas/Problem'
components:
     typeschemas:
string    Problem:
      type: object
        descriptionproperties:
Customer Id       instance:
             exampletype: '81471222'string
                  billingIdformat: uri
        type:
          type: string
          format: uri
        descriptionparameters:
Billing Id         type: object
          exampleadditionalProperties:
'111222333'                   agreementIdtype: object
        status:
          type$ref: string'#/components/schemas/StatusType'
        title:
           descriptiontype: Agreementstring
Id        detail:
          type:  example: '223344-A'string
    StatusType:
      type: object
      mainAgreementproperties:
         statusCode:
          type: booleaninteger
          format: int32
        descriptionreasonPhrase:
Is main agreement        type: string
    Agreement:
      exampletype: trueobject
      properties:
           fromDate:
         customerId:
          type: string
          description: Customer identifier at the supplier of the agreement
 format: date        readOnly: true
           descriptionexample: From"81471222"
date        billingId:
            exampletype: '2021-01-01'string
          description: Billing identifier
     toDate:     readOnly: true
              typeexample: string"111222333"
        agreementId:
           formattype: datestring
          description: Agreement  identifier
      description: To date          readOnly: true
          example: '2021-12-31'223344-A
        mainAgreement:
          bindingtype: boolean
          description: Signal indicating whether the agreement is the main type:agreement
boolean            or  not
      description: Is bound          readOnly: true
          example: true
        binding:
          bindingRuletype: boolean
                   typedescription: stringSignal indicating whether the agreement has a binding period
            description:or Rulenot
of binding         readOnly: true
          example: '12true
mån bindning'       ServiceErrorResponsebindingRule:
          type: objectstring
          propertiesdescription: Description of the binding rule in cases where the agreement
  httpCode:          has a binding period
 format: int32        nullable: true
     type: integer    readOnly: true
       message:   example: 12 mån bindning
        typefromDate:
string             technicalDetailstype: string
             $refdescription: '#/components/schemas/TechnicalDetails'
   Start date of the agreement
  TechnicalDetails:           typeformat: objectdate
          propertiesreadOnly: true
           rootCodeexample: 2022-01-01
             format: int32
toDate:
             type: integerstring
          description: End rootCause:date of the agreement
           typeformat: stringdate
            serviceIdreadOnly: true
          example: 2022-12-31
 type: string    description: Agreement model
      requestIdAgreementResponse:
      type: object
      typeproperties:
string        agreements:
    details:      type: array
       type: array  items:
            items$ref: '#/components/schemas/Agreement'
      description: Agreement response model
     typesecuritySchemes: string{}

Säkerhetsklassning

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

Autentiseringsmetod: <API Key, Oauth2>Oauth2

(Ref: Säkerhetsklassning av APIer )

API-ägare

<Kontaktuppgifter till den verksamhet som äger APIets livscykel>

Teknisk ägare

<Kontaktuppgifter till utvecklare/teknisk förvaltare>

Länkar

<Länkar till dev-portal;

  • Test

  • Sandbox

  • Produktion>

    https://sundsvall.atlassian.net/wiki/spaces/API

    För tekniska frågor: teamunmasked@sundsvall.se

    Länkar

    FAQ

    <FAQ>