curl --request POST \
--url https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "<string>",
"commentDeadline": 123,
"notifySettings": []
}
]
'import requests
url = "https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types"
payload = [
{
"name": "<string>",
"commentDeadline": 123,
"notifySettings": []
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([{name: '<string>', commentDeadline: 123, notifySettings: []}])
};
fetch('https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types', 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://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types",
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([
[
'name' => '<string>',
'commentDeadline' => 123,
'notifySettings' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"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://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types"
payload := strings.NewReader("[\n {\n \"name\": \"<string>\",\n \"commentDeadline\": 123,\n \"notifySettings\": []\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"<string>\",\n \"commentDeadline\": 123,\n \"notifySettings\": []\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"name\": \"<string>\",\n \"commentDeadline\": 123,\n \"notifySettings\": []\n }\n]"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": "<string>",
"data": [
{
"id": 123,
"name": "<string>",
"state": "active",
"commentDeadline": 123,
"position": 123,
"notifySettings": [
"requested"
],
"properties": [
"<string>"
]
}
]
}{
"status": "success",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}Create sample types
Creates one or more sample types in a single transaction. The request body is always an array even for a single item. notifySettings is a list of sample-request statuses that notify the contact person; statuses not listed don’t notify. When the field is omitted, every status except Planned notifies by default.
curl --request POST \
--url https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "<string>",
"commentDeadline": 123,
"notifySettings": []
}
]
'import requests
url = "https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types"
payload = [
{
"name": "<string>",
"commentDeadline": 123,
"notifySettings": []
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([{name: '<string>', commentDeadline: 123, notifySettings: []}])
};
fetch('https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types', 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://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types",
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([
[
'name' => '<string>',
'commentDeadline' => 123,
'notifySettings' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"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://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types"
payload := strings.NewReader("[\n {\n \"name\": \"<string>\",\n \"commentDeadline\": 123,\n \"notifySettings\": []\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
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://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"<string>\",\n \"commentDeadline\": 123,\n \"notifySettings\": []\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/sample-types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"name\": \"<string>\",\n \"commentDeadline\": 123,\n \"notifySettings\": []\n }\n]"
response = http.request(request)
puts response.read_body{
"status": "success",
"code": "<string>",
"data": [
{
"id": 123,
"name": "<string>",
"state": "active",
"commentDeadline": 123,
"position": 123,
"notifySettings": [
"requested"
],
"properties": [
"<string>"
]
}
]
}{
"status": "success",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "success",
"code": "<string>",
"error": {
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}Headers
Body
Display name of the new sample type. Required, unique within the organization, and must not contain a dot.
Initial lifecycle state of the sample type. Defaults to active when omitted; the deleted state is not accepted on create.
active, inactive, deleted Number of days after the sample is received within which comments should be posted. Null means no deadline.
Sample-request statuses that trigger a supplier-contact notification. Null uses the default of every status except Planned; an empty array notifies for none; a non-empty array sets exactly those.
requested, sent, received, commented, cancelled, confirmed, planned Response
Created
The coarse outcome of the request, indicating whether it succeeded or failed.
success, error The specific machine-readable outcome code, such as ok on success or the most specific error code on failure. Always lowercase on the wire.
The response payload, either a single object for a by-id read or an array for a bulk operation. Omitted from the body when there is no value.
Show child attributes
Show child attributes