# mydatamyconsent

Unleashing the power of data consent by establishing trust. The Platform Core Developer API defines a set of capabilities that can be used to request, issue, manage and update data, documents and credentials by organizations. The API can be used to request, manage and update Decentralised Identifiers, Financial Data, Health Data issue Documents, Credentials directly or using OpenID Connect flows, and verify Messages signed with DIDs and much more.

For more information, please visit https://mydatamyconsent.com/en-us/developers (opens new window).

# Installation & Usage

# Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

# Composer

To install the bindings via Composer (opens new window), add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/mydatamyconsent/php-sdk.git"
    }
  ],
  "require": {
    "mydatamyconsent/php-sdk": "*@dev"
  }
}
1
2
3
4
5
6
7
8
9
10
11

Then run composer install

# Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/mydatamyconsent/vendor/autoload.php');
1
2

# Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new MyDataMyConsent\Api\DataConsentRequestsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$request_id = 'request_id_example'; // string | Individual consent request id.

try {
    $apiInstance->cancelIndividualDataConsentRequest($request_id);
} catch (Exception $e) {
    echo 'Exception when calling DataConsentRequestsApi->cancelIndividualDataConsentRequest: ', $e->getMessage(), PHP_EOL;
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

# API Endpoints

All URIs are relative to https://api.mydatamyconsent.com

Class Method HTTP request Description
DataConsentRequestsApi cancelIndividualDataConsentRequest PUT /v1/consent-requests/individual/{requestId}/cancel Cancel the individual data consent request by Id.
DataConsentRequestsApi cancelOrganizationDataConsentRequest PUT /v1/consent-requests/organization/{requestId}/cancel Cancel the organization data consent request by Id.
DataConsentRequestsApi createIndividualDataConsentRequest POST /v1/consent-requests/individual Create data consent request for an individual.
DataConsentRequestsApi createOrganizationDataConsentRequest POST /v1/consent-requests/organization Create data consent request for an organization.
DataConsentRequestsApi getAllConsentRequestsToIndividuals GET /v1/consent-requests/individuals Get all Consent Requests sent to individuals.
DataConsentRequestsApi getAllConsentRequestsToOrganizations GET /v1/consent-requests/organizations Get all Consent Requests sent to organizations.
DataConsentRequestsApi getIndividualConsentRequestById GET /v1/consent-requests/individuals/{requestId} Get individual data consent request by id.
DataConsentRequestsApi getOrganizationConsentRequestById GET /v1/consent-requests/organizations/{requestId} Get a OrganizationConsent Request by Id.
DataConsentsApi downloadConsentedDocumentAnalysis GET /v1/consents/{consentId}/documents/{documentId}/analysis Get analysis of a consented document.
DataConsentsApi downloadIndividualConsentedDocumentById GET /v1/consents/individuals/{consentId}/documents/{documentId}/download Download individual consented document by document id.
DataConsentsApi downloadOrganizationConsentedDocumentById GET /v1/consents/organizations/{consentId}/documents/{documentId}/download Download organization consent document based on document id.
DataConsentsApi getAllConsentedFinancialAccounts GET /v1/consents/individuals/{consentId}/financial-accounts Get all individual consented financial accounts.
DataConsentsApi getConsentFinancialAccounts GET /v1/consents/organizations/{consentId}/financial-accounts Get all organizational consented financial accounts.
DataConsentsApi getConsentedAccountById GET /v1/consents/individuals/{consentId}/financial-accounts/{accountId} Get individual consented financial account details based on account id.
DataConsentsApi getConsentedDocumentById GET /v1/consents/individuals/{consentId}/documents/{documentId} Get individual consented document by document id.
DataConsentsApi getConsentedFinancialAccount GET /v1/consents/organizations/{consentId}/financial-accounts/{accountId} Get organization consented financial account details based on account id.
DataConsentsApi getConsentedFinancialAccountInsights GET /v1/consents/{consentId}/financial-accounts/{accountId}/insights Get consented financial account insights.
DataConsentsApi getConsentedFinancialAccountTransactions GET /v1/consents/individuals/{consentId}/financial-accounts/{accountId}/transactions Get individual consented financial account transactions of an individual based on accountId.
DataConsentsApi getConsents GET /v1/consents/individuals Get the paginated list of individual data consents.
DataConsentsApi getIndividualConsentedDocuments GET /v1/consents/individuals/{consentId}/documents Get individual consented documents by consent id.
DataConsentsApi getIndividualDataConsentById GET /v1/consents/individuals/{consentId} Get individuals data consent details by consent id.
DataConsentsApi getOrgConsentedAccountTransactions GET /v1/consents/organizations/{consentId}/financial-accounts/{accountId}/transactions Get organization consented financial account transactions of an individual based on accountId.
DataConsentsApi getOrganizationConsentedDocumentById GET /v1/consents/organizations/{consentId}/documents/{documentId} Get organization consent document based on document id.
DataConsentsApi getOrganizationConsentedDocuments GET /v1/consents/organizations/{consentId}/documents Get organization consented documents by consent id.
DataConsentsApi getOrganizationDataConsentById GET /v1/consents/organizations/{consentId} Get organizations data consent details by consent id.
DataConsentsApi getOrganizationDataConsents GET /v1/consents/organizations Get the paginated list of organization data consents.
DataProcessingAgreementsApi createDataProcessingAgreement POST /v1/data-agreements Create a data processing agreement.
DataProcessingAgreementsApi deleteDataProcessingAgreementById DELETE /v1/data-agreements/{id} Delete a data processing agreement. This will not delete a published or a agreement in use with consents.
DataProcessingAgreementsApi getDataProcessingAgreementById GET /v1/data-agreements/{id} Get data processing agreement by id.
DataProcessingAgreementsApi getDataProcessingAgreements GET /v1/data-agreements Get paginated data processing agreements.
DataProcessingAgreementsApi terminateDataProcessingAgreementById PUT /v1/data-agreements/{id}/terminate Terminate a data processing agreement.
DataProcessingAgreementsApi updateDataProcessingAgreement PUT /v1/data-agreements/{id} Update a data processing agreement.
DataProviderDiscoveryApi getDataProviderById GET /v1/data-providers/{providerId} Get a Data Provider details by provider id.
DataProviderDiscoveryApi getDataProviders GET /v1/data-providers Discover all data providers in My Data My Consent by country and filters.
DigiLockerCompatIssuerApi digilockerCompatIssueDocument POST /issuer/issuedoc/1/xml Digilocker Compatible endpoint to issue document.
DocumentsApi getIssuedDocumentById GET /v1/documents/issued/{documentId} Get issued document.
DocumentsApi getIssuedDocuments GET /v1/documents/issued Get paginated list of issued documents of given document type.
DocumentsApi getRegisteredDocumentTypes GET /v1/documents/types Get paginated list of registered document types.
DocumentsApi issueDocumentToIndividual POST /v1/documents/issue/individual Issue a new document to an individual user.
DocumentsApi issueDocumentToOrganization POST /v1/documents/issue/organization Issue a new document to an organization.
DocumentsApi uploadDocumentForIndividual POST /v1/documents/issue/individual/upload/{issueRequestId} Upload a document for issuance request of individual.
DocumentsApi uploadDocumentForOrganization POST /v1/documents/issue/organization/upload/{issueRequestId} Upload a document for issuance request of organization.
SupportedIdentifiersApi getAllSupportedIdentifiers GET /v1/supported-identifiers/{countryIso2Code} Get all supported identifiers by country.

# Models

# Authorization

# oauth2

  • Type: OAuth
  • Flow: application
  • Authorization URL: https://accounts.mydatamyconsent.com/connect/authorize
  • Scopes:
    • developer: Developer API

# Tests

To run the tests, use:

composer install
vendor/bin/phpunit
1
2

# Author

[email protected]

# About this package

This PHP package is automatically generated by the OpenAPI Generator (opens new window) project:

  • API version: v1
    • Package version: 0.0.1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen
Last Updated: 6/19/2022, 7:27:56 PM