Certifications API v4
Attaching a lab certificate to a diamond and removing it.
Certifications API v4 attaches a laboratory certificate to a diamond on Cutwise and removes it. A vendor uses it after creating the diamond with Diamonds API v4.
Example
This request attaches a GIA certificate with a PDF file to the diamond with product ID 337:
POST /v4/certification HTTP/1.1
Host: api.cutwise.com
Authorization: Bearer {CUTWISE_ACCESS_TOKEN}
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name="file"; filename="file.pdf"
/path/to/file.pdf
--WebAppBoundary
Content-Disposition: form-data; name="product"
337
--WebAppBoundary
Content-Disposition: form-data; name="laboratory"
GIA
--WebAppBoundary
Content-Disposition: form-data; name="number"
33188
--WebAppBoundary--
The response is the created Certification object.
Certification object
Example of a Certification object:
{
"id": 330,
"laboratory": "GIA",
"number": "33188",
"url": "https://www.gia.edu/report-check?reportno=2136273512",
"file": "https://d1d7qk4j7uzdqw.cloudfront.net/StoneCertificates/333/2136273512.pdf"
}
| Field | Format | Description |
|---|---|---|
| id | int | Certification ID on Cutwise. |
| laboratory | string | Laboratory that issued the certificate. |
| number | string | Certificate number. |
| url | string | URL to check the certificate on the laboratory website. |
| file | string | URL of the uploaded certificate file. |
Supported laboratories:
- GIA
- AGS
- HRD
- IGI
- IIDGR
- GCAL
Authorization
Every request needs an OAuth 2.0 Bearer token in the Authorization header. See
Authorization.
Create a certification
- Method and path:
POST /v4/certification - Auth: Bearer token
- Request:
multipart/form-datawith the fields in the table below. See the request in Example. - Response: the created Certification object
| Field | Format | Description |
|---|---|---|
| product | int (required) | Product ID of the diamond to attach the certificate to. |
| laboratory | string (required) | Laboratory that issued the certificate. |
| number | string | Certificate number. |
| file | string | Certificate file as binary content. |
The new certification belongs to the user who owns the access token.
Delete a certification
- Method and path:
DELETE /v4/certification/{CERTIFICATION_ID} - Auth: Bearer token
- Request: the certification ID in the path
DELETE /v4/certification/{CERTIFICATION_ID} HTTP/1.1
Host: api.cutwise.com
Authorization: Bearer {CUTWISE_ACCESS_TOKEN}
Errors and limits
- The certificate file must be a PDF.
- The file must not be larger than 10 MB.
- HTTP 401 and 403 mean a missing or insufficient access token. See Authorization.
- The error body format is on the Error handling page.