Skip to content

Contact - Create

Overview

This documentation describes the API endpoint for creating a new Contact record using the POST method. The endpoint allows clients to submit a new record 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 record.

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.

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.


Realm Values:

ApplicationsDevelopment RealmProduction Realm
ABS Clearing Houseabs-devabs
Biosafety Clearing Housebch-devbch
Clearing House Mechanismchm-devchm

Query Parameters

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

FieldTypeDescription
schemaStringDefines the schema or format of the record being posted. This field specifies the type of record 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 record 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 record.

URL Parameters

The following URL parameter is required:

FieldTypeDescription
uidStringA unique identifier for the record. 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 record within the system, ensuring that each record can be distinctly referenced and managed. It plays a key role in operations such as fetching, updating, or deleting the record, as well as in maintaining the integrity of record 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 record 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

The table below outlines the structure of the request body, including the fields, their types, and whether they are mandatory. Example values are provided for clarity.

TitleFieldMandatoryTypeExample
headerHeader { "identifier": "068C83BA-995F-08C3-50CE-AD43545B3EB5", "schema": "contact", "languages": [ "en" ] }
Prefixprefixlstring{ en:"Mr" }
First NamefirstNameTruestringJohn
Middle NamemiddleNamestringSmith
Last NamelastNameTruestringDoe
GendergenderTerm
Job Titledesignationlstring{ en:"Software" }
OrganizationorganizationTruelstring{ "en": "Test Organization" }
AcronymorganizationAcronymlstring{ "en": "CSBD" }
Department / Division / Unitdepartmentlstring{ "en": "Division" }
Type of OrganizationorganizationTypeTerm{ "identifier": "86D464C3-B5BB-4B02-85E4-1AAD8D64CD27" }
Street Addressaddresslstring{ "en": "560 Franklin" }
Citycitylstring{ "en": "Cambridge" }
State or Provincestatelstring{ "en": "Ontario" }
Postal Code or ZippostalCodelstring{ "en": "N1R 7Z1" }
Country of ContactcountryTrueTerm{ "identifier": "ca" }
Phone Number(s)phonesstring[][ "54825578896" ]
Fax Number(s)faxesstring[][ "123456" ]
Email(s)emailsTruestring[][ "pramodjsam@gmail.com" ]
Website Address(es)websitesLink[][ { "url": "http://www.google.com" } ]
Address TypeaddressTypestringorganization
Relevant InformationrelevantInformationlstring
Relevant DocumentsrelevantDocumentsLink[]
Contact TypetypeTruestringperson
CountrygovernmentTerm{ "identifier": "af" }
OrganizationcontactOrganizationTrueReference{ "identifier": "SIMP-22D52282-2FB2-AD2A-2965-476DFF6A7F37@1" }

Playground

Swagger playground is loading, please wait...