# DocumentsAPI
All URIs are relative to https://api.mydatamyconsent.com
Method | HTTP request | Description |
---|---|---|
getIssuedDocumentById | GET /v1/documents/issued/{documentId} | Get issued document. |
getIssuedDocuments | GET /v1/documents/issued | Get paginated list of issued documents of given document type. |
getRegisteredDocumentTypes | GET /v1/documents/types | Get paginated list of registered document types. |
issueDocumentToIndividual | POST /v1/documents/issue/individual | Issue a new document to an individual user. |
issueDocumentToOrganization | POST /v1/documents/issue/organization | Issue a new document to an organization. |
uploadDocumentForIndividual | POST /v1/documents/issue/individual/upload/{issueRequestId} | Upload a document for issuance request of individual. |
uploadDocumentForOrganization | POST /v1/documents/issue/organization/upload/{issueRequestId} | Upload a document for issuance request of organization. |
# getIssuedDocumentById
open class func getIssuedDocumentById(documentId: UUID, completion: @escaping (_ data: IssuedDocumentDetails?, _ error: Error?) -> Void)
Get issued document.
# Example
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import MyDataMyConsent
let documentId = 987 // UUID | Document id.
// Get issued document.
DocumentsAPI.getIssuedDocumentById(documentId: documentId) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
documentId | UUID | Document id. |
# Return type
# Authorization
No authorization required
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# getIssuedDocuments
open class func getIssuedDocuments(documentTypeId: UUID? = nil, fromDateTime: Date? = nil, toDateTime: Date? = nil, pageNo: Int? = nil, pageSize: Int? = nil, completion: @escaping (_ data: IssuedDocumentPaginatedList?, _ error: Error?) -> Void)
Get paginated list of issued documents of given document type.
# Example
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import MyDataMyConsent
let documentTypeId = 987 // UUID | Document type id. (optional)
let fromDateTime = Date() // Date | From DateTime in UTC timezone. (optional)
let toDateTime = Date() // Date | To DateTime in UTC timezone. (optional)
let pageNo = 987 // Int | Page number. (optional) (default to 1)
let pageSize = 987 // Int | Number of items to return. (optional) (default to 25)
// Get paginated list of issued documents of given document type.
DocumentsAPI.getIssuedDocuments(documentTypeId: documentTypeId, fromDateTime: fromDateTime, toDateTime: toDateTime, pageNo: pageNo, pageSize: pageSize) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
documentTypeId | UUID | Document type id. | [optional] |
fromDateTime | Date | From DateTime in UTC timezone. | [optional] |
toDateTime | Date | To DateTime in UTC timezone. | [optional] |
pageNo | Int | Page number. | [optional] [default to 1] |
pageSize | Int | Number of items to return. | [optional] [default to 25] |
# Return type
# Authorization
No authorization required
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# getRegisteredDocumentTypes
open class func getRegisteredDocumentTypes(supportedEntityType: SupportedEntityType? = nil, pageNo: Int? = nil, pageSize: Int? = nil, completion: @escaping (_ data: DocumentTypePaginatedList?, _ error: Error?) -> Void)
Get paginated list of registered document types.
# Example
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import MyDataMyConsent
let supportedEntityType = SupportedEntityType() // SupportedEntityType | Supported entity type. (optional)
let pageNo = 987 // Int | Page number. (optional) (default to 1)
let pageSize = 987 // Int | Number of items to return. (optional) (default to 25)
// Get paginated list of registered document types.
DocumentsAPI.getRegisteredDocumentTypes(supportedEntityType: supportedEntityType, pageNo: pageNo, pageSize: pageSize) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
supportedEntityType | SupportedEntityType | Supported entity type. | [optional] |
pageNo | Int | Page number. | [optional] [default to 1] |
pageSize | Int | Number of items to return. | [optional] [default to 25] |
# Return type
# Authorization
No authorization required
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# issueDocumentToIndividual
open class func issueDocumentToIndividual(documentIssueRequest: DocumentIssueRequest, completion: @escaping (_ data: DocumentIssueRequestDetails?, _ error: Error?) -> Void)
Issue a new document to an individual user.
# Example
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import MyDataMyConsent
let documentIssueRequest = DocumentIssueRequest(documentTypeId: 123, identifier: "identifier_example", description: "description_example", receiver: DocumentReceiver(countryIso2Code: "countryIso2Code_example", identifiers: [StringStringKeyValuePair(key: "key_example", value: "value_example")], identificationStrategy: IdentificationStrategy()), issuedAtUtc: Date(), validFromUtc: Date(), expiresAtUtc: Date(), paymentRequest: PaymentRequest(identifier: "identifier_example", items: [BillPaymentOrderItem(name: "name_example", amount: 123)], currencyCode: "currencyCode_example", paymentUrl: "paymentUrl_example", description: "description_example", dueByUtc: Date()), metadata: "TODO") // DocumentIssueRequest | Document issue request payload
// Issue a new document to an individual user.
DocumentsAPI.issueDocumentToIndividual(documentIssueRequest: documentIssueRequest) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
documentIssueRequest | DocumentIssueRequest | Document issue request payload |
# Return type
# Authorization
No authorization required
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# issueDocumentToOrganization
open class func issueDocumentToOrganization(documentIssueRequest: DocumentIssueRequest, completion: @escaping (_ data: DocumentIssueRequestDetails?, _ error: Error?) -> Void)
Issue a new document to an organization.
# Example
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import MyDataMyConsent
let documentIssueRequest = DocumentIssueRequest(documentTypeId: 123, identifier: "identifier_example", description: "description_example", receiver: DocumentReceiver(countryIso2Code: "countryIso2Code_example", identifiers: [StringStringKeyValuePair(key: "key_example", value: "value_example")], identificationStrategy: IdentificationStrategy()), issuedAtUtc: Date(), validFromUtc: Date(), expiresAtUtc: Date(), paymentRequest: PaymentRequest(identifier: "identifier_example", items: [BillPaymentOrderItem(name: "name_example", amount: 123)], currencyCode: "currencyCode_example", paymentUrl: "paymentUrl_example", description: "description_example", dueByUtc: Date()), metadata: "TODO") // DocumentIssueRequest | Document issue request payload
// Issue a new document to an organization.
DocumentsAPI.issueDocumentToOrganization(documentIssueRequest: documentIssueRequest) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
documentIssueRequest | DocumentIssueRequest | Document issue request payload |
# Return type
# Authorization
No authorization required
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# uploadDocumentForIndividual
open class func uploadDocumentForIndividual(issueRequestId: UUID, formFile: URL, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
Upload a document for issuance request of individual.
# Example
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import MyDataMyConsent
let issueRequestId = 987 // UUID | Document issue request id.
let formFile = URL(string: "https://example.com")! // URL |
// Upload a document for issuance request of individual.
DocumentsAPI.uploadDocumentForIndividual(issueRequestId: issueRequestId, formFile: formFile) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
issueRequestId | UUID | Document issue request id. | |
formFile | URL |
# Return type
Void (empty response body)
# Authorization
No authorization required
# HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# uploadDocumentForOrganization
open class func uploadDocumentForOrganization(issueRequestId: UUID, formFile: URL, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)
Upload a document for issuance request of organization.
# Example
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import MyDataMyConsent
let issueRequestId = 987 // UUID | Document issue request id System.Guid.
let formFile = URL(string: "https://example.com")! // URL |
// Upload a document for issuance request of organization.
DocumentsAPI.uploadDocumentForOrganization(issueRequestId: issueRequestId, formFile: formFile) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
issueRequestId | UUID | Document issue request id System.Guid. | |
formFile | URL |
# Return type
Void (empty response body)
# Authorization
No authorization required
# HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]