{"openapi":"3.0.1","info":{"title":"Data.altinn.no","description":"The core api used for all actual operations in data.altinn.no. Requires both authentication and a subscription key. The subscription is subject to an approval process.","version":"1.0","contact":{"name":"Altinn","url":"https://altinn.github.io/docs/utviklingsguider/data.altinn.no/","email":"api@altinn.no"}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/Altinn/data.altinn.no/1.0"},{"url":"https://api.data.altinn.no/v1"}],"paths":{"/metadata/evidencecodes":{"get":{"summary":"Gets all available evidence codes","operationId":"get-metadataevidencecodes","responses":{"200":{"description":"List of evidence codes","content":{"application/json":{"example":[{"evidenceCodeName":"some text","description":"some text","accessMethod":"some text","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true},{"evidenceCodeName":"some text","description":"some text","accessMethod":"some text","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true}]}}}}}},"/accreditations/{accreditationId}":{"delete":{"summary":"Deletes an accreditation","operationId":"delete-accreditation","parameters":[{"name":"accreditationId","in":"path","description":"The id of the accrreditation to be deleted","required":true,"schema":{"type":"string"}},{"name":"Ocp-apim-subscription-key","in":"header","description":"The calling system's api key - requested in the developer portal","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The accreditation was successfully deleted"},"403":{"description":"If non-existing accreditation id, accreditation id not owned by authenticated party or other authentication or authorization error."}}}},"/accreditations/":{"get":{"summary":"Gets accreditations","operationId":"get-accreditations","parameters":[{"name":"requestor","in":"query","description":"Filter accreditations by requestor identifier","schema":{"type":"string"}},{"name":"changedafter","in":"query","description":"Filter accreditations by last status change","schema":{"type":"string"}},{"name":"onlyavailable","in":"query","description":"Only get accreditations where all evidence sources are available for harvest","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"example":[{"accreditationId":"some text","requestor":"some text","subject":"some text","evidenceCodes":[{"evidenceCodeName":"some text","description":"some text","accessMethod":"some text","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true},{"evidenceCodeName":"some text","description":"some text","accessMethod":"some text","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true}],"issued":"2018-02-10T09:30:00.0000000+00:00","validTo":"2018-02-10T09:30:00.0000000+00:00","tedReference":"some text","doffinReference":"some text","externalReference":"some text"},{"accreditationId":"some text","requestor":"some text","subject":"some text","evidenceCodes":[{"evidenceCodeName":"some text","description":"some text","accessMethod":"some text","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true},{"evidenceCodeName":"some text","description":"some text","accessMethod":"some text","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true}],"issued":"2018-02-10T09:30:00.0000000+00:00","validTo":"2018-02-10T09:30:00.0000000+00:00","tedReference":"some text","doffinReference":"some text","externalReference":"some text"}]}}},"403":{"description":""}}}},"/evidence/{accreditationId}":{"get":{"summary":"Gets the status of all evidence codes requested in accreditation","operationId":"get-evidencestatuses","parameters":[{"name":"accreditationId","in":"path","description":"The authorized accreditation id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":""},"404":{"description":""},"503":{"description":""}}}},"/authorization":{"post":{"summary":"Authorizes and creates an accreditation","operationId":"post-authorization","parameters":[{"name":"Ocp-apim-subscription-key","in":"header","description":"The calling system's api key - requested in the developer portal","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Post an accreditation with one or more evidence codes and parameters","content":{"application/json":{"example":{"requestor":910514415,"subject":992037601,"evidenceRequests":[{"evidenceCodeName":"someevidencecode","parameters":[{"evidenceParamName":"someboolparam","value":true},{"evidenceParamName":"somenumericparam","value":1234.1234},{"evidenceParamName":"somedatetimeparam","value":"2018-01-01T00:00:00.0000000+00:00"},{"evidenceParamName":"somestringparam","value":"somestring"},{"evidenceParamName":"someattachmentparam","value":"==base64string"}]}]}}}},"responses":{"201":{"description":"Authorization successful, accreditation created.","content":{"application/json":{"example":{"accreditationId":"guid","requestor":"910514415","subject":"992037601","evidenceCodes":[{"evidenceCodeName":"someevidencecode","description":"some description","accessMethod":"One of {Open, Consent, ConsentOrLegalBasis}","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true},{"evidenceCodeName":"some text","description":"some text","accessMethod":"some text","hasValues":[{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"},{"evidenceValueName":"some text","valueType":{},"mimeType":"some text","source":"some text","value":"some text","timestamp":"2018-02-10T09:30:00.0000000+00:00"}],"parameters":[{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}},{"evidenceParamName":"some text","paramType":{},"required":true,"value":{}}],"isAsynchronous":true}],"issued":"2018-02-10T09:30:00.0000000+00:00","validTo":"2018-02-10T09:30:00.0000000+00:00","consentReference":"some text","externalReference":"some text"}}}},"400":{"description":"Request is malformed, or has logic errors. See error in body for more information."},"403":{"description":"Authentication or authorization error."},"500":{"description":"An unexpected error occured. The returned error model might contain more information."},"503":{"description":"A backend service was not available. Please try again later."}}}},"/metadata/errorcodes":{"get":{"summary":"Gets all possible error conditions","operationId":"get-metadataerrors","responses":{"200":{"description":"List of all errors codes","content":{"application/json":{"example":[{"Code":1000,"Description":"There was an error with the provided client certificate","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1001,"Description":"There was an error with the supplied requestor organization","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1002,"Description":"The referenced accreditation does not exist","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1003,"Description":"The accreditation requested has expired and is no longer valid","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1004,"Description":"There was an error with the supplied subject organization","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1005,"Description":"The subject requested is flagged as deleted in the Central Coordinating Register for Legal Entities","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1006,"Description":"There was an error with one or more of the evidence codes requested","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1007,"Description":"One or more of the evidence codes requested does not exist","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1008,"Description":"There was an error in validating and/or processing one or more of the supplied legal basises","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1009,"Description":"There was an error in a legal basis reference for one or more of the evidence requests","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1010,"Description":"There was an error regarding consent with one or more of the evidence codes requested","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1011,"Description":"The consent for the accreditation has expired. Any evidence codes requiring consent for this accreditation is no longer available","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1012,"Description":"The consent that was previously granted has been revoked by a representative for the subject entity","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1013,"Description":"There was an error during an attempt to access a upstream source. The remote server might be down or overloaded","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1014,"Description":"The authorization request contained one or more errors","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1015,"Description":"There was an internal server error processing your request.","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1016,"Description":"The data for the requested evidence is not yet available","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1017,"Description":"There was an error with one or more of the parameters given for one of the evidence codes requested","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1018,"Description":"There was an error with the supplied valid to date","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1019,"Description":"The request has been denied authorization","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1020,"Description":"There was an error with the supplied owner","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":3001,"Description":"There was a temporary error with one of the evidence codes requested","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":3002,"Description":"There was a permanent error with the input to one the evidence codes requested. The evidence source cannot process this request with the provided parameters","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":3003,"Description":"A permanent error occured serverside while requesting one of the evidence codes. This may be due to a misconfigured evidence source","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null}]}}}}}},"/evidence/{accreditationId}/{evidenceCode}":{"get":{"summary":"Gets the evidence","operationId":"get-evidence","parameters":[{"name":"accreditationId","in":"path","description":"The id of the accrreditation to be deleted","required":true,"schema":{"type":"string"}},{"name":"evidenceCode","in":"path","description":"The name of the evidence code to get data from","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":""},"404":{"description":""},"503":{"description":""}}}},"/metadata/statuscodes":{"get":{"summary":"Gets all possible evidence status codes","operationId":"get-metadatastatuscodes","responses":{"200":{"description":"List of all status codes","content":{"application/json":{"example":[{"Code":1000,"Description":"There was an error with the provided client certificate","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null},{"Code":1001,"Description":"There was an error with the supplied requestor organization","DetailCode":null,"DetailDescription":null,"Stacktrace":null,"InnerExceptionMessage":null,"InnerExceptionStackTrace":null}]}}}}}},"/servicecontexts":{"get":{"summary":"Gets all available service contexts","operationId":"get-metadataservicecontexts","responses":{"200":{"description":"A list of all servicecontexts currently active"}}}},"/evidencecodes/{servicecontext}":{"get":{"summary":"Gets all available evidence codes within a service context","operationId":"get-metadataevidencecodeservicecontext","parameters":[{"name":"servicecontext","in":"path","description":"The service domain ie eBevis","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"404":{"description":"No evidence codes linked to given service context"}}}},"/accreditations/{accreditationid}/reminders":{"get":{"summary":"Gets the previously sent reminders for accredtitation","operationId":"get-consentreminders","parameters":[{"name":"accreditationid","in":"path","description":"The created accreditation to retrieve reminders for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"404":{"description":"Could not authorize access to accreditationid"}}},"post":{"summary":"POST a reminder to subject to give consent","operationId":"post-consentreminders","parameters":[{"name":"accreditationid","in":"path","description":"The created accreditation to create reminders for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"403":{"description":"Could not authorize access to accreditationid"}}}}},"components":{"securitySchemes":{"apiKeyHeader":{"type":"apiKey","name":"Ocp-apim-subscription-key","in":"header"},"apiKeyQuery":{"type":"apiKey","name":"Ocp-apim-subscription-key","in":"query"}}},"security":[{"apiKeyHeader":[]},{"apiKeyQuery":[]}]}