POST ./certificates

  • The POST endpoint is used to create a new certificate.

POST parameters

NameValue TypeValidationDetails
cerType(integer)RequiredThe type of the certificate. This field is required.
cerDate(string)RequiredThe date of the certificate in RFC format. This field is required.
cerNumber(integer)RequiredThe number of the certificate. This field is required.
cerUaID(integer)RequiredThe ID of the user associated with the certificate. This field is required.
cerReason(string)RequiredThe reason for the certificate. This field is required.
cerDirectorID(integer)RequiredThe ID of the director. This field is required.
cerSecretaryID(integer)RequiredThe ID of the secretary. This field is required.
cerShowLogo(boolean)OptionalWhether to show the logo or not. This field is optional.
cerDiplomaBackground(string)OptionalThe background of the diploma. This field is optional.
  • The method returns an array of certificates, each represented as an associative array with fields like cerID, cerType, cerUaID, cerDate, cerNumber, cerReason, and cerPerson. If the {id} parameter is provided, additional fields cerData and cerOptions are also included in the returned certificate data.

Output example

  • The response from this endpoint will be an integer representing the created certificate ID. If there are any validation errors, the endpoint will return a 400 status code along with an array of error messages.
{
"cerID": 42
}