openapi: 3.1.0 info: title: Accredify Dashboard APIs description: >- This is the API documentation for the Accredify Dashboard, providing access to our services in a development and production environment. version: 1.0.0 servers: - url: 'http://dashboard.local.accredify.io/api' description: Accredify Local (Local) - url: 'https://dashboard.uat.accredify.io/api' description: Accredify Sandbox (UAT) - url: 'https://dashboard.accredify.io/api' description: Accredify Main Server (Production) paths: /v1/oauth/grant: post: tags: - OAuth 2.0 summary: Generate an access token description: Generate an access token operationId: authorizationCodeGrant requestBody: required: true content: application/json: schema: required: - grant_type - client_id - client_secret properties: grant_type: description: Type of grant you are requesting for type: string default: authorization_code enum: - authorization_code - password example: authorization_code client_id: description: client_id of your application which you have registered with Accredify type: string example: e55d957f-3c09-4276-bc3e-1f3e333c4645 client_secret: description: client_secret of your application which you have registered with Accredify type: string example: 3Xr4lVLBz2hhoFtnngxQTWFiZUJABRaX2g5pcpra authorization_code: description: code that was previously returned to callback endpoint which was registered with Accredify type: string example: >- def50200bbc143dd0a58d85ef86deeebdf75fee730e3496f4c4d6f7afd6e3d1cdbc8bf6b0615e991dd43bbfafd503d6f39d1419a258ddc3c7b6e6a6f0dbce123f47e7ec88fa551e2d207f57d20d288d92a3c8dab8569432047c993bff7bbd4bc882910965ba72f956d9fc2a0f0a330ab94fd5c1338a2df2b536727a409e2ab50c6563773495623ae92ead74d6218606e9e7ec328b059a7ce1d4ceb705260a14a44058f2372f5048d5b1e36c83763023ba1da90d4b8898d49bb7c7dd9d4687b78c3f1082793a1c36967426af93ae6740ae8bb53f77b57a933ec97e2b0f323078f77e9e08cc09a4327a72026d939ae0eaacd46efafeaed785d26e2962f2e5473d2f9876e7e7ba1ffd41b599fb539edafecd2e895093d6aee63d36c0b144d4ea5752d558a2fce47bc2da9ad5f331c9d5bb72d7bb2f9aead6c86e401025c263ed21ab35a7e3b9e6129f063fca08b97efdeb5406fb53ff5d32b096e58c9443a0c2480a6ff183a8a755c5369ef985f1e5b12fcf7dfd1bae67f398ae64760eeae19c76d78947dd4d5387842b2ra scope: description: Provide a list of scopes separated by space. type: string example: renderer verification read.document type: object responses: '200': $ref: '#/components/responses/SuccessRequest' '302': $ref: '#/components/responses/RedirectRequest' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/UnauthenticatedRequest' '404': $ref: '#/components/responses/NotFoundRequest' '422': $ref: '#/components/responses/UnprocessableEntityRequest' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalErrorRequest' /v1/oauth/redirect: get: tags: - OAuth 2.0 summary: >- Request for user to authorize third party application access to their account. If successful, returns redirect with authorization code & state which can be used to request for an access token description: >- returns redirect with authorization code and state which can be used to request for an access token. This authorization code is returned if the user approves the request. operationId: redirect parameters: - name: client_id in: query description: client_id of your application which you have registered with Accredify required: true schema: type: string example: e55d957f-3c09-4276-bc3e-1f3e333c4645 - name: state in: query description: >- random string up to 40 characters, to be stored and linked to the user session. this stored state value will be used to verify the redirect to your application's callback. required: true schema: type: string example: e55d957f-3c09-4276-bc3e-1f3e333c4645 responses: '302': $ref: '#/components/responses/RedirectRequest' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/UnauthenticatedRequest' '404': $ref: '#/components/responses/NotFoundRequest' '422': $ref: '#/components/responses/UnprocessableEntityRequest' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalErrorRequest' /v1/oauth/refresh: post: tags: - OAuth 2.0 summary: Refresh expired access tokens description: Refresh access tokens via the refresh token that was provided to them when the access token was issued operationId: refresh requestBody: required: true content: application/json: schema: required: - client_id - client_secret - refresh_token properties: client_id: description: client_id of your application which you have registered with Accredify type: string example: e55d957f-3c09-4276-bc3e-1f3e333c4645 client_secret: description: client_secret of your application which you have registered with Accredify type: string example: 3Xr4lVLBz2hhoFtnngxQTWFiZUJABRaX2g5pcpra refresh_token: description: code that was previously returned with access token type: string example: >- def50200bbc143dd0a58d85ef86deeebdf75fee730e3496f4c4d6f7afd6e3d1cdbc8bf6b0615e991dd43bbfafd503d6f39d1419a258ddc3c7b6e6a6f0dbce123f47e7ec88fa551e2d207f57d20d288d92a3c8dab8569432047c993bff7bbd4bc882910965ba72f956d9fc2a0f0a330ab94fd5c1338a2df2b536727a409e2ab50c6563773495623ae92ead74d6218606e9e7ec328b059a7ce1d4ceb705260a14a44058f2372f5048d5b1e36c83763023ba1da90d4b8898d49bb7c7dd9d4687b78c3f1082793a1c36967426af93ae6740ae8bb53f77b57a933ec97e2b0f323078f77e9e08cc09a4327a72026d939ae0eaacd46efafeaed785d26e2962f2e5473d2f9876e7e7ba1ffd41b599fb539edafecd2e895093d6aee63d36c0b144d4ea5752d558a2fce47bc2da9ad5f331c9d5bb72d7bb2f9aead6c86e401025c263ed21ab35a7e3b9e6129f063fca08b97efdeb5406fb53ff5d32b096e58c9443a0c2480a6ff183a8a755c5369ef985f1e5b12fcf7dfd1bae67f398ae64760eeae19c76d78947dd4d5387842b2ra type: object responses: '200': $ref: '#/components/responses/SuccessRequest' '302': $ref: '#/components/responses/RedirectRequest' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/UnauthenticatedRequest' '404': $ref: '#/components/responses/NotFoundRequest' '422': $ref: '#/components/responses/UnprocessableEntityRequest' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalErrorRequest' /v1/login/userTokenToLogin: get: tags: - OAuth 2.0 summary: Logs in user using access token in authorization header operationId: 6566d88c4b075dc49ecd14f458068a33 responses: '200': description: 'Success, redirect to recipient dashboard' /v1/openbadges/issue: post: tags: - OpenBadges summary: Allow an issuer to create open badges operationId: issueOpenBadges requestBody: description: Information required to create a batch of badges required: true content: application/json: schema: required: - courseCode - issue - distribute - badges properties: courseCode: description: The code of the course type: string example: PHP-Mastery batchName: description: The name of the batch (auto-generated by default) type: string example: Batch-001 issue: description: Should the badges be issued? type: boolean example: true distribute: description: Should the badges be sent out to the recipients? type: boolean example: true badges: type: array items: required: - recipient properties: assertion: description: Information about the assertion properties: uuid: description: 'Universally unique identifier of the badge, has to be UUID V4' type: string example: 1238a551-6032-46a7-b882-3f05864b4cbe issued_at: description: The date and time of when the badge was issued type: string example: '2021-02-01T12:00:00Z' expires_at: description: The date and time of when the badge will expire type: string example: '2021-02-01T12:00:00Z' narrative: description: The narrative for the award type: string example: Recipient is awarded for exceptional results type: object evidence: description: Information about the evidence properties: url: description: The url hosted page of the evidence type: string example: 'https://accredify.io' narrative: description: The narrative for the evidence type: string example: Recipient is awarded A+ type: object recipient: description: Information about the recipient required: - name - email properties: name: description: The name of the recipient type: string example: John Doe email: description: The email of the recipient type: string example: johndoe@gmail.com studentId: description: The student ID of the recipient type: string example: U0129382 type: object additionalData: description: >- Additional data related to the badge. This object can include arbitrary properties, not limited to 'IHL'. Clients are encouraged to include any relevant information that provides further context or details about the badge. properties: IHL: description: The Institute of Higher Learning associated with the badge type: string example: INSTITUTE OF TECHNICAL EDUCATION type: object type: object type: object responses: '200': description: Successful badge creation content: application/json: schema: properties: status: description: The status of the response type: string example: success batch_name: description: The batch name that was created (auto-generated or specified) type: string example: TEST-001 message: description: Number of badges created in this batch type: string example: A total of 2 badge(s) has been created badges: description: Array of created badge assertions type: array items: properties: recipient: description: Information about the recipient properties: name: description: The name of the recipient type: string example: John Doe email: description: The email of the recipient type: string example: johndoe@gmail.com studentId: description: The student ID of the recipient type: string example: U0129382 type: object assertion: description: Information about the assertion properties: uuid: description: UUID of the badge type: string example: 1238a551-6032-46a7-b882-3f05864b4cbe narrative: description: Narrative of the badge type: string example: Recipient is awarded for exceptional results issued_at: description: Issue date and time of the badge type: string example: '2021-02-01T12:00:00Z' expires_at: description: Expiry date and time of the badge type: string example: '2021-02-01T12:00:00Z' type: object evidences: description: List of evidences for the badge type: array items: properties: url: description: URL of the evidence type: string example: 'https://accredify.io/evidence/123' narrative: description: Narrative for the evidence type: string example: Evidence supporting the badge award type: object type: object type: object '401': $ref: '#/components/responses/UnauthenticatedRequest' '404': $ref: '#/components/responses/NotFoundRequest' '422': $ref: '#/components/responses/UnprocessableEntityRequest' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalErrorRequest' security: - bearerAuth: [] /v1/openbadges/new-course: post: tags: - OpenBadges summary: Allow an issuer to create an open badges course operationId: createOpenBadgesCourse requestBody: description: Information required to create a course required: true content: application/json: schema: required: - course_code - course_title - course_description - badge_settings properties: course_code: description: Unique identifier for the course type: string course_title: description: Title of the course type: string course_description: description: Description of the course type: string course_url: description: URL of the course type: string sharing: properties: share_enabled: description: Is sharing enabled type: boolean share_link: description: Share link (defaults to Accredify's share link if none provided) type: string type: object badge_settings: required: - badge_image properties: tags: type: array items: description: Tags for the course type: string criteria_narrative: description: Criteria narrative for the badge type: string badge_image: description: Badge image file type: string format: binary type: object type: object responses: '200': description: Success request content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 200 id: description: Created course id type: integer example: 1 course_code: description: Created course code type: string example: TEST-001 course_title: description: Created course title type: string example: Test Course type: object '401': $ref: '#/components/responses/UnauthenticatedRequest' '404': $ref: '#/components/responses/NotFoundRequest' '422': $ref: '#/components/responses/UnprocessableEntityRequest' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalErrorRequest' security: - bearerAuth: [] '/v1/openbadges/{assertion}': delete: tags: - OpenBadges summary: Allow an issuer to revoke an open badge operationId: revokeOpenBadge parameters: - name: assertion in: path description: The UUID of the assertion to be revoked required: true schema: type: string requestBody: description: Payload required to revoke a badge required: true content: application/json: schema: required: - revocation_reason properties: revocation_reason: description: Reason for badge revocation type: string example: Duplicated badge type: object responses: '204': description: Successful revocation of the badge '401': $ref: '#/components/responses/UnauthenticatedRequest' '404': $ref: '#/components/responses/NotFoundRequest' '422': $ref: '#/components/responses/UnprocessableEntityRequest' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalErrorRequest' security: - bearerAuth: [] patch: tags: - OpenBadges summary: Allow an issuer to update an open badge operationId: updateOpenBadge parameters: - name: assertion in: path description: The UUID of the assertion to be updated required: true schema: type: string requestBody: description: Information required to update a badge required: true content: application/json: schema: properties: assertion: description: Information about the assertion properties: issued_at: description: The date and time of when the badge was issued type: string example: '2021-02-01T12:00:00Z' expires_at: description: The date and time of when the badge will expire type: string example: '2021-02-01T12:00:00Z' narrative: description: The narrative for the award type: string example: Recipient is awarded for exceptional results type: object evidence: description: Information about the evidence properties: url: description: The url hosted page of the evidence type: string example: 'https://accredify.io' narrative: description: The narrative for the evidence type: string example: Recipient is awarded A+ type: object recipient: description: Information about the recipient properties: name: description: The name of the recipient type: string example: John Doe email: description: The email of the recipient type: string example: johndoe@gmail.com studentId: description: The student ID of the recipient type: string example: U0129382 type: object type: object responses: '200': description: Successful update of the badge content: application/json: schema: properties: badge: description: The updated badge assertion properties: recipient: description: Information about the recipient properties: name: description: The name of the recipient type: string example: John Doe email: description: The email of the recipient type: string example: johndoe@gmail.com studentId: description: The student ID of the recipient type: string example: U0129382 type: object assertion: description: Information about the assertion properties: uuid: description: UUID of the badge type: string example: 1238a551-6032-46a7-b882-3f05864b4cbe narrative: description: Narrative of the badge type: string example: Recipient is awarded for exceptional results issued_at: description: Issue date and time of the badge type: string example: '2021-02-01T12:00:00Z' expires_at: description: Expiry date and time of the badge type: string example: '2021-02-01T12:00:00Z' type: object evidences: description: List of evidences for the badge type: array items: properties: url: description: URL of the evidence type: string example: 'https://accredify.io/evidence/123' narrative: description: Narrative for the evidence type: string example: Evidence supporting the badge award type: object type: object status: description: Status of the response type: string example: success type: object '401': $ref: '#/components/responses/UnauthenticatedRequest' '404': $ref: '#/components/responses/NotFoundRequest' '422': $ref: '#/components/responses/UnprocessableEntityRequest' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalErrorRequest' security: - bearerAuth: [] /v1/uploadBatch: post: tags: - Issue summary: Upload a batch to the dashboard description: >- Uploads a batch consisting of unsigned JSON files. Once the batch has been generated the users can log into the dashboard to complete the issuance process operationId: uploadBatch requestBody: description: Information require to create a batch required: true content: application/json: schema: required: - instance - batchNo - courseCode - batchSize - totalMsgs - msgSeq - numOfDocs - timestamp - file properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 batchSize: description: The total number of documents that will be in this batch type: integer format: int32 example: '1' totalMsgs: description: The total number of requests that will be sent as part of this batch type: integer format: int32 example: '1' msgSeq: description: The sequence number of this request type: integer format: int32 example: '1' numOfDocs: description: The number of documents that are in this request type: integer format: int32 example: '1' timestamp: description: Timestamp of the request type: string format: date-time example: '2019-09-11T17:21:45+08:00' file: description: The base64 encoded version of the zip file containing the JSON files type: string example: UEsDBBQACAgIAON7XVEAAAAAAAAAAAAAAAAxAAAATlVTLUEwMDAw......... type: object responses: '200': description: 'Success, all requests received, batch is now creating' content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 batchSize: description: The total number of documents that will be in this batch type: integer format: int32 example: '1' totalMsgs: description: The total number of requests that will be sent as part of this batch type: integer format: int32 example: '1' msgSeq: description: The sequence number of this request type: integer format: int32 example: '1' numOfDocs: description: The number of documents that are in this request type: integer format: int32 example: '1' status: description: The status of the batch type: string example: Creating type: object '201': description: 'Success, request acknowledged' content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 batchSize: description: The total number of documents that will be in this batch type: integer format: int32 example: '1' totalMsgs: description: The total number of requests that will be sent as part of this batch type: integer format: int32 example: '1' msgSeq: description: The sequence number of this request type: integer format: int32 example: '1' numOfDocs: description: The number of documents that are in this request type: integer format: int32 example: '1' status: description: The status of the batch type: string example: ACK type: object '400': description: Error content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 batchSize: description: The total number of documents that will be in this batch type: integer format: int32 example: '1' totalMsgs: description: The total number of requests that will be sent as part of this batch type: integer format: int32 example: '1' msgSeq: description: The sequence number of this request type: integer format: int32 example: '1' numOfDocs: description: The number of documents that are in this request type: integer format: int32 example: '1' status: description: The status of the batch type: string example: ERROR code: description: The error code of the error encounted type: string example: U403 message: type: string example: BatchNo has already been issued before type: object /v1/uploadBatchExcel: post: tags: - Issue summary: Upload a batch via Excel to the dashboard description: >- Uploads a batch consisting of an Excel file. Once the batch has been generated the users can log into the dashboard to complete the issuance process operationId: uploadBatchExcel requestBody: description: Information require to create a batch required: true content: application/json: schema: required: - instance - batchNo - courseCode - timestamp - file properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST timestamp: description: Timestamp of the request type: string format: date-time example: '2019-09-11T17:21:45+08:00' batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 file: description: The base64 encoded version of the Excel file type: string example: UEsDBBQACAgIAON7XVEAAAAAAAAAAAAAAAAxAAAATlVTLUEwMDAw......... type: object responses: '200': description: 'Success, all requests received, batch is now creating' content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 status: description: The status of the batch type: string example: Creating type: object '201': description: 'Success, request acknowledged' content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 status: description: The status of the batch type: string example: ACK type: object '400': description: Error content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 status: description: The status of the batch type: string example: ERROR code: description: The error code of the error encounted type: string example: U403 message: type: string example: BatchNo has already been issued before type: object /v1/uploadIssueBatch: post: tags: - Issue summary: Uploads and issue a batch to the dashboard description: >- Uploads a batch consisting of unsigned JSON files. This process is straight through, so the certificates will be immediately appended on the blockchain operationId: uploadIssueBatch parameters: - name: json in: query description: Whether the response should contain the json of the certificate required: false schema: type: boolean example: 'true' requestBody: description: Information require to create a batch required: true content: application/json: schema: required: - instance - batchNo - courseCode - batchSize - totalMsgs - msgSeq - numOfDocs - timestamp - file properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 batchSize: description: The total number of documents that will be in this batch type: integer format: int32 example: '1' totalMsgs: description: The total number of requests that will be sent as part of this batch type: integer format: int32 example: '1' msgSeq: description: The sequence number of this request type: integer format: int32 example: '1' numOfDocs: description: The number of documents that are in this request type: integer format: int32 example: '1' timestamp: description: Timestamp of the request type: string format: date-time example: '2019-09-11T17:21:45+08:00' file: description: The base64 encoded version of the zip file containing the JSON files type: string example: UEsDBBQACAgIAON7XVEAAAAAAAAAAAAAAAAxAAAATlVTLUEwMDAw......... type: object responses: '200': description: Success content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 batchSize: description: The total number of documents that will be in this batch type: integer format: int32 example: '1' totalMsgs: description: The total number of requests that will be sent as part of this batch type: integer format: int32 example: '1' msgSeq: description: The sequence number of this request type: integer format: int32 example: '1' numOfDocs: description: The number of documents that are in this request type: integer format: int32 example: '1' status: type: string example: Issued merkleRoot: type: string example: '0x091f976c8492ef73da7b43d9a0535e6ebd392f2a8372fadaaac5c415504a5cd6' certificates: properties: transactionHash: type: string example: '0x5c82b6ac1b4a85542ad46fde57688986852b46a6d4203631a0688e804b1f0858' type: array items: properties: CertId: description: The certificate's ID in the batch type: string example: Test001 certHash: description: The certificate's unique hash type: string example: '0x597d55f4bda76fe1b56840c81537ef26425ecd7f278a25a4f7f33259691e2b57' qrCode: description: The QR code leading to the certificate (Share must be enabled) type: string example: 'data:image/png;base64,' shareLink: description: The link leading to the certificate (Share must be enabled) type: string example: 'https://www.accredify.io/health?id=89933af8-c139-4870-a4ff-a064cae32d43' json: description: The JSON of the certificate (json parameter must be true) type: string type: object type: object '400': description: Error content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST batchNo: description: The name of the batch that is to be created type: string example: Batch 001 courseCode: description: The name of the course to which this batch will be created under type: string example: Course001 batchSize: description: The total number of documents that will be in this batch type: integer format: int32 example: '1' totalMsgs: description: The total number of requests that will be sent as part of this batch type: integer format: int32 example: '1' msgSeq: description: The sequence number of this request type: integer format: int32 example: '1' numOfDocs: description: The number of documents that are in this request type: integer format: int32 example: '1' status: type: string example: ERROR code: type: string example: U403 message: type: string example: BatchNo has already been issued before type: object /v1/revokeCerts: post: tags: - Revoke summary: Revoked certificates by their hashes description: >- Revokes certificates that were issued by their certificate hash, also supports the removal of the certificate from MySF operationId: revokeCerts requestBody: description: Information require to create a batch required: true content: application/json: schema: required: - instance - targetHashes - delete - timestamp properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST targetHashes: description: The hashes of the certificates to revoke type: array items: type: string example: '0x95c939b9a64a16ff70590cbed058d141971501d93af8baa4cdd7424ac87fc95c' delete: description: Whether to remove the certificate from MySF type: string example: 'false' timestamp: description: Timestamp of the request type: string format: date-time example: '2019-09-11T17:21:45+08:00' type: object responses: '200': description: Success content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST timestamp: description: Timestamp of the request type: string format: date-time example: '2019-09-11T17:21:45+08:00' certificates: description: The hashes of the certificates to revoke type: array items: type: string example: '0x95c939b9a64a16ff70590cbed058d141971501d93af8baa4cdd7424ac87fc95c' transactionHash: type: string example: '0x5c82b6ac1b4a85542ad46fde57688986852b46a6d4203631a0688e804b1f0858' type: object '400': description: Error content: application/json: schema: properties: instance: description: Whether this is meant for the testnet (TST) or mainnet (PRD) type: string example: TST timestamp: description: Timestamp of the request type: string format: date-time example: '2019-09-11T17:21:45+08:00' status: type: string example: ERROR code: type: string example: R402 message: type: string example: These hashes were not found type: object /v1/sendEmails: post: tags: - Issue summary: Triggers the sending of emails for the certificates provided description: Triggers the sending of emails based on the certificate hashes provided operationId: sendEmails requestBody: description: Information on the certificates that should be sent by email required: true content: application/json: schema: properties: certificates: type: array items: required: - certHash - encrypt properties: certHash: description: The certificate's hash type: string example: '0x36b4232312e454252904ca36b1bf208909481ee0d5e593670af08086411b73c5' encrypt: description: Whether the files should be encrypted upon distribution type: boolean example: 'true' type: object type: object responses: '200': description: 'Success, all the emails will be sent for the specified certs' content: application/json: schema: properties: message: description: The sucess message type: string example: Successfully sent emails code: description: The status of the call type: string example: '200' status: description: The status of the batch type: string example: '200' type: object '400': description: Error content: application/json: schema: properties: status: description: The reason why the call was unsuccessful type: string example: Certificate(s) could not be sent as they are invalid errors: properties: certHash: type: array items: description: Why the certificate could not be sent type: string example: '''0x36b4232312e454252904ca36b1bf208909481ee0d5e593670af08086411b73c5'' does not exist' type: object type: object security: - bearerAuth: [] /ext/getCertificates: post: tags: - External App Integrations summary: Retrieves an array of Certificates description: Retrieves a user's Certificates based on their identification number operationId: getCertificates requestBody: required: true content: application/json: schema: required: - identificationNumber - parameters properties: identificationNumber: description: >- Identification number of the user whose records are to be retrieved, can be NRIC, FIN, Passport, Student ID type: string default: S0000000A example: S0000000A parameters: description: The information related to the certificate that should be returned type: string example: 'certName,recipientNric,recipientPassport,recipientName,recipientDob,recipientEmail,hash,qr,shareLink' type: object responses: '200': description: Success content: application/json: schema: properties: data: type: array items: properties: id: description: The Certificate's ID type: string example: Sample001 certName: description: The name of the Certificate type: string example: Computer Science 101 recipientNric: description: The user's NRIC number type: string example: S0000000A recipientPassport: description: The user's passport number type: string example: E0000000A recipientStudentId: description: The user's student id type: string example: '123123' recipientName: description: The user's name type: string example: John Doe recipientDob: description: The user's date of birth in yyyy-mm-dd type: string example: '2021-03-10' recipientEmail: description: The user's email address type: string example: test@email.com hash: description: The certificate's unique hash type: string example: '0x68e6e789de59847ba0e4622460ff26a694ea1443064b7770367d42aba1b93d95' qr: description: The certificate's QR code in Base64 type: string example: 'data:image/png;base64' shareLink: description: The sharelink that leads to the Certificate type: string example: 'https://staging.accredify.io/verify?id=7198f2ad-c6e3-4d2a-bfa7-c3284e154e7c' type: object type: object '400': description: Error content: application/json: schema: properties: error: type: string example: The identificationNumber field is required type: object components: responses: SuccessRequest: description: Success request NoContentRequest: description: No content request RedirectRequest: description: Redirect request BadRequest: description: Bad request content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 400 message: description: The message returned from the request type: string example: 'We couldn''t find you, please try again.' type: object UnauthenticatedRequest: description: Unauthenticated request content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 401 message: description: The message returned from the request type: string example: Unauthenticated. You might have provided an invalid access token or your token has already expired. type: object UnauthorisedRequest: description: Unauthorised request content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 403 message: description: The message returned from the request type: string example: Unauthorised. You might have provided an invalid access token or your token has already expired. type: object NotFoundRequest: description: The specified resource was not found content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 404 message: description: The message returned from the request type: string example: Please ensure you are making the request to the correct endpoint. type: object UnprocessableEntityRequest: description: Unprocessable entity content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 422 error: description: A list of the errors in the request properties: string: type: array items: type: string example: error message type: object type: object TooManyRequests: description: Too many requests content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 429 message: description: The message returned from the request type: string example: You're submitting requests too quickly. Please retry again after 60 seconds. type: object InternalErrorRequest: description: 'Internal error, please contact us at support@accredify with the code' content: application/json: schema: properties: status: description: The HTTP status code type: integer example: 500 code: description: The error code for reporting and internal reference type: string example: E400 message: description: The message returned from the request type: string example: >- There was an unexpected error while performing your last action. Please contact us at support@accredify.io with the error code for internal reference type: object securitySchemes: bearerAuth: type: http description: 'JWT Authorization header using the Bearer scheme. Example: ''Authorization: Bearer {token}''' bearerFormat: JWT scheme: bearer tags: - name: OAuth 2.0 description: OAuth 2.0 - name: OpenBadges description: OpenBadges - name: Issue description: Issue - name: Revoke description: Revoke - name: External App Integrations description: External App Integrations