Create Certificate

The MyIPR app's Certificate API provides a secure and efficient way to register and certify assets directly within the app.

End Point

{{base_url}}/create

API Description

The 'Create Certificate' API within the MyIPR app is designed to officially certify an asset, with all procedural actions seamlessly executed in the background. This API offers versatile options for certificate creation, catering to distinct scenarios:

  1. Create Certificate for Admin:

Initiates the certification process for an administrator.

  1. Create Version of an Existing Certificate/File:

Facilitates the creation of a new version for an existing certificate or file.

  1. Create a Certificate by a New/Existing Member of the Organization:

Allows the generation of a certificate by a member, whether new or existing, within the organization. Please refer to the provided examples for detailed usage scenarios.

Validations:

  • Duplicate values for the 'name' field are strictly prohibited.

  • Duplicate hash values are not allowed.

  • The file source must always be 'client-hash.'

  • The category ID should align with the one received from the '/categories' API.

  • The 'size' parameter is expected to be in kilobytes (KB).

This API ensures the integrity and accuracy of the certification process, adhering to stringent validations for a secure and reliable certificate creation experience.

Method

POST

Attributes

AttributeTypeDescription

name

String

The name of the new file.

category_id

String

The identifier for the category of the file.

file_source

String

The source of the file (e.g., "client-hash").

hash

String

The hash value of the file.

size

String

The size of the file.

status

Integer

Represents the status of the API response.

message

String

Provides a message indicating the success or failure of the API request.

result

Object

Contains information about the submitted file.

result.message

String

A message indicating the success of the file submission.

result.fileId

String

Unique identifier for the submitted file.

result.versionId

String

Unique identifier for the version of the file.

result.currentStatus

String

The current status of the file (e.g., "hash_generated").

result.currentStatusType

String

The type of the current status (e.g., "In Progress").

result.user

Object

Contains information about the user associated with the file.

result.user.id

String

Unique identifier for the user.

result.user.firstName

String

The first name of the user.

result.user.lastName

String

The last name of the user.

Request

curl --location -g '{{base_url}}/create' \
--header 'Authorization: SECRET {{secret_key}}' \
--data '{
    "name": "This is a new file 13091",
    "category_id": "10",
    "file_source": "client-hash",
    "hash": "c5455acc691c249007aa739f2e4ff7651e549c4e9b471c6b0b327d2d61db1617",
    "size": "1079"
}'

Response

{
  "status": 201,
  "message": "success",
  "result": {
    "message": "File submitted for hashing successfully",
    "fileId": "33f42dc0-c4d7-401d-b3ff-c0152d72a7e8",
    "versionId": "d7bf2c72-9001-4280-92f2-545ff10fe080",
    "currentStatus": "hash_generated",
    "currentStatusType": "In Progress",
    "user": {
      "id": "2ebe5490-ce56-42c2-afbe-20b5de491a37",
      "firstName": "business",
      "lastName": "varsha"
    }
  }
}

Last updated