{
  "swagger": "2.0",
  "info": {
    "title": "Digital Credentials Provisioning API - Google Hosted Endpoints",
    "description": "This includes services hosted by Google for the Digital Credentials Provisioning API.",
    "version": "v1"
  },
  "host": "vgw.googleapis.com",
  "schemes": ["http", "https"],
  "paths": {
    "/be/mdl/canonical/:issuerId/v1/healthCheck": {
      "post": {
        "tags": ["vgw"],
        "operationId": "HealthCheck",
        "description": "An endpoint used to test connectivity issues.",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/HealthCheckRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/HealthCheckResponse"
            }
          }
        }
      }
    },
    "/be/mdl/canonical/:issuerId/v1/notifyProofingStatusUpdateAvailable": {
      "post": {
        "tags": ["vgw"],
        "operationId": "NotifyProofingStatusUpdateAvailable",
        "description": "An endpoint to indicate that there is a new status update that can be retrieved using GetProofingStatus.",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/NotifyProofingStatusUpdateAvailableRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/NotifyProofingStatusUpdateAvailableResponse"
            }
          }
        }
      }
    },
    "/be/mdl/canonical/:issuerId/v1/notifyCredentialStatusUpdateAvailable": {
      "post": {
        "tags": ["vgw"],
        "operationId": "NotifyCredentialStatusUpdateAvailable",
        "description": "An endpoint to indicate that there is a new status update that can be retrieved using GetCredentialStatus.",
        "parameters": [
          {
            "name": "body",
            "description": "The request body.",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/NotifyCredentialStatusUpdateAvailableRequest"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "Successful operation",
            "schema": {
              "$ref": "#/definitions/NotifyCredentialStatusUpdateAvailableResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "HealthCheckRequest": {
      "description": "A request to Google from an issuer, to check the health of our system.",
      "type": "object",
      "properties": {
        "requestMetadata": {
          "description": "The metadata about the request, required in all requests.",
          "$ref": "#/definitions/RequestMetadata"
        },
        "clientMessage": {
          "description": "A message that the server will echo in the response.",
          "type": "string"
        }
      }
    },
    "RequestMetadata": {
      "description": "The metadata about the request, required in all requests.",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "An id used to identify this specific request, and should be different for every retry. This is used for debugging purposes, such as identifying requests that failed. No idempotency requirements are attached to this Ex: UUID",
          "type": "string"
        },
        "version": {
          "description": "The version of the API being used. This should be checked against the version of the API implemented by the server, and the request should be rejected if they do not match.",
          "$ref": "#/definitions/Version"
        },
        "issuerId": {
          "description": "The id of the issuer Google is communicating with. This can be used to quickly filter on the specific issuer's traffic while debugging. Ex: FreeFormState_ISO2Country_MDL",
          "type": "string"
        }
      }
    },
    "Version": {
      "description": "An object representing the version of the API.",
      "type": "object",
      "properties": {
        "major": {
          "description": "The major version number of the API. Ex: for version 1.2, this would be 1",
          "type": "integer",
          "format": "int32"
        },
        "minor": {
          "description": "The minor version number of the API. Ex: for version 1.2, this would be 2",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "HealthCheckResponse": {
      "description": "A response to a health check, indicating a healthy system.",
      "type": "object",
      "properties": {
        "responseMetadata": {
          "description": "The metadata about the response, required in all responses.",
          "$ref": "#/definitions/ResponseMetadata"
        },
        "clientMessage": {
          "description": "The message sent by the client, echoed by the server.",
          "type": "string"
        }
      }
    },
    "ResponseMetadata": {
      "description": "The metadata about the response, required in all responses.",
      "type": "object",
      "properties": {
        "requestId": {
          "description": "The request id that was sent in the request. The recipient of this response must confirm that this request_id matches the one that was passed in.",
          "type": "string"
        }
      }
    },
    "NotifyProofingStatusUpdateAvailableRequest": {
      "description": "A request from the issuer, indicating that there is a new status update that can be retrieved using GetProofingStatus.",
      "type": "object",
      "properties": {
        "requestMetadata": {
          "description": "The metadata about the request, required in all requests.",
          "$ref": "#/definitions/RequestMetadata"
        },
        "deviceReferenceId": {
          "description": "The id that corresponds to the device and the identity key associated with the device. This is NOT a device id, meaning that if the user were to have two separate credentials on the same device, this id would differ between them. This id is supplied in all requests, and can be used to correlate requests.",
          "type": "string"
        },
        "proofingId": {
          "description": "An opaque identifier representing a proofing with a specific bundle of evidence, for a specific device. Ex: UUID",
          "type": "string"
        }
      }
    },
    "NotifyProofingStatusUpdateAvailableResponse": {
      "description": "An acknowledgement that there is a proofing status update available.",
      "type": "object",
      "properties": {
        "responseMetadata": {
          "description": "The metadata about the response, required in all responses.",
          "$ref": "#/definitions/ResponseMetadata"
        }
      }
    },
    "NotifyCredentialStatusUpdateAvailableRequest": {
      "description": "A request from the issuer, indicating that there is a new status update that can be retrieved using GetCredentialStatus.",
      "type": "object",
      "properties": {
        "requestMetadata": {
          "description": "The metadata about the request, required in all requests.",
          "$ref": "#/definitions/RequestMetadata"
        },
        "deviceReferenceId": {
          "description": "The id that corresponds to the device and the identity key associated with the device. This is NOT a device id, meaning that if the user were to have two separate credentials on the same device, this id would differ between them. This id is supplied in all requests, and can be used to correlate requests.",
          "type": "string"
        },
        "credentialId": {
          "description": "An opaque identifier representing a credential. Ex: UUID",
          "type": "string"
        }
      }
    },
    "NotifyCredentialStatusUpdateAvailableResponse": {
      "description": "An acknowledgement that there is a credential status update available.",
      "type": "object",
      "properties": {
        "responseMetadata": {
          "description": "The metadata about the response, required in all responses.",
          "$ref": "#/definitions/ResponseMetadata"
        }
      }
    },
    "ErrorResponse": {
      "description": "ErrorResponse object for all methods. This is returned instead of the usual response type, when there is an error. This object should not be used for business logic based rejections.",
      "type": "object",
      "properties": {
        "responseMetadata": {
          "description": "The metadata about the response, required in all responses.",
          "$ref": "#/definitions/ResponseMetadata"
        },
        "errorDescription": {
          "description": "Provide a description of this status for support reps to debug errors. Note that this is never shown to users. It can contain descriptive, non-sensitive text used for debugging. Note that some values for errorResponseCode should be accompanied by additional detail in this field. Warning: Do not include any PII in this message.",
          "type": "string"
        },
        "issuerErrorIdentifier": {
          "description": "This identifier is specific to the issuer and is generated by the issuer. It is used for debugging purposes only in order to identify this error. This is the identifier that the issuer knows this error by.",
          "type": "string"
        },
        "invalidApiVersion": {
          "description": "Used if the request's API version is unsupported. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidApiVersion"
        },
        "invalidPayloadSignature": {
          "description": "Used if the signature of the payload is to an unknown or inactive key. Advised HTTP Code: 401",
          "$ref": "#/definitions/ErrorResponseInvalidPayloadSignature"
        },
        "invalidPayloadEncryption": {
          "description": "Used if the encryption of the payload is to an unknown or inactive key. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidPayloadEncryption"
        },
        "invalidIdentifier": {
          "description": "Used if an identifier sent in the request was invalid or unknown. Advised HTTP Code: 404",
          "$ref": "#/definitions/ErrorResponseInvalidIdentifier"
        },
        "invalidFieldValue": {
          "description": "Used if the request contains a value for a field that isn't in the set of supported values. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidFieldValue"
        },
        "missingRequiredField": {
          "description": "Used if a field that is required is unset in the request. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseMissingRequiredField"
        },
        "invalidDecryptedRequest": {
          "description": "Used if the request payload could be decrypted, but the resulting message could not be parsed. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidDecryptedRequest"
        },
        "permissionDenied": {
          "description": "Used if the request was declined due to issues related to any permission credentials that Google sends in the API calls. Advised HTTP Code: 403",
          "$ref": "#/definitions/ErrorResponsePermissionDenied"
        },
        "forbidden": {
          "description": "Access to the requested resource is forbidden. Advised Http Code: 403",
          "$ref": "#/definitions/ErrorResponseForbidden"
        },
        "invalidState": {
          "description": "Used if a request was made, but the system is not in a valid state to perform the request. Ex: ProvisionCredential is called with a Rejected proofing. Advised HTTP Code: 400",
          "$ref": "#/definitions/ErrorResponseInvalidState"
        }
      }
    },
    "ErrorResponseInvalidApiVersion": {
      "description": "Object containing information about an invalid API version error.",
      "type": "object",
      "properties": {
        "requestVersion": {
          "description": "The invalid version that was specified on the request.",
          "$ref": "#/definitions/Version"
        },
        "expectedVersion": {
          "description": "The expected version.",
          "$ref": "#/definitions/Version"
        }
      }
    },
    "ErrorResponseInvalidPayloadSignature": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseInvalidPayloadEncryption": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseInvalidIdentifier": {
      "description": "Object containing information about an invalid identifier error.",
      "type": "object",
      "properties": {
        "invalidIdentifierType": {
          "description": "The type of identifier that was invalid, e.g. proofing id, document id, etc.",
          "type": "string"
        }
      }
    },
    "ErrorResponseInvalidFieldValue": {
      "description": "Object containing information about an invalid field value error.",
      "type": "object",
      "properties": {
        "invalidFieldName": {
          "description": "The name of the field that was found to be invalid.",
          "type": "string"
        }
      }
    },
    "ErrorResponseMissingRequiredField": {
      "description": "Object containing information about an missing required field error.",
      "type": "object",
      "properties": {
        "missingFieldNames": {
          "description": "The names of the missing fields.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ErrorResponseInvalidDecryptedRequest": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponsePermissionDenied": {
      "description": "Object containing information about a permission denied error.",
      "type": "object",
      "properties": {
        "reason": {
          "description": "The reason for denying the permission.",
          "type": "string"
        }
      }
    },
    "ErrorResponseForbidden": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    },
    "ErrorResponseInvalidState": {
      "description": "This message is intentionally empty right now. New fields could be added in the future.",
      "type": "object",
      "properties": {
      }
    }
  }
}