Skip to content

Contact - Update

Overview

This documentation describes the API endpoint for updating an existing Contact document using the PUT method. This endpoint allows clients to modify the details of a document that is already present in the system. The update operation can be used to change various attributes of the document based on the provided uid.

Endpoint

PUT /api/v2013/documents/:uid

This is the endpoint to which the PUT request should be made to update an existing document.

Headers

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

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
headerEheader { "identifier": "068C83BA-995F-08C3-50CE-AD43545B3EB5", "schema": "contact", "languages": [ "en" ] }
Prefixprefixlstring{ en:"Mr" }
First NamefirstNameTruestringJohn
Middle NamemiddleNamestringSmith
Last NamelastNameTruestringDoe
GendergenderEterm
Job Titledesignationlstring{ en:"Software" }
OrganizationorganizationTruelstring{ "en": "Test Organization" }
AcronymorganizationAcronymlstring{ "en": "CSBD" }
Department / Division / Unitdepartmentlstring{ "en": "Division" }
Type of OrganizationorganizationTypeEterm{ "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 ContactcountryTrueEterm{ "identifier": "ca" }
Phone Number(s)phonesstring[][ "54825578896" ]
Fax Number(s)faxesstring[][ "123456" ]
Email(s)emailsTruestring[][ "pramodjsam@gmail.com" ]
Website Address(es)websitesElink[][ { "url": "http://www.google.com" } ]
Address TypeaddressTypestringorganization
Relevant InformationrelevantInformationlstring
Relevant DocumentsrelevantDocumentsElink[]
Contact TypetypeTruestringperson
CountrygovernmentEterm{ "identifier": "af" }
OrganizationcontactOrganizationTrueEreference{ "identifier": "SIMP-22D52282-2FB2-AD2A-2965-476DFF6A7F37@1" }

Playground

Swagger playground is loading, please wait...