Skip to content

CPC - Create

Overview

This documentation describes the API endpoint for creating a new CPC (Checkpoint Communiqué) document using the POST method. The endpoint allows clients to submit a new document to the system, enabling the creation and storage of compliance certificates or other related documentation.

Endpoint

POST /api/v2013/documents

This is the endpoint to which the POST request should be made to create a new document.

The request must include the following headers:

FieldTypeDescription
Content-TypeStringSpecifies the media type of the request body. This header indicates the format of the data being sent to the server. The allowed value is application/json, which means the request body is formatted as JSON. This helps the server understand how to parse and process the incoming data.
AuthorizationStringProvides the token used to authenticate the request. This header is essential for identifying and verifying the client making the request. The token should be included in the header to gain access to protected resources or services. Ensure that the token is kept secure and is valid for the requested operation.
RealmStringDefines the specific context or environment in which the Clearing-House request is being made. The allowed values are abs, chm, and bch, each representing different operational contexts. This helps the server route the request appropriately based on the specified realm.
AcceptStringSpecifies the format in which the client expects the server to return the response data. The allowed value is application/json, indicating that the client prefers the response in JSON format. This informs the server of the desired response format, ensuring that the client receives data in a readable and expected format.

Realm Values for Development:

  • abs-dev: Represents the development environment for ABS (Access and Benefit-sharing Clearing-House). Use this value when testing or developing features related to ABS in a non-production setting.
  • bch-dev: Indicates the development environment for BCH (Biosafety Clearing-House). This value is used for testing or development purposes related to BCH functionalities.
  • chm-dev: Specifies the development environment for CHM (Central Clearing-House Mechanism). This realm is used when working on features or testing in the CHM context within a development environment.

Headers required to authenticate and define the context and format of the request and response. The Authorization header must contain a valid token, while the Content-Type and Accept headers specify the format of the document and response, respectively. Here are the steps to get the Authorization token.

Query Parameters

The following query parameters can be used to refine the request:

FieldTypeDescription
schemaStringDefines the schema or format of the document being posted. This field specifies the type of document and the structure it adheres to. The schema value helps the system understand how to interpret and validate the incoming data. It ensures that the document conforms to a predefined format or standard, facilitating consistency and compatibility across different parts of the system. The schema value typically corresponds to a specific schema definition or type that dictates the required fields, data types, and constraints for the document.

URL Parameters

The following URL parameter is required:

FieldTypeDescription
uidStringA unique identifier for the document. This value is case-sensitive and must conform to the regular expression /^[A-Za-z0-9\-_]{11,128}$/. This pattern allows for a combination of uppercase and lowercase letters, numbers, hyphens, and underscores, with a length ranging from 11 to 128 characters. The uid is crucial for uniquely identifying and retrieving the document within the system, ensuring that each document can be distinctly referenced and managed. It plays a key role in operations such as fetching, updating, or deleting the document, as well as in maintaining the integrity of document management processes.

Validation Errors

The table below provides descriptions for each error type that may appear in the "errors" property. These errors are intended to help identify missing or incorrect fields and values within the document parameter, enabling precise adjustments to meet validation requirements.

Error TypeDescription
Error.MandatoryIndicates a required field is missing.
Error.MandatoryAnyOfIndicates at least one field from a set of mandatory fields is missing.
Error.InvalidValueIndicates the provided value is not valid according to the specified
schema.
Error.InvalidPropertyIndicates an invalid property or field name.
Error.UnspecifiedLocaleIndicates a locale or language code is missing or invalid.
Error.UnexpectedTermIndicates an unexpected term or parameter.
Error.InvalidTypeIndicates the provided data type is not valid.

Request Body

TitleFieldMandatoryTypeExample
headerEheader{ "identifier": "63B9CA56-9D43-E877-2A96-2C95986522D5", "schema": "absCheckpointCommunique", "languages": ["en"] }
Title of this checkpoint communiquetitleTruelstring{ "en": "Test Title" }
Country issuing this checkpoint communiquegovernmentTrueEterm{ "identifier": "af" }
Links to internationally recognized certificate(s) of compliance (IRCC) that relate to this communiqueabsIRCCsTrueEreference[][ { "identifier": "CB51626B-CF45-2AA0-3A24-459669DDCC34@1" } ]
Checkpoint/s that collected or received the informationabsCheckpointsTrueEreference[][ { "identifier": "3E387C20-E70C-997B-EABB-BC4C9A1E142F@1" } ]
The internationally recognized certificate of compliance (IRCC) is not availableabsIRCCsNotAvailableboolTrue
Source of the genetic resourcesourceCountriesEterm[][ { "identifier": "af" } ]
Person or entity who granted prior informed consent (PIC)entityWhoGrantedPICEreference{ "identifier": "DECLARE-ORGANISATION_19584_20241007134350919@1" }
Subject-matter or genetic resources relevant to the information collected or receivedsubjectMatterlstring{ "en": "<div><!--block-->Test Info</div>" }
Specimen dataspecimensElink[][ { "url": "https://www.google.com", "name": "Google", "language": "en" } ]
TaxonomytaxonomiesElink[][ { "url": "https://www.google.com", "name": "Google", "language": "en" } ]
Geographic coordinatesgisFilesElink[][ { "url": "/api/v2013/documents/63B9CA56-9D43-E877-2A96-2C95986522D5/attachments/615856/test.json", "name": "test.json", "tag": "Test Tag", "language": "en" } ]
gisMapCenterEmapLocation
Person or entity making information available to the checkpoint on the utilization of the genetic resourcepersonsAtCheckpointEreference[][ { "identifier": "DECLARE-ORGANISATION_19584_20241007134350919@1" } ]
Reference or evidence of prior informed consent (PIC)evidenceOfPIClstring{ "en": "<div><!--block-->Test Info</div>" }
Reference or evidence of establishment of mutually agreed terms (MAT)evidenceOfMATlstring{ "en": "<div><!--block-->Test Info</div>" }
Person or entity to whom prior informed consent (PIC) was grantedentityToWhomPICGrantedEreference{ "identifier": "DECLARE-ORGANISATION_19584_20241007134350919@1" }
Short description of the information collected or received by the checkpoint relevant to the utilization of genetic resources, including the type of usedescriptionTruelstring{ "en": "<div><!--block-->Test Info</div>" }
Date of access to the genetic resourcesdateOfAccessDateTime2024-10-24
Date on which the information was collected or received at the checkpointdateCollectedDateTime2024-10-26
FROMdateCollectedFromDateTime2024-10-01
TOdateCollectedToDateTime2024-10-23
Additional InformationrelevantInformationlstring{ "en": "<div><!--block-->Test Info</div>" }
Other relevant website addresses and/or attached documentsrelevantDocumentsElink[][ { "url": "https://www.google.com", "name": "Google", "language": "en" } ]
Keywords to describe the subject-matter or genetic resource(s) covered by the permit or its equivalentkeywordsEterm[][ { "identifier": "term-id-1" }, { "identifier": "term-id-2" } ]
Other keywords keywordOtherlstring{ "en": "Test Keywords" }

Playground

Swagger playground is loading, please wait...