Organizations
Create certification in organization
POST
/
v1
/
organizations
/
{organization_id}
/
certifications
Create certification in organization
curl --request POST \
--url https://api.natecosmic.com/v1/organizations/{organization_id}/certifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"external_source": "<string>",
"certification_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_on": "2023-12-25",
"expires_on": "2023-12-25",
"issuer_name": "<string>",
"serial_number": "<string>"
}
'import requests
url = "https://api.natecosmic.com/v1/organizations/{organization_id}/certifications"
payload = {
"organization_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"external_source": "<string>",
"certification_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_on": "2023-12-25",
"expires_on": "2023-12-25",
"issuer_name": "<string>",
"serial_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organization_member_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_id: '<string>',
external_source: '<string>',
certification_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
issued_on: '2023-12-25',
expires_on: '2023-12-25',
issuer_name: '<string>',
serial_number: '<string>'
})
};
fetch('https://api.natecosmic.com/v1/organizations/{organization_id}/certifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.natecosmic.com/v1/organizations/{organization_id}/certifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organization_member_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_id' => '<string>',
'external_source' => '<string>',
'certification_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'issued_on' => '2023-12-25',
'expires_on' => '2023-12-25',
'issuer_name' => '<string>',
'serial_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.natecosmic.com/v1/organizations/{organization_id}/certifications"
payload := strings.NewReader("{\n \"organization_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"external_source\": \"<string>\",\n \"certification_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"issued_on\": \"2023-12-25\",\n \"expires_on\": \"2023-12-25\",\n \"issuer_name\": \"<string>\",\n \"serial_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.natecosmic.com/v1/organizations/{organization_id}/certifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"organization_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"external_source\": \"<string>\",\n \"certification_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"issued_on\": \"2023-12-25\",\n \"expires_on\": \"2023-12-25\",\n \"issuer_name\": \"<string>\",\n \"serial_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.natecosmic.com/v1/organizations/{organization_id}/certifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"organization_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"external_source\": \"<string>\",\n \"certification_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"issued_on\": \"2023-12-25\",\n \"expires_on\": \"2023-12-25\",\n \"issuer_name\": \"<string>\",\n \"serial_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"external_source": "<string>",
"certification_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_on": "2023-12-25",
"expires_on": "2023-12-25",
"issuer_name": "<string>",
"serial_number": "<string>",
"verification_method": "<string>",
"last_verified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"certification_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>"
}
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}Authorizations
JWT access token. Send Authorization: Bearer <token>.
Headers
Optional. Opaque per-request value; when sent, the API stores the first successful create for that (caller, key) and replays the same 201 response on retries. The exact raw JSON body is hashed; a different body with the same key yields 409.
Path Parameters
Organization identifier
Body
application/json
Create a certification. For org routes, organization_member_id is required when creating for a specific member.
Response
Created
Show child attributes
Show child attributes
⌘I
Create certification in organization
curl --request POST \
--url https://api.natecosmic.com/v1/organizations/{organization_id}/certifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"external_source": "<string>",
"certification_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_on": "2023-12-25",
"expires_on": "2023-12-25",
"issuer_name": "<string>",
"serial_number": "<string>"
}
'import requests
url = "https://api.natecosmic.com/v1/organizations/{organization_id}/certifications"
payload = {
"organization_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"external_source": "<string>",
"certification_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_on": "2023-12-25",
"expires_on": "2023-12-25",
"issuer_name": "<string>",
"serial_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
organization_member_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_id: '<string>',
external_source: '<string>',
certification_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
issued_on: '2023-12-25',
expires_on: '2023-12-25',
issuer_name: '<string>',
serial_number: '<string>'
})
};
fetch('https://api.natecosmic.com/v1/organizations/{organization_id}/certifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.natecosmic.com/v1/organizations/{organization_id}/certifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organization_member_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'external_id' => '<string>',
'external_source' => '<string>',
'certification_type_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'issued_on' => '2023-12-25',
'expires_on' => '2023-12-25',
'issuer_name' => '<string>',
'serial_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.natecosmic.com/v1/organizations/{organization_id}/certifications"
payload := strings.NewReader("{\n \"organization_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"external_source\": \"<string>\",\n \"certification_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"issued_on\": \"2023-12-25\",\n \"expires_on\": \"2023-12-25\",\n \"issuer_name\": \"<string>\",\n \"serial_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.natecosmic.com/v1/organizations/{organization_id}/certifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"organization_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"external_source\": \"<string>\",\n \"certification_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"issued_on\": \"2023-12-25\",\n \"expires_on\": \"2023-12-25\",\n \"issuer_name\": \"<string>\",\n \"serial_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.natecosmic.com/v1/organizations/{organization_id}/certifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"organization_member_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"external_source\": \"<string>\",\n \"certification_type_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"issued_on\": \"2023-12-25\",\n \"expires_on\": \"2023-12-25\",\n \"issuer_name\": \"<string>\",\n \"serial_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"external_source": "<string>",
"certification_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_on": "2023-12-25",
"expires_on": "2023-12-25",
"issuer_name": "<string>",
"serial_number": "<string>",
"verification_method": "<string>",
"last_verified_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"certification_type": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>"
}
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}
