{"openapi":"3.0.3","info":{"title":"Innrapportering A-melding filopplasting API","description":"Tjeneste for innrapportering av A-melding via filopplasting","version":"0.1.2","termsOfService":"https://www.skatteetaten.no/deling/bruksvilkar-for-delingstjenester","contact":{"name":"Brukerstøtte","url":"https://www.skatteetaten.no/deling/kontakt/"}},"servers":[{"url":"https://innrapporteringameldingfilopplasting.api.skatteetaten-test.no/v1","description":"Ekstern test"}],"paths":{"/opplastinger":{"post":{"summary":"Laster opp fil","description":"Laster opp fil","operationId":"lastopp","tags":["filopplasting"],"requestBody":{"description":"Fil som sendes inn. Må følge schema 'Amelding' i <a href='https://app.swaggerhub.com/apis/skatteetaten/innrapportering-amelding-api/0.1.0'>Innrapportering A-melding API 0.1.0</a>","required":true,"content":{"application/json":{"schema":{"type":"string","format":"binary-stream"}}}},"responses":{"200":{"description":"Lastet opp OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpplastingRespons"}}}},"default":{"description":"Diverse feilmeldinger, se egen dokumentasjon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feil"}}}}}}},"/opplastinger/{id}":{"get":{"summary":"Henter status for en fil","description":"Henter status for en fil basert på gitt id. Viser ikke innhold i filer som er sendt inn","operationId":"statusForEnkelt","tags":["filopplasting"],"parameters":[{"name":"id","schema":{"$ref":"#/components/schemas/Id"},"in":"path","required":true,"description":"id'en til fila som skal hentes ut"}],"responses":{"200":{"description":"Status for filen. Merk at selv om responsen er OK, kan filen ha feilet validering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpplastingRespons"}}}},"default":{"description":"Alle feil fra applikasjonen kommer på følgende format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feil"}}}}}},"delete":{"summary":"Sletter fil","description":"Sletter fil med oppgitt id","operationId":"slett","tags":["filopplasting"],"parameters":[{"name":"id","schema":{"$ref":"#/components/schemas/Id"},"in":"path","required":true,"description":"id'en til fila som skal slettes"}],"responses":{"200":{"description":"Vellykket sletting av fil"},"default":{"description":"Alle feil fra applikasjonen kommer på følgende format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feil"}}}}}}},"/innsending":{"put":{"summary":"Sender inn fil","description":"Sender inn fil med oppgitt id","operationId":"sendInn","tags":["filopplasting"],"requestBody":{"description":"Opplasting som skal sendes inn","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Opplasting"}}}},"responses":{"200":{"description":"Vellykket Innsending av fil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Leveransebekreftelse"}}}},"default":{"description":"Alle feil fra applikasjonen kommer på følgende format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feil"}}}}}}}},"components":{"schemas":{"Opplasting":{"type":"object","description":"Opplastingsobjekt som inneholder id","properties":{"id":{"$ref":"#/components/schemas/Id"}},"required":["id"]},"OpplastingRespons":{"type":"object","description":"Responsobjekt ved kall mot endepunktene","allOf":[{"$ref":"#/components/schemas/Opplasting"}],"properties":{"status":{"enum":["LASTER_OPP","TIL_VALIDERING","VALIDERING_FEILET","KLAR_TIL_INNSENDING"]},"feilliste":{"type":"array","items":{"$ref":"#/components/schemas/Valideringsfeil"}},"sistOppdatertTidspunkt":{"type":"string","format":"date-time"}},"required":["id","status"]},"Valideringsfeil":{"properties":{"feilkode":{"$ref":"#/components/schemas/Tekst"},"feilspesifisering":{"$ref":"#/components/schemas/Tekst"},"melding":{"$ref":"#/components/schemas/Tekst"},"sti":{"$ref":"#/components/schemas/Tekst"},"antallTilfeller":{"type":"integer"}},"required":["feilkode","antallTilfeller"]},"Feil":{"type":"object","description":"","properties":{"kode":{"description":"Feilkode som gir en overordnet klassifisering av feilene som er funnet","$ref":"#/components/schemas/Tekst"},"melding":{"description":"Tekstlig beskrivelse av feilen som er funnet på et overordnet nivå","$ref":"#/components/schemas/Tekst"},"korrelasjonsid":{"description":"Korrelasjonsid'en som fulgte med kallet som forårsaket meldingen","$ref":"#/components/schemas/Tekst"},"spesifisering":{"type":"array","description":"","items":{"$ref":"#/components/schemas/Feilspesifisering"}}}},"Feilspesifisering":{"type":"object","description":"Detajert feilmelding på få felt-nivå.","properties":{"kode":{"description":"","$ref":"#/components/schemas/Tekst"},"melding":{"description":"Ytterligere tekstlig beskrivelse av feilen.","$ref":"#/components/schemas/Tekst"},"sti":{"description":"Sti til felt.  Hvert nivå er skilt med '/'/","$ref":"#/components/schemas/Tekst"},"angittVerdi":{"description":"Verdien som ble sendt inn","$ref":"#/components/schemas/Tekst"}}},"Leveransebekreftelse":{"type":"object","description":"Bekreftelse på gyldig innsending. Returnerer dialogId, forsendelseId og meldingsId etter vellykket innsending","properties":{"dialogId":{"$ref":"#/components/schemas/DialogId"},"forsendelseId":{"$ref":"#/components/schemas/ForsendelseId"},"meldingsId":{"description":"(<a href='https://data.skatteetaten.no/web/datakatalog/begrep/dcfb4774-e484-11e6-9cb3-005056821322'>Begrepsreferanse</a>)","type":"string"}},"required":["dialogId","forsendelseId","meldingsId"]},"Id":{"description":"Id som representerer filen som er lastet opp","type":"string","format":"uuid"},"DialogId":{"description":"Id som representerer en opprettet dialog i Dialogporten","type":"string","format":"uuid"},"ForsendelseId":{"description":"Id som representerer en forsendelse (Transmission i Dialogporten)","type":"string","format":"uuid"},"Tekst":{"type":"string","description":"vilkårlig lang sekvens av tegn inkludert aksenter og spesielle tegn fra standardiserte tegnsett (<a href='https://data.skatteetaten.no/begrep/20b52af3-9fe1-11e5-a9f8-e4115b280940'>Begrepsreferanse</a>)","maxLength":4000}}}}