{
  "swagger": "2.0",
  "info": {
    "title": "Digital Safe API",
    "version": "1.0",
    "description": "This API aims to allow the handling of all documents of a person.",
    "license": {
      "name": "Arkéa"
    },
    "contact": {
      "name": "Arkéa Pi Team",
      "email": "openbanking@arkea.com"
    }
  },
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "OAuthToken": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  },
  "paths": {
    "/documents": {
      "parameters": [
        {
          "$ref": "#/parameters/Authorization"
        },
        {
          "$ref": "#/parameters/Authentication"
        },
        {
          "$ref": "#/parameters/apikey"
        }
      ],
      "get": {
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "title": "Document",
                "description": "Description of a digital document",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "oneOf": [
                      {
                        "description": "Original label"
                      }
                    ],
                    "title": "Label",
                    "description": "Description of a label",
                    "type": "string"
                  },
                  "productId": {
                    "type": "string"
                  },
                  "size": {
                    "type": "object",
                    "title": "Size",
                    "description": "Description of a size",
                    "properties": {
                      "number": {
                        "type": "string"
                      },
                      "format": {
                        "type": "string"
                      }
                    }
                  },
                  "type": {},
                  "mimeType": {
                    "type": "string",
                    "description": "File's mime type",
                    "example": "image/png"
                  },
                  "expirationDate": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2018-07-13T16:03:43.979"
                  },
                  "lastAccessDate": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2018-07-13T16:03:43.979"
                  },
                  "isCurrent": {
                    "type": "boolean"
                  },
                  "isValid": {
                    "type": "boolean"
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2018-07-13T16:03:43.979"
                  },
                  "createdById": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          },
          "400": {
            "description": "",
            "schema": {
              "type": "object",
              "title": "APIError",
              "description": "Standard APIError structure defined for 400 responses",
              "properties": {
                "errordate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979",
                  "description": "Error creation date"
                },
                "fishtag": {
                  "type": "string",
                  "example": "RandomTextIdentifier564",
                  "description": "Transaction uniq identifier"
                },
                "httpcode": {
                  "type": "integer",
                  "format": "int32",
                  "example": 500,
                  "description": "HTTP status code"
                },
                "messages": {
                  "type": "array",
                  "description": "Messages returned by API call",
                  "items": {
                    "type": "object",
                    "title": "APIMessage",
                    "description": "Standard APIMessage structure defined for all responses excepted the 2XX code response",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "EX_FUNC_CODE_452",
                        "description": "Message functional code"
                      },
                      "level": {
                        "type": "string",
                        "example": "ERROR",
                        "description": "Message criticity level",
                        "enum": [
                          "INFO",
                          "WARNING",
                          "ERROR"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "example": "An example error message",
                        "description": "Message text"
                      }
                    },
                    "required": [
                      "level",
                      "message"
                    ]
                  }
                },
                "url": {
                  "type": "string",
                  "example": "/called/url/25",
                  "description": "Called url"
                }
              },
              "required": [
                "httpcode",
                "url"
              ]
            }
          },
          "401": {
            "description": "Standard 401 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "401",
                "error": "Unauthorized"
              }
            }
          },
          "403": {
            "description": "Standard 403 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "403",
                "error": "Forbidden"
              }
            }
          },
          "404": {
            "description": "Standard 404 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "404",
                "error": "Not Found"
              }
            }
          },
          "429": {
            "description": "Standard 429 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "429",
                "error": "Too Many Requests"
              }
            }
          },
          "500": {
            "description": "",
            "schema": {
              "type": "object",
              "title": "APIError",
              "description": "Standard APIError structure defined for 400 responses",
              "properties": {
                "errordate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979",
                  "description": "Error creation date"
                },
                "fishtag": {
                  "type": "string",
                  "example": "RandomTextIdentifier564",
                  "description": "Transaction uniq identifier"
                },
                "httpcode": {
                  "type": "integer",
                  "format": "int32",
                  "example": 500,
                  "description": "HTTP status code"
                },
                "messages": {
                  "type": "array",
                  "description": "Messages returned by API call",
                  "items": {
                    "type": "object",
                    "title": "APIMessage",
                    "description": "Standard APIMessage structure defined for all responses excepted the 2XX code response",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "EX_FUNC_CODE_452",
                        "description": "Message functional code"
                      },
                      "level": {
                        "type": "string",
                        "example": "ERROR",
                        "description": "Message criticity level",
                        "enum": [
                          "INFO",
                          "WARNING",
                          "ERROR"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "example": "An example error message",
                        "description": "Message text"
                      }
                    },
                    "required": [
                      "level",
                      "message"
                    ]
                  }
                },
                "url": {
                  "type": "string",
                  "example": "/called/url/25",
                  "description": "Called url"
                }
              },
              "required": [
                "httpcode",
                "url"
              ]
            }
          }
        },
        "summary": "Gets Digital Safe's documents",
        "description": "Gets all documents of connected customer"
      }
    },
    "/documents/{documentId}": {
      "parameters": [
        {
          "$ref": "#/parameters/Authorization"
        },
        {
          "$ref": "#/parameters/Authentication"
        },
        {
          "$ref": "#/parameters/apikey"
        },
        {
          "name": "documentId",
          "in": "path",
          "type": "string",
          "required": true
        }
      ],
      "get": {
        "responses": {
          "200": {
            "description": "Retourne un tableau de bytes (document encodé en base 64) / Return bytes",
            "schema": {
              "type": "object",
              "title": "Document",
              "description": "Description of a digital document",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "oneOf": [
                    {
                      "description": "Original label"
                    }
                  ],
                  "title": "Label",
                  "description": "Description of a label",
                  "type": "string"
                },
                "productId": {
                  "type": "string"
                },
                "size": {
                  "type": "object",
                  "title": "Size",
                  "description": "Description of a size",
                  "properties": {
                    "number": {
                      "type": "string"
                    },
                    "format": {
                      "type": "string"
                    }
                  }
                },
                "type": {},
                "mimeType": {
                  "type": "string",
                  "description": "File's mime type",
                  "example": "image/png"
                },
                "expirationDate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979"
                },
                "lastAccessDate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979"
                },
                "isCurrent": {
                  "type": "boolean"
                },
                "isValid": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979"
                },
                "createdById": {
                  "type": "string"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "400": {
            "description": "",
            "schema": {
              "type": "object",
              "title": "APIError",
              "description": "Standard APIError structure defined for 400 responses",
              "properties": {
                "errordate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979",
                  "description": "Error creation date"
                },
                "fishtag": {
                  "type": "string",
                  "example": "RandomTextIdentifier564",
                  "description": "Transaction uniq identifier"
                },
                "httpcode": {
                  "type": "integer",
                  "format": "int32",
                  "example": 500,
                  "description": "HTTP status code"
                },
                "messages": {
                  "type": "array",
                  "description": "Messages returned by API call",
                  "items": {
                    "type": "object",
                    "title": "APIMessage",
                    "description": "Standard APIMessage structure defined for all responses excepted the 2XX code response",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "EX_FUNC_CODE_452",
                        "description": "Message functional code"
                      },
                      "level": {
                        "type": "string",
                        "example": "ERROR",
                        "description": "Message criticity level",
                        "enum": [
                          "INFO",
                          "WARNING",
                          "ERROR"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "example": "An example error message",
                        "description": "Message text"
                      }
                    },
                    "required": [
                      "level",
                      "message"
                    ]
                  }
                },
                "url": {
                  "type": "string",
                  "example": "/called/url/25",
                  "description": "Called url"
                }
              },
              "required": [
                "httpcode",
                "url"
              ]
            }
          },
          "401": {
            "description": "Standard 401 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "401",
                "error": "Unauthorized"
              }
            }
          },
          "403": {
            "description": "Standard 403 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "403",
                "error": "Forbidden"
              }
            }
          },
          "404": {
            "description": "Standard 404 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "404",
                "error": "Not Found"
              }
            }
          },
          "429": {
            "description": "Standard 429 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "429",
                "error": "Too Many Requests"
              }
            }
          },
          "500": {
            "description": "",
            "schema": {
              "type": "object",
              "title": "APIError",
              "description": "Standard APIError structure defined for 400 responses",
              "properties": {
                "errordate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979",
                  "description": "Error creation date"
                },
                "fishtag": {
                  "type": "string",
                  "example": "RandomTextIdentifier564",
                  "description": "Transaction uniq identifier"
                },
                "httpcode": {
                  "type": "integer",
                  "format": "int32",
                  "example": 500,
                  "description": "HTTP status code"
                },
                "messages": {
                  "type": "array",
                  "description": "Messages returned by API call",
                  "items": {
                    "type": "object",
                    "title": "APIMessage",
                    "description": "Standard APIMessage structure defined for all responses excepted the 2XX code response",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "EX_FUNC_CODE_452",
                        "description": "Message functional code"
                      },
                      "level": {
                        "type": "string",
                        "example": "ERROR",
                        "description": "Message criticity level",
                        "enum": [
                          "INFO",
                          "WARNING",
                          "ERROR"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "example": "An example error message",
                        "description": "Message text"
                      }
                    },
                    "required": [
                      "level",
                      "message"
                    ]
                  }
                },
                "url": {
                  "type": "string",
                  "example": "/called/url/25",
                  "description": "Called url"
                }
              },
              "required": [
                "httpcode",
                "url"
              ]
            }
          }
        },
        "description": "Returns information on required document",
        "summary": "Gets information on required document"
      }
    },
    "/documents/{documentId}/file": {
      "parameters": [
        {
          "$ref": "#/parameters/Authorization"
        },
        {
          "$ref": "#/parameters/Authentication"
        },
        {
          "$ref": "#/parameters/apikey"
        },
        {
          "name": "documentId",
          "in": "path",
          "type": "string",
          "required": true
        }
      ],
      "get": {
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "400": {
            "description": "",
            "schema": {
              "type": "object",
              "title": "APIError",
              "description": "Standard APIError structure defined for 400 responses",
              "properties": {
                "errordate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979",
                  "description": "Error creation date"
                },
                "fishtag": {
                  "type": "string",
                  "example": "RandomTextIdentifier564",
                  "description": "Transaction uniq identifier"
                },
                "httpcode": {
                  "type": "integer",
                  "format": "int32",
                  "example": 500,
                  "description": "HTTP status code"
                },
                "messages": {
                  "type": "array",
                  "description": "Messages returned by API call",
                  "items": {
                    "type": "object",
                    "title": "APIMessage",
                    "description": "Standard APIMessage structure defined for all responses excepted the 2XX code response",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "EX_FUNC_CODE_452",
                        "description": "Message functional code"
                      },
                      "level": {
                        "type": "string",
                        "example": "ERROR",
                        "description": "Message criticity level",
                        "enum": [
                          "INFO",
                          "WARNING",
                          "ERROR"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "example": "An example error message",
                        "description": "Message text"
                      }
                    },
                    "required": [
                      "level",
                      "message"
                    ]
                  }
                },
                "url": {
                  "type": "string",
                  "example": "/called/url/25",
                  "description": "Called url"
                }
              },
              "required": [
                "httpcode",
                "url"
              ]
            }
          },
          "401": {
            "description": "Standard 401 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "401",
                "error": "Unauthorized"
              }
            }
          },
          "403": {
            "description": "Standard 403 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "403",
                "error": "Forbidden"
              }
            }
          },
          "404": {
            "description": "Standard 404 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "404",
                "error": "Not Found"
              }
            }
          },
          "429": {
            "description": "Standard 429 error response",
            "schema": {
              "type": "object",
              "title": "APIStandardError",
              "properties": {
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "status",
                "error"
              ]
            },
            "examples": {
              "application/json": {
                "status": "429",
                "error": "Too Many Requests"
              }
            }
          },
          "500": {
            "description": "",
            "schema": {
              "type": "object",
              "title": "APIError",
              "description": "Standard APIError structure defined for 400 responses",
              "properties": {
                "errordate": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2018-07-13T16:03:43.979",
                  "description": "Error creation date"
                },
                "fishtag": {
                  "type": "string",
                  "example": "RandomTextIdentifier564",
                  "description": "Transaction uniq identifier"
                },
                "httpcode": {
                  "type": "integer",
                  "format": "int32",
                  "example": 500,
                  "description": "HTTP status code"
                },
                "messages": {
                  "type": "array",
                  "description": "Messages returned by API call",
                  "items": {
                    "type": "object",
                    "title": "APIMessage",
                    "description": "Standard APIMessage structure defined for all responses excepted the 2XX code response",
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "EX_FUNC_CODE_452",
                        "description": "Message functional code"
                      },
                      "level": {
                        "type": "string",
                        "example": "ERROR",
                        "description": "Message criticity level",
                        "enum": [
                          "INFO",
                          "WARNING",
                          "ERROR"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "example": "An example error message",
                        "description": "Message text"
                      }
                    },
                    "required": [
                      "level",
                      "message"
                    ]
                  }
                },
                "url": {
                  "type": "string",
                  "example": "/called/url/25",
                  "description": "Called url"
                }
              },
              "required": [
                "httpcode",
                "url"
              ]
            }
          }
        },
        "summary": "Gets requested document in base64",
        "description": "Returns a bytes array encoded in base 64"
      }
    }
  },
  "parameters": {
    "Authorization": {
      "name": "Authorization",
      "in": "header",
      "type": "string"
    },
    "Authentication": {
      "name": "Authentication",
      "in": "header",
      "type": "string"
    },
    "apikey": {
      "name": "apikey",
      "in": "header",
      "type": "string"
    }
  },
  "basePath": "/digitalSafe-api/v1/",
  "security": [
    {
      "OAuthToken": []
    }
  ]
}