{
    "openapi": "3.0.0",
    "info": {
        "title": "VNF Agent Operator API",
        "version": "0.8",
        "description": "A set of APIs exposed by the agent to enable agent operators (vendors) and the network to configure the agent.\n\nThese are APIs that naturally conform to resources under management and therefore are modeled after the REST architecture and the optimatal response codes are used that are required.",
        "contact": {
            "name": "Andres Olave",
            "email": "andres.olave@velocitycareerlabs.com"
        }
    },
    "servers": [
        {
            "description": "Example Agent Endpoint",
            "url": "https://agent.example.com/operator-api/v0.8/"
        }
    ],
    "tags": [
        {
            "name": "disclosures",
            "description": "CRUD for disclosure request definitions"
        },
        {
            "name": "credentials"
        },
        {
            "name": "tenants"
        },
        {
            "name": "offers"
        }
    ],
    "paths": {
        "/tenants/{tenantId}/disclosures/{disclosureId}": {
            "get": {
                "summary": "Get a Specific Disclosure Request Definition",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "./models/agent-disclosure.v1.json"
                                },
                                "examples": {
                                    "Sample single result": {
                                        "value": {
                                            "id": "d5031636-b6e2-11ea-b3de-0242ac130004",
                                            "description": "Project Manager",
                                            "types": [
                                                {
                                                    "type": "EducationDegree"
                                                },
                                                {
                                                    "type": "CurrentEmploymentPosition"
                                                },
                                                {
                                                    "type": "PastEmploymentPosition"
                                                }
                                            ],
                                            "vendorEndpoint": "receive-checked-credentials",
                                            "purpose": "Job Application",
                                            "duration": "6m",
                                            "termsUrl": "https://example.com/terms.html",
                                            "vendorDisclosureId": "abc123",
                                            "activationDate": "2020-06-20T03:54:32Z",
                                            "authTokensExpireIn": 1440,
                                            "createdAt": "2020-06-20T03:54:32Z",
                                            "updatedAt": "2020-06-20T03:54:32Z"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-disclosure-by-id",
                "description": "Can retrieve tenants by the disclosure's `id`",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "tags": [
                    "disclosures"
                ]
            },
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "disclosureId",
                    "in": "path",
                    "required": true,
                    "description": "The disclosure id that was created"
                }
            ],
            "put": {
                "summary": "Update  a Specific Disclosure Request Definition",
                "operationId": "put-disclosures",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "./models/agent-disclosure.v1.json"
                                },
                                "examples": {
                                    "Agent Disclosure": {
                                        "value": {
                                            "id": "6ac91023121ef15392ef",
                                            "description": "Project Manager",
                                            "types": [
                                                {
                                                    "type": "EducationDegree"
                                                }
                                            ],
                                            "purpose": "Job Application",
                                            "duration": "9m",
                                            "termsUrl": "https://example.com/terms.html",
                                            "vendorEndpoint": "receive-checked-credentials",
                                            "vendorDisclosureId": "abc123",
                                            "activationDate": "2020-06-20T03:54:32Z",
                                            "authTokensExpireIn": 1440,
                                            "createdAt": "2020-06-20T03:54:32Z",
                                            "updatedAt": "2020-06-24T15:00:00Z"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "parameters": [],
                "description": "Updates an existing disclosure for the organization\n\nErrors with 404 if the disclosure Id is not found",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "tags": [
                    "disclosures"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "./models/new-agent-disclosure.v1.json"
                                    },
                                    {
                                        "type": "object",
                                        "x-stoplight": {
                                            "id": "oiqw51ert7zfz"
                                        },
                                        "properties": {
                                            "setIssuingDefault": {
                                                "type": "boolean",
                                                "x-stoplight": {
                                                    "id": "90ec4smepr0rc"
                                                },
                                                "description": "true makes this disclosure the issuing default"
                                            }
                                        }
                                    }
                                ]
                            },
                            "examples": {
                                "Sample Request": {
                                    "value": {
                                        "description": "Project Manager",
                                        "types": [
                                            {
                                                "type": "EducationDegree"
                                            }
                                        ],
                                        "purpose": "Job Application",
                                        "duration": "9m",
                                        "termsUrl": "https://example.com/terms.html",
                                        "authTokensExpireIn": 1440,
                                        "vendorDisclosureId": "abc123"
                                    }
                                }
                            }
                        }
                    },
                    "description": "Does a full replace of the disclosure. Omitting an attribute that was previously set means that it will be deleted on the agent's database.\n\nThe disclosure must have `configurationType`, `termsUrl` and `vendorEndpoint` set. \n\nif the `configurationType` is `issuing` then `offerMode` & `identificationMode` must be set. \n\nif the `configurationType` is `inspection` or the `identificationMode` contains `verifiable_presentation` then `duration`, `purpose` are required and at least one `types` must be set. \n\nif the `identificationMode` contains `verifiable_presentation` then the first of these types of disclosures must have `setDefaultIssuing` to `true`\n\nAn `deactivationDate` can be set in advance to disable to disclosure at a specific date."
                }
            },
            "delete": {
                "summary": "Delete a Specific Disclosure Request Definition",
                "operationId": "delete-disclosures",
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "parameters": [],
                "description": "Deletes a disclosure by `id`\n\nErrors with 404 if the disclosure cannot be found",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "tags": [
                    "disclosures"
                ]
            }
        },
        "/tenants/{tenantId}/disclosures": {
            "get": {
                "summary": "Get Disclosure Request Definitions",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "disclosures": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "./models/agent-disclosure.v1.json"
                                            }
                                        }
                                    },
                                    "required": [
                                        "disclosures"
                                    ]
                                },
                                "examples": {
                                    "Sample single result": {
                                        "value": {
                                            "disclosures": [
                                                {
                                                    "id": "d5031636-b6e2-11ea-b3de-0242ac130004",
                                                    "description": "Project Manager",
                                                    "types": [
                                                        {
                                                            "type": "EducationDegree"
                                                        },
                                                        {
                                                            "type": "CurrentEmploymentPosition"
                                                        },
                                                        {
                                                            "type": "PastEmploymentPosition"
                                                        }
                                                    ],
                                                    "vendorEndpoint": "receive-checked-credentials",
                                                    "purpose": "Job Application",
                                                    "duration": "6m",
                                                    "termsUrl": "https://example.com/terms.html",
                                                    "vendorDisclosureId": "abc123",
                                                    "activationDate": "2020-06-20T03:54:32Z",
                                                    "authTokensExpireIn": 10080,
                                                    "createdAt": "2020-06-20T03:54:32Z",
                                                    "updatedAt": "2020-06-20T03:54:32Z"
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Tenant Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-disclosure",
                "parameters": [
                    {
                        "schema": {
                            "type": "string",
                            "enum": [
                                "inspection",
                                "issuing"
                            ]
                        },
                        "in": "query",
                        "name": "page.size",
                        "description": "the size of page to use"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "page.skip",
                        "description": "the number  of pages to skip"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "configurationType",
                        "description": "the type of disclosure to return (issuing or inspection)"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorEndpoint",
                        "description": "the vendor endpoint to filter by"
                    },
                    {
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "in": "query",
                        "name": "sort[]",
                        "description": "A array of tuples indicating the field to sort by"
                    }
                ],
                "description": "Can retrieve all disclosures per tenant. Multiple results maybe paged. Call again with page query parameter to get the next (or previous) set of results.",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "tags": [
                    "disclosures"
                ]
            },
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "post": {
                "summary": "Create a Disclosure Request Definition",
                "operationId": "post-disclosures",
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "./models/agent-disclosure.v1.json"
                                },
                                "examples": {
                                    "Sample response": {
                                        "value": {
                                            "id": "d5031636-b6e2-11ea-b3de-0242ac130004",
                                            "description": "Project Manager",
                                            "types": [
                                                {
                                                    "type": "EducationDegree"
                                                },
                                                {
                                                    "type": "CurrentEmploymentPosition"
                                                },
                                                {
                                                    "type": "PastEmploymentPosition"
                                                }
                                            ],
                                            "purpose": "Job Application",
                                            "duration": "6m",
                                            "vendorEndpoint": "receive-checked-credentials",
                                            "termsUrl": "https://example.com/terms.html",
                                            "vendorDisclosureId": "abc123",
                                            "activationDate": "2020-06-20T03:54:32Z",
                                            "authTokensExpireIn": 10080,
                                            "createdAt": "2020-06-20T03:54:32Z",
                                            "updatedAt": "2020-06-20T03:54:32Z"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "parameters": [],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "./models/new-agent-disclosure.v1.json"
                                    },
                                    {
                                        "type": "object",
                                        "x-stoplight": {
                                            "id": "rr6rfp39oww7c"
                                        },
                                        "properties": {
                                            "setIssuingDefault": {
                                                "type": "boolean",
                                                "x-stoplight": {
                                                    "id": "q5lfa8sn5scn1"
                                                },
                                                "description": "true makes this disclosure the issuing default"
                                            }
                                        }
                                    }
                                ]
                            },
                            "examples": {
                                "Sample Request": {
                                    "value": {
                                        "description": "Project Manager",
                                        "types": [
                                            {
                                                "type": "EducationDegree"
                                            },
                                            {
                                                "type": "CurrentEmploymentPosition"
                                            },
                                            {
                                                "type": "PastEmploymentPosition"
                                            }
                                        ],
                                        "purpose": "Job Application",
                                        "duration": "6m",
                                        "termsUrl": "https://example.com/terms.html",
                                        "vendorDisclosureId": "abc123"
                                    }
                                }
                            }
                        }
                    },
                    "description": "The disclosure must have `configurationType`, `termsUrl` and `vendorEndpoint` set. \n\nif the `configurationType` is `issuing` then `offerMode` & `identificationMode` must be set. \n\nif the `configurationType` is `inspection` or the `identificationMode` contains `verifiable_presentation` then `duration`, `purpose` are required and at least one `types` must be set. \n\nif the `identificationMode` contains `verifiable_presentation` then the first of these types of disclosures must have `setDefaultIssuing` to `true`\n\nA `deactivationDate` can be set in advance to disable to disclosure at a specific date."
                },
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "description": "Creates a new disclosure for the organization. The response contains the created data record including the `id` which is can be used in QR codes under the attribute `disclosureId`\n\nErrors with 400 if the vendor disclosure id is already associated to a record on the agent database.",
                "tags": [
                    "disclosures"
                ]
            }
        },
        "/tenants/{tenantId}/exchanges": {
            "post": {
                "summary": "Start an exchange",
                "operationId": "start-exchange",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": true,
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "client must specify if the exchange is 'ISSUING' or 'DISCLOSURE'",
                                        "enum": [
                                            "ISSUING",
                                            "DISCLOSURE"
                                        ]
                                    },
                                    "disclosureId": {
                                        "type": "string",
                                        "description": "optionally specify the `disclosureId` of a specific disclosure to use for identification of the individual"
                                    },
                                    "identityMatcherValues": {
                                        "type": "array",
                                        "items": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "boolean"
                                                }
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "type"
                                ]
                            },
                            "examples": {
                                "Exchange for for verifiers": {
                                    "value": {
                                        "type": "DISCLOSURE",
                                        "disclosureId": "5f1910de13210311c4213a"
                                    }
                                },
                                "Exchange for Issuers": {
                                    "value": {
                                        "type": "ISSUING"
                                    }
                                },
                                "Exchange for Issuers using Integrated Identification": {
                                    "value": {
                                        "type": "ISSUING",
                                        "disclosureId": "5f1910de13210311c4213a",
                                        "identityMatcherValues": [
                                            "adam.smith@example.com"
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "description": ""
                },
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true,
                                    "properties": {
                                        "exchangeId": {
                                            "type": "string",
                                            "format": "uuid",
                                            "description": "the exchange id could be for an issuing or an inspection"
                                        }
                                    },
                                    "required": [
                                        "exchangeId"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "description": "Post that this is a new exchange. Uses post as it's not idempotent.\n\nOptionally send through the push delegate to enable the issuer/inspector to send through a push",
                "tags": [
                    "exchanges"
                ]
            },
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ]
        },
        "/tenants/{tenantId}/exchanges/{exchangeId}": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "exchangeId",
                    "in": "path",
                    "required": true
                }
            ],
            "get": {
                "summary": "Get the specific exchange",
                "tags": [
                    "exchanges"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "exchange": {
                                            "type": "object",
                                            "required": [
                                                "id",
                                                "type",
                                                "disclosureId",
                                                "events",
                                                "createdAt",
                                                "updatedAt"
                                            ],
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "description": "the exchange id"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "enum": [
                                                        "ISSUING",
                                                        "DISCLOSURE"
                                                    ],
                                                    "description": "the type of exchange"
                                                },
                                                "disclosureId": {
                                                    "type": "string",
                                                    "description": "the disclosure associated to the exchange"
                                                },
                                                "disclosureConsentedAt": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "description": "when the holder consented to the disclosure"
                                                },
                                                "disclosureRejectedAt": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "description": "disclosure was rejected by the holder and will not proceed with the exchange"
                                                },
                                                "presentationId": {
                                                    "type": "string",
                                                    "description": "presentationId received for the disclosure request"
                                                },
                                                "pushDelegate": {
                                                    "type": "object",
                                                    "description": "push metadata",
                                                    "properties": {
                                                        "pushUrl": {
                                                            "type": "string"
                                                        },
                                                        "pushToken": {
                                                            "type": "string"
                                                        }
                                                    }
                                                },
                                                "pushSentAt": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "description": "when was the push sent at?"
                                                },
                                                "protocolMetadata": {
                                                    "type": "object"
                                                },
                                                "identityMatcherValues": {
                                                    "type": "array",
                                                    "description": "identity matcher value used by agent when generating offers from a offer template held on the disclosure",
                                                    "items": {
                                                        "anyOf": [
                                                            {
                                                                "type": "number"
                                                            },
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "boolean"
                                                            }
                                                        ]
                                                    }
                                                },
                                                "events": {
                                                    "type": "array",
                                                    "description": "The events array. the last entry is the current state of the exchange. ",
                                                    "items": {
                                                        "type": "object",
                                                        "additionalProperties": false,
                                                        "properties": {
                                                            "state": {
                                                                "type": "string",
                                                                "description": "state that the exchange entered at that timestamp"
                                                            },
                                                            "timestamp": {
                                                                "type": "string",
                                                                "format": "date-time",
                                                                "description": "timestamp of the event"
                                                            }
                                                        },
                                                        "required": [
                                                            "state",
                                                            "timestamp"
                                                        ]
                                                    }
                                                },
                                                "vendorUserId": {
                                                    "type": "string"
                                                },
                                                "vendorOfferStatuses": {
                                                    "type": "object"
                                                },
                                                "offerIds": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "err": {
                                                    "type": "string",
                                                    "description": "message about the error received. If err is set, then the exchange is in a failure state and probably cannot be recovered"
                                                },
                                                "createdAt": {
                                                    "type": "string",
                                                    "description": "when the exchange was created"
                                                },
                                                "updatedAt": {
                                                    "type": "string",
                                                    "description": "when the exchange was last updated"
                                                }
                                            }
                                        }
                                    },
                                    "required": [
                                        "exchange"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-tenants-did-exchanges-exchangeId",
                "description": ""
            }
        },
        "/tenants/{tenantId}/exchanges/{exchangeId}/qrcode.png": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "exchangeId",
                    "in": "path",
                    "required": true,
                    "description": "exchange id for this exchange"
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "get": {
                "summary": "Get a Exchange QR Code",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "image/png": {}
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "operationId": "get-tenant-exchange-qrcode-png",
                "description": "Public endpoint for retrieving a qr code for a particular exchange. Returns a url encoded as a qr code png",
                "tags": [
                    "exchanges"
                ]
            }
        },
        "/tenants/{tenantId}/exchanges/{exchangeId}/offers": {
            "post": {
                "summary": "Add Offer to Exchange",
                "operationId": "post-offers",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "../common/models/vendor-offer.v1.json"
                                },
                                "examples": {
                                    "Sample Response": {
                                        "value": {
                                            "id": "1efab2190357eadddf1023112332",
                                            "type": [
                                                "CurrentEmploymentPosition"
                                            ],
                                            "issuer": {
                                                "id": "did:web:example.com"
                                            },
                                            "credentialSubject": {
                                                "vendorUserId": "5f29cf7cf12da6007abb9090",
                                                "company": "did:web:microsoft.com",
                                                "companyName": {
                                                    "localized": {
                                                        "en": "Microsoft Corporation"
                                                    }
                                                },
                                                "title": {
                                                    "localized": {
                                                        "en": "Director, Communications (HoloLens & Mixed Reality Experiences)"
                                                    }
                                                },
                                                "startMonthYear": {
                                                    "month": 10,
                                                    "year": 2010
                                                },
                                                "endMonthYear": {
                                                    "month": 6,
                                                    "year": 2019
                                                },
                                                "location": {
                                                    "countryCode": "US",
                                                    "regionCode": "MA"
                                                },
                                                "description": {
                                                    "localized": {
                                                        "en": "Big Data, AI, Hybrid, IoT, Datacenter, Mixed Reality/HoloLens, D365, Power Platform - all kinds of fun stuff!"
                                                    }
                                                }
                                            },
                                            "exchangeId": "5f9a32cf97412ac3201e",
                                            "offerId": "skwqoc82kj(-ska",
                                            "createdAt": "2019-08-24T14:15:22Z",
                                            "updatedAt": "2019-08-24T14:15:22Z"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Tenant Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "description": "Creates a new offer\n\nErrors\n* if the issuer isnt configured to issue that type of credential",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "../common/models/new-vendor-offer.v1.json"
                            },
                            "examples": {
                                "Sample Request": {
                                    "value": {
                                        "offerId": "skwqoc82kj(-ska",
                                        "type": [
                                            "CurrentEmploymentPosition"
                                        ],
                                        "credentialSubject": {
                                            "vendorUserId": "5f29cf7cf12da6007abb9090",
                                            "company": "did:web:microsoft.com",
                                            "companyName": {
                                                "localized": {
                                                    "en": "Microsoft Corporation"
                                                }
                                            },
                                            "title": {
                                                "localized": {
                                                    "en": "Director, Communications (HoloLens & Mixed Reality Experiences)"
                                                }
                                            },
                                            "startMonthYear": {
                                                "month": 10,
                                                "year": 2010
                                            },
                                            "endMonthYear": {
                                                "month": 6,
                                                "year": 2019
                                            },
                                            "location": {
                                                "countryCode": "US",
                                                "regionCode": "MA"
                                            },
                                            "description": {
                                                "localized": {
                                                    "en": "Big Data, AI, Hybrid, IoT, Datacenter, Mixed Reality/HoloLens, D365, Power Platform - all kinds of fun stuff!"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "exchanges"
                ]
            },
            "delete": {
                "summary": "Delete Offer",
                "operationId": "delete-offers",
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "description": "Deletes an offer\n\nErrors\n* 404 if the offer id cannot be found",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorOfferId",
                        "required": true
                    }
                ],
                "tags": [
                    "exchanges"
                ]
            },
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "exchangeId",
                    "in": "path",
                    "required": true,
                    "description": "The exchange the offer is being added to"
                }
            ]
        },
        "/tenants/{tenantId}/exchanges/{exchangeId}/offers/complete": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "exchangeId",
                    "in": "path",
                    "required": true
                }
            ],
            "post": {
                "summary": "Complete Offer Generation",
                "operationId": "post-tenant-offers-send-to-holder",
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "description": "- sends the offers to the holder\n- updates the exchange state to OFFERS_RECEIVED\n- returns 200 if ok\n- returns 400 if no valid offers exist\n- returns 401 if token invalid ",
                "tags": [
                    "exchanges"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "errorCode": {
                                        "type": "string",
                                        "description": "optional code to use",
                                        "enum": [
                                            "other-system-error",
                                            "image-too-blurry",
                                            "missing-required-credential-types"
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "description": ""
                }
            }
        },
        "/tenants/{tenantId}/exchanges/{exchangeId}/deep-link": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "exchangeId",
                    "in": "path",
                    "required": true
                }
            ],
            "get": {
                "summary": "Get an Exchange Deeplink HTTPS URL",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deepLink": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    },
                                    "required": [
                                        "deepLink"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "operationId": "get-tenants-did-exchanges-exchangeId-deep-link",
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorOriginContext",
                        "description": "The origin context to embed into the deep link. Probably a signed token or secure secret that can be used to link the to an authenticated user session."
                    }
                ],
                "tags": [
                    "exchanges"
                ]
            }
        },
        "/tenants/{tenantId}/exchanges/{exchangeId}/qrcode.uri": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "exchangeId",
                    "in": "path",
                    "required": true,
                    "description": "exchange id for this exchange"
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "get": {
                "summary": "Get a Exchange Deeplink URI",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "operationId": "get-tenant-exchange-qrcode-jwt",
                "description": "Public endpoint for retrieving a string for a particular exchange. Returns a url",
                "tags": [
                    "exchanges"
                ]
            }
        },
        "/tenants/{tenantId}": {
            "get": {
                "summary": "Get a Tenant by DID",
                "tags": [
                    "tenants"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "./models/tenant.v1.json"
                                },
                                "examples": {}
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-tenant",
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "page"
                    }
                ],
                "description": "Can retrieve tenants by `did`.",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ]
            },
            "put": {
                "summary": "Update a Tenant",
                "operationId": "put-tenants-by-did",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "../common/models/immutable-record.v1.json"
                                },
                                "examples": {
                                    "Tenant using default webhook": {
                                        "value": {
                                            "id": "507f191e810c19729de860ea",
                                            "createdAt": "2019-08-24T14:15:22Z"
                                        }
                                    },
                                    "Tenant with webhook": {
                                        "value": {
                                            "id": "507f191e810c19729de860ea",
                                            "createdAt": "2019-08-24T14:15:22Z"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "./models/modify-tenant.v1.json"
                            },
                            "examples": {
                                "Add service": {
                                    "value": {
                                        "serviceIds": [
                                            "did:web:example.com#issuer"
                                        ]
                                    }
                                },
                                "Add service to tenant specific webhook": {
                                    "value": {
                                        "serviceIds": [
                                            "did:web:example.com#issuer",
                                            "did:web:example.com#verifier"
                                        ],
                                        "webhookUrl": "http://example.com/webhooks",
                                        "webHookAuth": {
                                            "type": "bearer",
                                            "bearerToken": "ZQ.Jv}4#K#};}g]3r)"
                                        }
                                    }
                                }
                            }
                        },
                        "application/xml": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "webHookAuth": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string"
                                            },
                                            "bearerToken": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                },
                                "x-examples": {
                                    "Example 1": {
                                        "webHookAuth": {
                                            "type": "bearer",
                                            "bearerToken": "secrettoken"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "description": "Updates a new tenant with the specified did and other metadata\n\nErrors \n* if the request credential type is already registered to another vendor who issues credentials\n* if the DID is not found\n* if the DID doesnt match the tenant id\n* if services includes ISSUE then issuedCredentialTypes must contain at least one credential type\n* if the `kid` cannot be looked up on chain\n* if the `kid` points to an unsupported key type\n* if the `key` is incorrectly formatted",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "tags": [
                    "tenants"
                ]
            },
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID.",
                    "required": true
                }
            ],
            "delete": {
                "summary": "Delete a Tenant",
                "operationId": "delete-tenant",
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "description": "Delete the specified tenant",
                "tags": [
                    "tenants"
                ]
            }
        },
        "/tenants": {
            "post": {
                "summary": "Create a Tenant (Issuer or Verifier)",
                "operationId": "post-organizations",
                "responses": {
                    "201": {
                        "description": "Created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "../common/models/immutable-record.v1.json"
                                },
                                "examples": {
                                    "Tenant using default webhook": {
                                        "value": {
                                            "id": "507f191e810c19729de860ea",
                                            "createdAt": "2019-08-24T14:15:22Z"
                                        }
                                    },
                                    "Tenant with webhook": {
                                        "value": {
                                            "id": "507f191e810c19729de860ea",
                                            "createdAt": "2019-08-24T14:15:22Z"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "./models/new-tenant.v1.json"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "keys": {
                                                "type": "array",
                                                "items": {
                                                    "$ref": "./models/new-key.v1.json"
                                                }
                                            }
                                        },
                                        "required": [
                                            "keys"
                                        ]
                                    }
                                ]
                            },
                            "examples": {
                                "Create Tenant": {
                                    "value": {
                                        "serviceIds": [
                                            "did:web:example.com#issuer",
                                            "did:web:example.com#verifier"
                                        ],
                                        "did": "did:web:example.com",
                                        "keys": [
                                            {
                                                "purposes": [
                                                    "ISSUING_METADATA"
                                                ],
                                                "algorithm": "SECP256K1",
                                                "encoding": "hex",
                                                "kidFragment": "#key-1",
                                                "key": "25de68fb4e6738b03b7c07c43623caa0d47b6bc14c4d67e71ae0fe015267b694"
                                            },
                                            {
                                                "purposes": [
                                                    "EXCHANGES"
                                                ],
                                                "algorithm": "SECP256K1",
                                                "encoding": "hex",
                                                "kidFragment": "#key-2",
                                                "key": "4080dadfeddad01562c53c548461c39218245cb1382abba44cf02b511c28f98f"
                                            },
                                            {
                                                "purposes": [
                                                    "DLT_TRANSACTIONS"
                                                ],
                                                "algorithm": "SECP256K1",
                                                "encoding": "hex",
                                                "kidFragment": "#key-3",
                                                "key": "f3b4fc7d0c4b54c7ffca355c10ead0890f4c9c49690cf681737b0b1179505bb7"
                                            }
                                        ]
                                    }
                                },
                                "Create Tenant with webhook override": {
                                    "value": {
                                        "serviceIds": [
                                            "did:web:example.com#issuer",
                                            "did:web:example.com#verifier"
                                        ],
                                        "webhookUrl": "http://example.com/webhooks",
                                        "webHookAuth": {
                                            "type": "bearer",
                                            "bearerToken": "ZQ.Jv}4#K#};}g]3r)"
                                        },
                                        "did": "did:web:example.com",
                                        "keys": [
                                            {
                                                "purposes": [
                                                    "ISSUING_METADATA"
                                                ],
                                                "algorithm": "SECP256K1",
                                                "encoding": "hex",
                                                "kidFragment": "#key-1",
                                                "key": "25de68fb4e6738b03b7c07c43623caa0d47b6bc14c4d67e71ae0fe015267b694"
                                            },
                                            {
                                                "purposes": [
                                                    "EXCHANGES"
                                                ],
                                                "algorithm": "SECP256K1",
                                                "encoding": "hex",
                                                "kidFragment": "#key-2",
                                                "key": "4080dadfeddad01562c53c548461c39218245cb1382abba44cf02b511c28f98f"
                                            },
                                            {
                                                "purposes": [
                                                    "DLT_TRANSACTIONS"
                                                ],
                                                "algorithm": "SECP256K1",
                                                "encoding": "hex",
                                                "kidFragment": "#key-3",
                                                "key": "f3b4fc7d0c4b54c7ffca355c10ead0890f4c9c49690cf681737b0b1179505bb7"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "description": "Creates a new tenant with the specified did and other metadata\n\nErrors \n* if the request credential type is already registered to another vendor who issues credentials\n* if the DID is not found\n* if the DID doesnt match the tenant id\n* if services includes ISSUE then issuedCredentialTypes must contain at least one credential type\n* if the `kid` cannot be looked up on chain\n* if the `kid` points to an unsupported key type\n* if the `key` is incorrectly formatted",
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "tags": [
                    "tenants"
                ]
            },
            "get": {
                "summary": "Get Multiple Tenants",
                "operationId": "get-tenants",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "./models/tenant.v1.json"
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "description": "Retrieves tenants. Multiple results maybe paged. Call again with nextPage query parameter to get the next set of results.",
                "tags": [
                    "tenants"
                ]
            }
        },
        "/tenants/{tenantId}/issued-credentials/{credentialId}/revoke": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "credentialId",
                    "in": "path",
                    "required": true,
                    "description": "did of the issued credential"
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "post": {
                "summary": "Revoke Credential",
                "operationId": "delete-credentials",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "notifiedOfRevocationAt": {
                                            "type": "string",
                                            "format": "date-time"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "description": "Revokes the credential",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "message": {
                                        "type": "string",
                                        "description": "message to send to the user"
                                    },
                                    "linkedOffer": {
                                        "type": "object",
                                        "description": "did of the issuer of a replacement or linked offer, and the credential type",
                                        "properties": {
                                            "issuerDid": {
                                                "type": "string"
                                            },
                                            "credentialType": {
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "issuerDid",
                                            "credentialType"
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "description": "The request can optionally contain a message that will be displayed to the user using a push notification or status update inapp. The linkedOffer is the information required to retrieve a linked offer that replaces the revoked credential. (not every revoked cred has an replacement)"
                },
                "tags": [
                    "issued-credentials"
                ]
            }
        },
        "/tenants/{tenantId}/issued-credentials": {
            "get": {
                "summary": "Get Issued Credential List",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "issuedCredentials": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "../common/models/issued-credential.v1.json"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-issued-credentials",
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorUserId",
                        "description": "the vendor User id of the person"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "credentialId",
                        "description": "the credential id of the issuer offer (only for issued offers)"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorOfferId",
                        "description": "the vendor offer id of the particular offer"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "page.size",
                        "description": "The number of records to retrieve"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "page.skip",
                        "description": "The number of records to skip"
                    },
                    {
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "in": "query",
                        "name": "sort[]",
                        "description": "A array of tuples indicating the field to sort by"
                    }
                ],
                "security": [
                    {
                        "Bearer Token": []
                    }
                ],
                "description": "Can retrieve issued credentials using a tenant's user id (called vendorUserId), vendor's offer id or all offers for a tenant. Multiple results maybe paged. Call again with nextPage query parameter to get the next set of results.",
                "tags": [
                    "issued-credentials"
                ]
            },
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ]
        },
        "/tenants/{tenantId}/check-credentials": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "post": {
                "summary": "Check Credentials",
                "operationId": "post-tenants-check-credentials",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "credentials": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "../common/models/primary-vendor-checked-credential.v1.json"
                                            }
                                        }
                                    },
                                    "required": [
                                        "credentials"
                                    ]
                                },
                                "examples": {
                                    "Sample response": {
                                        "value": {
                                            "credentials": [
                                                {
                                                    "id": "did:velocity:v2:Yur0-Poi28cVDS",
                                                    "type": [
                                                        "EmailV1.0",
                                                        "VerifiableCredential"
                                                    ],
                                                    "issuer": {
                                                        "id": "did:web:example.com"
                                                    },
                                                    "credentialSubject": {
                                                        "email": "adam.smith@example.com"
                                                    },
                                                    "issuanceDate": "2020-03-10T06:02:21.321Z",
                                                    "credentialChecks": {
                                                        "UNTAMPERED": "PASS",
                                                        "TRUSTED_ISSUER": "PASS",
                                                        "TRUSTED_HOLDER": "PASS",
                                                        "UNREVOKED": "PASS",
                                                        "UNEXPIRED": "NOT_APPLICABLE"
                                                    }
                                                },
                                                {
                                                    "id": "did:velocity:v2:Yur0-Poi28cVDS",
                                                    "type": [
                                                        "EmploymentCurrentV1.1",
                                                        "VerifiableCredential"
                                                    ],
                                                    "issuer": {
                                                        "id": "did:web:example.com"
                                                    },
                                                    "credentialSubject": {
                                                        "recipient": {
                                                            "givenName": "Adam",
                                                            "familyName": "Smith"
                                                        },
                                                        "legalEmployer": {
                                                            "id": "did:web:example.com",
                                                            "name": "ACME Corporation",
                                                            "place": {
                                                                "addressCountry": "US",
                                                                "addressRegion": "US-CA"
                                                            }
                                                        },
                                                        "role": "Programme Manager",
                                                        "startDate": "2015-02",
                                                        "employmentType": "full-time"
                                                    },
                                                    "issuanceDate": "2020-03-10T06:02:21.321Z",
                                                    "credentialChecks": {
                                                        "UNTAMPERED": "PASS",
                                                        "TRUSTED_ISSUER": "PASS",
                                                        "TRUSTED_HOLDER": "PASS",
                                                        "UNREVOKED": "FAIL",
                                                        "UNEXPIRED": "NOT_APPLICABLE"
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "404": {
                        "description": "Tenant Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rawCredentials": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "description": "the credential id of the raw credential"
                                                },
                                                "rawCredential": {
                                                    "type": "string",
                                                    "description": "the raw string containing the signed credential"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "rawCredential"
                                            ]
                                        }
                                    }
                                }
                            },
                            "examples": {
                                "Sample Request": {
                                    "value": {
                                        "rawCredentials": [
                                            {
                                                "id": "5ecb03962a138694e04fd66c247d8851",
                                                "rawCredential": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
                                            },
                                            {
                                                "id": "80bde57f73481e9adbb421dbb90d6c01",
                                                "rawCredential": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkaWQ6dmVsb2NpdHk6MTIzMTI5M2kyMTMxMiIsIm5hbWUiOiJGcmVkIEFzdGFpciIsImlhdCI6MTUxNjgzOTAyMn0.hs_V0Fp0UFAy_TtbuBK9OS14O6OHE0c4fJ1pfg8po24"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "description": ""
                },
                "description": "Check the set of raw credentials",
                "tags": [
                    "credentials"
                ],
                "security": [
                    {
                        "Bearer Token": []
                    }
                ]
            }
        },
        "/tenants/{tenantId}/disclosures/{disclosureId}/qrcode.png": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "disclosureId",
                    "in": "path",
                    "required": true,
                    "description": "disclosure id for this disclosure"
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "get": {
                "summary": "Get a Disclosure QR Code",
                "tags": [
                    "disclosures"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "image/png": {}
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "operationId": "get-tenant-disclosure-qrcode-png",
                "description": "Public endpoint for retrieving a qr code for a particular disclosure. Returns a png",
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorOriginContext",
                        "description": "The origin context to embed into the deep link. Probably a signed token or secure secret that can be used to link the to an authenticated user session."
                    }
                ]
            }
        },
        "/tenants/{tenantId}/disclosures/{disclosureId}/qrcode.uri": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "disclosureId",
                    "in": "path",
                    "required": true,
                    "description": "disclosure id for this disclosure"
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "get": {
                "summary": "Get a Disclosure URI",
                "tags": [
                    "disclosures"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string",
                                    "properties": {}
                                }
                            }
                        }
                    }
                },
                "operationId": "get-tenant-disclosure-qrcode-json",
                "description": "Public endpoint for retrieving a deep link for a particular disclosure. Returns a URI. This URI can be encoded into a QR code.",
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorOriginContext",
                        "description": "The origin context to embed into the deep link. Probably a signed token or secure secret that can be used to link the to an authenticated user session."
                    }
                ]
            }
        },
        "/tenants/{tenantId}/disclosures/{disclosureId}/deep-link": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "disclosureId",
                    "in": "path",
                    "required": true
                }
            ],
            "get": {
                "summary": "Get a Disclosure HTTPS Deep Link",
                "tags": [
                    "disclosures"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deepLink": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    },
                                    "required": [
                                        "deepLink"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found"
                    }
                },
                "operationId": "get-tenants-did-disclosures-disclosureId-deep-link",
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "vendorOriginContext",
                        "description": "The origin context to embed into the deep link. Probably a signed token or secure secret that can be used to link the to an authenticated user session."
                    }
                ],
                "description": ""
            }
        },
        "/tenants/{tenantId}/keys": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "get": {
                "summary": "Get Key Metadatas",
                "tags": [
                    "tenants"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "./models/key-metadata.v1.json"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-tenants-did-keys",
                "description": "gets all key metadata for the tenant"
            },
            "post": {
                "summary": "Create Keys",
                "operationId": "post-tenants-did-keys",
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "./models/key-metadata.v1.json"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "409": {
                        "description": "Conflict"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "description": "Adds a key to the tenant\n\n* if the `purposes` on different keys is repeated it should error with 409\n* if the `kid` cannot be looked up on chain it should error with 400\n* if the `kid` points to an unsupported key type it should error with 400\n* if the `key` is incorrectly formatted it should error with 400",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "./models/new-key.v1.json"
                            },
                            "examples": {
                                "JWK Example": {
                                    "value": {
                                        "purposes": [
                                            "DLT_TRANSACTIONS"
                                        ],
                                        "algorithm": "SECP256K1",
                                        "encoding": "jwk",
                                        "kidFragment": "#key-1",
                                        "jwk": {
                                            "kty": "EC",
                                            "crv": "secp256k1",
                                            "x": "38M1FDts7Oea7urmseiugGW7tWc3mLpJh6rKe7xINZ8",
                                            "y": "nDQW6XZ7b_u2Sy9slofYLlG03sOEoug3I0aAPQ0exs4",
                                            "d": "kafnldjflakfads"
                                        }
                                    }
                                },
                                "hex key example": {
                                    "value": {
                                        "purposes": [
                                            "DLT_TRANSACTIONS"
                                        ],
                                        "algorithm": "SECP256K1",
                                        "encoding": "hex",
                                        "kidFragment": "#key-1",
                                        "key": "04ab0102bcae6c7c3a90b01a3879d9518081bc06123038488db9cb109b082a77d97ea3373e3dfde0eccd9adbdce11d0302ea5c098dbb0b310234c8689501749274"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "tenants"
                ]
            }
        },
        "/tenants/{tenantId}/keys/{idFragment}": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "idFragment",
                    "in": "path",
                    "required": true,
                    "description": "the fragment part of the key's id to delete"
                }
            ],
            "delete": {
                "summary": "Delete a key from the key array",
                "tags": [
                    "tenants"
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    },
                    "400": {
                        "description": "Bad Request"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-tenants-did-keys-kidFragment",
                "description": "Delete a key"
            }
        },
        "/tenants/{tenantId}/offer-data": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "get": {
                "summary": "Download Offers extract",
                "tags": [
                    "offers"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "text/csv": {
                                "schema": {
                                    "type": "object",
                                    "description": "Credential did if offer accepted.\r\n",
                                    "properties": {
                                        "credentialDid": {
                                            "type": "string",
                                            "x-stoplight": {
                                                "id": "v4og82s2u8k4y"
                                            }
                                        },
                                        "vendorUserId": {
                                            "type": "string",
                                            "x-stoplight": {
                                                "id": "d0o8ykuams911"
                                            }
                                        },
                                        "offerId": {
                                            "type": "string",
                                            "x-stoplight": {
                                                "id": "0houm1e8jr8lo"
                                            }
                                        },
                                        "offerClaimDate": {
                                            "type": "string",
                                            "x-stoplight": {
                                                "id": "0wrjo3hsv897j"
                                            }
                                        },
                                        "revocationStatus": {
                                            "type": "string",
                                            "x-stoplight": {
                                                "id": "sg5b495irz4t5"
                                            }
                                        },
                                        "issuerId": {
                                            "type": "string",
                                            "x-stoplight": {
                                                "id": "pdvgepcngpv0n"
                                            }
                                        },
                                        "credentialType": {
                                            "type": "string",
                                            "x-stoplight": {
                                                "id": "rc54vqx3lz36g"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "Not Found"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                },
                "operationId": "get-tenants-did-offer-data",
                "description": "Will retreive all offer data for a tenant during given date range and return it as a CSV.",
                "requestBody": {
                    "content": {},
                    "description": ""
                },
                "parameters": [
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "StartDate",
                        "description": "Beginning of date to retrieve offers"
                    },
                    {
                        "schema": {
                            "type": "string"
                        },
                        "in": "query",
                        "name": "EndDate",
                        "description": "End of date to retrieve offers"
                    },
                    {
                        "schema": {
                            "type": "boolean"
                        },
                        "in": "query",
                        "name": "claimed",
                        "description": "Filter on whether an offer has been claimed"
                    }
                ]
            }
        },
        "/tenants/{tenantId}/offers/clean_pii": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                }
            ],
            "post": {
                "summary": "Clean Offer PII",
                "operationId": "post-tenants-did-offers-clean_pii",
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "numCleaned": {
                                            "type": "integer",
                                            "x-stoplight": {
                                                "id": "zv01bjkzug7fi"
                                            }
                                        }
                                    },
                                    "required": [
                                        "numCleaned"
                                    ]
                                }
                            }
                        }
                    }
                },
                "x-stoplight": {
                    "id": "rl52h3ekw5tiq"
                },
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "filter": {
                                        "type": "object",
                                        "x-stoplight": {
                                            "id": "s3byp40u998nj"
                                        },
                                        "properties": {
                                            "vendorUserId": {
                                                "type": "string",
                                                "x-stoplight": {
                                                    "id": "dvce99xploizb"
                                                },
                                                "description": "Remove offers for this user"
                                            },
                                            "disclosureId": {
                                                "type": "string",
                                                "x-stoplight": {
                                                    "id": "mu38u7ztlnitx"
                                                },
                                                "description": "Remove offers related to a disclosureId"
                                            },
                                            "createdBefore": {
                                                "type": "string",
                                                "x-stoplight": {
                                                    "id": "zl5bk3hej5d9u"
                                                },
                                                "description": "Remove offers created before a certain time",
                                                "format": "date-time"
                                            },
                                            "expired": {
                                                "type": "boolean",
                                                "x-stoplight": {
                                                    "id": "qkbzsn5yiveto"
                                                },
                                                "default": false,
                                                "description": "Remove offers that are expired"
                                            },
                                            "finalized": {
                                                "type": "boolean",
                                                "x-stoplight": {
                                                    "id": "bdtbbrtf6i2h2"
                                                },
                                                "default": false,
                                                "description": "Remove claimed or rejected offers"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "offers"
                ]
            }
        },
        "/tenants/{tenantId}/disclosures/{disclosureId}/feeds": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "disclosureId",
                    "in": "path",
                    "required": true
                }
            ],
            "get": {
                "summary": "Get All Feeds",
                "tags": [
                    "feeds"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "feeds"
                                    ],
                                    "properties": {
                                        "feeds": {
                                            "type": "array",
                                            "x-stoplight": {
                                                "id": "3v4948xhye8h0"
                                            },
                                            "items": {
                                                "$ref": "./models/feed.json"
                                            }
                                        }
                                    }
                                },
                                "examples": {
                                    "Sample Feeds": {
                                        "value": {
                                            "feeds": [
                                                {
                                                    "id": "99991",
                                                    "vendorUserId": "1",
                                                    "preauthCode": "eY52pOA",
                                                    "feedTimestamp": "2019-08-24T14:15:22Z",
                                                    "createdAt": "2019-08-24T14:15:22Z",
                                                    "updatedAt": "2019-08-24T14:15:22Z"
                                                },
                                                {
                                                    "id": "99992",
                                                    "vendorUserId": "2",
                                                    "preauthCode": "9iT3dvM",
                                                    "feedTimestamp": "2023-02-24T14:15:22Z",
                                                    "createdAt": "2019-08-24T14:15:22Z",
                                                    "updatedAt": "2019-08-24T14:15:22Z"
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "operationId": "get-tenants-did-disclosures-disclosureId-feeds",
                "x-stoplight": {
                    "id": "5q9rh8mwtbkor"
                },
                "description": "Gets all feeds associated with the disclosure"
            },
            "post": {
                "summary": "Add Feeds",
                "tags": [
                    "feeds"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "feeds"
                                    ],
                                    "properties": {
                                        "feeds": {
                                            "type": "array",
                                            "x-stoplight": {
                                                "id": "pjhye1vrb3eeh"
                                            },
                                            "items": {
                                                "$ref": "./models/feed.json"
                                            }
                                        }
                                    }
                                },
                                "examples": {
                                    "Sample Feed": {
                                        "value": {
                                            "feeds": [
                                                {
                                                    "id": "99991",
                                                    "vendorUserId": "1",
                                                    "preauthCode": "eY52pOA",
                                                    "feedTimestamp": "2019-08-24T14:15:22Z",
                                                    "createdAt": "2019-08-24T14:15:22Z",
                                                    "updatedAt": "2019-08-24T14:15:22Z"
                                                },
                                                {
                                                    "id": "99992",
                                                    "vendorUserId": "2",
                                                    "preauthCode": "9iT3dvM",
                                                    "feedTimestamp": "2023-02-24T14:15:22Z",
                                                    "createdAt": "2019-08-24T14:15:22Z",
                                                    "updatedAt": "2019-08-24T14:15:22Z"
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "operationId": "post-tenants-did-disclosures-disclosureId-feeds",
                "x-stoplight": {
                    "id": "iuw9u9iezigj4"
                },
                "description": "Add feeds to the disclosure",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "feeds": {
                                        "type": "array",
                                        "x-stoplight": {
                                            "id": "3e612pm2o15kh"
                                        },
                                        "items": {
                                            "$ref": "./models/modify-feed.json"
                                        }
                                    }
                                }
                            },
                            "examples": {
                                "Sample creation": {
                                    "value": {
                                        "feeds": [
                                            {
                                                "vendorUserId": "1",
                                                "preauthCode": "eY52pOA"
                                            },
                                            {
                                                "vendorUserId": "2",
                                                "preauthCode": "9iT3dvM"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tenants/{tenantId}/disclosures/disclosureId/feeds/{feedId}": {
            "parameters": [
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "tenantId",
                    "in": "path",
                    "required": true,
                    "description": "The identifier for the tenant. Preferably the tenant.id but can also be the organization's registered DID."
                },
                {
                    "schema": {
                        "type": "string"
                    },
                    "name": "feedId",
                    "in": "path",
                    "required": true
                }
            ],
            "get": {
                "summary": "Get Feed",
                "tags": [
                    "feeds"
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "feed": {
                                            "$ref": "./models/feed.json"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "operationId": "get-tenants-did-disclosures-disclosureId-feeds-feedId",
                "x-stoplight": {
                    "id": "6n14k13o1wg4u"
                },
                "description": "Gets the specified feed"
            },
            "put": {
                "summary": "Update Feed",
                "tags": [
                    "feeds"
                ],
                "responses": {
                    "2XX": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "feed": {
                                            "$ref": "./models/feed.json"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "operationId": "put-tenants-did-disclosures-disclosureId-feeds-feedId",
                "x-stoplight": {
                    "id": "75s1ot6zakvz4"
                },
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "feed": {
                                        "type": "object",
                                        "required": [
                                            "preauthCode"
                                        ],
                                        "properties": {
                                            "preauthCode": {
                                                "type": "string",
                                                "x-stoplight": {
                                                    "id": "lc5ctd5i2oqmo"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "description": "Updates the preauthcode of the specified feed"
            },
            "delete": {
                "summary": "Delete Feed",
                "tags": [
                    "feeds"
                ],
                "responses": {
                    "204": {
                        "description": "No Content"
                    }
                },
                "operationId": "delete-tenants-did-disclosures-disclosureId-feeds-feedId",
                "x-stoplight": {
                    "id": "7pqukygtquxgr"
                },
                "description": "Deletes the specified feed"
            }
        }
    },
    "components": {
        "securitySchemes": {
            "Bearer Token": {
                "type": "http",
                "scheme": "bearer",
                "description": ""
            }
        }
    }
}