{"swagger":"2.0","host":"arkeapi","basePath":"/v1/","info":{"title":"Documents","description":"Gestion des documents d'un personne (legale ou physique).","version":"1.0","license":{"name":"ARKEA","url":"https://developer.arkea.com/"},"contact":{"name":"ARKEA PI Team","email":"openbanking@arkea.com"},"x-logo":{"altText":"Monext logo","url":"https://i.ibb.co/CwhS5RX/document.png","backgroundColor":"#FFFFFF"}},"x-servers":[{"url":"https://api-arkea-monext.s.arkea.com:8443","description":"Production"},{"url":"https://api-arkea-monext.hml.s.arkea.com:8443","description":"Homologation"}],"schemes":["https"],"produces":["application/json"],"security":[{"arkeaOAuth":["Server"]}],"securityDefinitions":{"arkeaOAuth":{"type":"oauth2","description":"authentification oAuth2","flow":"accessCode","authorizationUrl":"https://d/oauth","tokenUrl":"https://d/token","scopes":{"Server":"Approche de type serveur","User":"Approche de type utilisateur"}}},"paths":{"/documents/{documentId}":{"parameters":[{"type":"string","in":"path","required":true,"name":"documentId","pattern":"^[a-zA-Z0-9-]*$"}],"get":{"summary":"Retourne les détails d'un document existant","description":"# Arguments\n* documentId: Identifiant du document\n\n# Réponse\nLe détail du document si le documentId fourni est valide, sinon une erreur","responses":{"200":{"description":"Retourne les détails à propos du document","examples":{"application/json":"{\n                \"label\": \"CTR_ACEP_001_20180731.pdf\",\n                \"size\": {\n                  \"number\": \"128\",\n                  \"format\": \"bytes\"\n                },\n                \"mimeTpe\": \"application/pdf\",\n                \"type\": \"bank-statement\",\n                \"lastAccessDate\": \"2019-04-25T02:32:07.352Z\",\n                \"id\": \"Mg==\",\n                \"createdAt\": \"2019-04-24T02:32:07.352Z\"\n              }"},"schema":{"$ref":"#/definitions/document"}},"400":{"$ref":"#/responses/400-BadRequest"},"401":{"$ref":"#/responses/401-Unauthorized"},"403":{"$ref":"#/responses/403-Forbidden"},"404":{"$ref":"#/responses/404-NotFound"},"429":{"$ref":"#/responses/429-TooManyRequests"},"500":{"$ref":"#/responses/500-InternalServerError"}}}},"/documents/{documentId}/file":{"parameters":[{"type":"string","in":"path","required":true,"name":"documentId","pattern":"^[a-zA-Z0-9-]*$"}],"get":{"summary":"Récupère un document encodé en base 64","description":"# Arguments\n* documentId: Identifiant du document\n\n# Réponse\nLe document encod\" en base 64 si le documentId fourni est valide, sinon une erreur","responses":{"200":{"description":"Document en base 64","examples":{"application/json":"{\n\"label\": \"CTR_ACEP_001_20180731.pdf\",\n\"value\": \"lZCRVJpMHhMamNLSmVMano5TUtNU0F3SUc5aWFnbzhQQzlRSURJZ01DQlNMMU4xWW5SNWNHVXZWMmxrWjJWMERobVl6RmhORGhoTkdZelpqUmtOalV4TURFNFBsMHZVSEpsZGlBNE56WXpNajQrQ2lVM016VTJaaTAwWldRMllTMWtNalEwWWkweE9HWXpNQzAxTGpVdU9RcHpkR0Z5ZEhoeVpXWUtNVFEyTnpNeUNpVWxSVTlHQ2c9PQ==\",\n\"mimeType\": \"application/pdf\"\n}"},"schema":{"$ref":"#/definitions/documentFile"}},"400":{"$ref":"#/responses/400-BadRequest"},"401":{"$ref":"#/responses/401-Unauthorized"},"403":{"$ref":"#/responses/403-Forbidden"},"404":{"$ref":"#/responses/404-NotFound"},"429":{"$ref":"#/responses/429-TooManyRequests"},"500":{"$ref":"#/responses/500-InternalServerError"}}}}},"responses":{"400-BadRequest":{"description":"","schema":{"$ref":"#/definitions/APIError"},"examples":{"application/json":"{\n  \"httpcode\": 400,\n  \"url\": \"/resource\",\n  \"errordate\": \"2019-08-10T17:32:32.983Z\",\n  \"fishtag\": \"OTg1NjQ4NDU0Nw\",\n  \"messages\": [\n    {\n      \"code\": \"missing_param\",\n      \"doc_url\": \"https://arkeaopenbanking.com/documentation/codes/missing_param\",\n      \"message\": \"Missing parameter: name\"\n    }\n  ]\n}"}},"401-Unauthorized":{"description":"","schema":{"$ref":"#/definitions/APIError"},"examples":{"application/json":"{\n  \"httpcode\": 401,\n  \"url\": \"/resource\",\n  \"errordate\": \"2019-08-10T15:21:32.983Z\",\n  \"fishtag\": \"NDU4Nzg1MjY\",\n  \"messages\": [\n    {\n      \"code\": \"invalid_token\",\n      \"doc_url\": \"https://arkeaopenbanking.com/documentation/auth\",\n      \"message\": \"Invalid token\"\n    }\n  ]\n}"}},"403-Forbidden":{"description":"","schema":{"$ref":"#/definitions/APIError"},"examples":{"application/json":"{\n  \"httpcode\": 403,\n  \"url\": \"/resource\",\n  \"errordate\": \"2019-08-10T17:47:48.983Z\",\n  \"fishtag\": \"NTg5NzQ1MTIzOQ\",\n  \"messages\": [\n    {\n      \"code\": \"forbiden\",\n      \"message\": \"Forbiden access\"\n    }\n  ]\n}"}},"404-NotFound":{"description":"","schema":{"$ref":"#/definitions/APIError"},"examples":{"application/json":"{\n  \"httpcode\": 404,\n  \"url\": \"/resource\",\n  \"errordate\": \"2019-08-10T17:12:32.983Z\",\n  \"fishtag\": \"NTU1ODc0OTU4Ng\",\n  \"messages\": [\n    {\n      \"code\": \"resource_not_found\",\n      \"message\": \"Specified resource does not exist\"\n    }\n  ]\n}"}},"409-Conflict":{"description":"","schema":{"$ref":"#/definitions/APIError"},"examples":{"application/json":"{\n  \"httpcode\": 409,\n  \"url\": \"/resource\",\n  \"errordate\": \"2019-08-10T10:12:32.983Z\",\n  \"fishtag\": \"Njk4NTY5ODU2Nw\",\n  \"messages\": [\n    {\n      \"code\": \"conflict\",\n      \"message\": \"A resource with the same name already exist\"\n    }\n  ]\n}"}},"429-TooManyRequests":{"description":"","schema":{"$ref":"#/definitions/APIError"},"examples":{"application/json":"{\n  \"httpcode\": 429,\n  \"url\": \"/resource\",\n  \"errordate\": \"2019-08-10T23:23:32.983Z\",\n  \"fishtag\": \"MjIyMjI1ODc0NQ\",\n  \"messages\": [\n    {\n      \"code\": \"too_many_request\",\n      \"message\": \"Too many request, wait and retry\"\n    }\n  ]\n}"}},"500-InternalServerError":{"description":"","schema":{"$ref":"#/definitions/APIError"},"examples":{"application/json":"{\n  \"httpcode\": 500,\n  \"url\": \"/resource\",\n  \"errordate\": \"2019-08-10T11:02:32.983Z\",\n  \"fishtag\": \"MzU3MzU3MzU3Mw\",\n  \"messages\": [\n    {\n      \"code\": \"internal_server_error\",\n      \"message\": \"Your request is surely right but an issue occures on Arkéa server side, try again later\"\n    }\n  ]\n}"}}},"definitions":{"document":{"type":"object","properties":{"id":{"type":"string","description":"Identifiant unique du document"},"label":{"$ref":"#/definitions/label"},"type":{"$ref":"#/definitions/documentType"},"size":{"$ref":"#/definitions/fileSize"},"mimeType":{"$ref":"#/definitions/documentMimeType"},"lastAccessDate":{"type":"string","description":"Date de dernier accès","format":"date-time","example":"2019-10-02T08:09:12.649Z"},"createdAt":{"type":"string","description":"Date de création","format":"date-time","example":"2019-10-02T08:09:12.650Z"}},"title":"Document","description":"Définition d'un document"},"documentFile":{"type":"object","properties":{"label":{"type":"string","description":"Nom du fichier"},"value":{"type":"string","description":"Fichier en tant que tableau de bytes encodé en base 64"},"mimeType":{"$ref":"#/definitions/documentMimeType"}},"title":"Fichier","description":"Description du fichier à télécharger par l'utilisateur"},"APIError":{"type":"object","properties":{"httpcode":{"type":"integer","description":"Code statut HTTP","format":"int32","example":"500"},"url":{"type":"string","description":"URL appelée","example":"/accounts/NDU2NDE2ODc1NDU1MTg3NA/transactions"},"errordate":{"type":"string","description":"Date d'erreur de création","format":"date-time","example":"2019-10-02T08:09:14.030Z"},"fishtag":{"type":"string","description":"Identifiant unique de transaction","example":"RandomTextIdentifier564"},"messages":{"type":"array","description":"Message retourné par l'appel API","items":{"$ref":"#/definitions/APIMessage"}}},"title":"ErreurAPI","description":"Définition de la structure de message d'erreur standard API\nUtilisée pour le code de retour 400.","required":["httpcode","url"]},"label":{"type":"string","title":"Libellé","description":"Définition du label"},"documentType":{"type":"string","title":"Type de document (Enum)","description":"Le type de document\n\nTypes:\n* bank-statement\n* fees-statement\n* invoice","enum":["bank-statement","fees-statement","invoice"]},"fileSize":{"type":"object","properties":{"number":{"type":"string","description":"Taille du fichier au format d'unité de valeur"},"format":{"type":"string","description":"Unité de valeur"}},"title":"Taille du document","description":"Défintion de la taille d'un document"},"documentMimeType":{"type":"string","title":"Types de documents, format MIME (Enum)","description":"Les types de documents au format MIME\n\nDifférents types de documents :\n* application/pdf: format PDF\n* image/png: format png\n* image/jpg: format jpg","enum":["application/pdf","image/png","image/jpg"]},"APIMessage":{"type":"object","properties":{"code":{"type":"string","description":"Code de message d'erreur court","example":"missing_param"},"level":{"type":"string","description":"Lien vers la documentation détaillant l'erreur","enum":["INFO, WARNING, ERROR"],"example":"ERROR"},"message":{"type":"string","description":"Détail de l'erreur","example":"Missing parameter: currency"}},"title":"MessageAPI","description":"Définition de la structure de message standard API\nUtilisée pour tous les codes de retours à l'exception des 2XX."}}}