Bulk-create sample requests for a style
curl --request POST \
--url http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests \
--header 'Content-Type: application/json' \
--data '
[
{
"sampleTypeId": 123,
"sizeRangeId": 123,
"sizeRangeName": "<string>",
"deadline": "2023-11-07T05:31:56Z",
"etd": "2023-11-07T05:31:56Z",
"note": "<string>",
"locationId": 123,
"allowHalfSample": true,
"requestedSampleSizes": [
{
"sizeRangeSizeId": 123,
"sizeRangeSizeName": "<string>",
"sizeRangeSizeStatus": true,
"specs": [
{
"styleColorId": 123,
"styleColorName": "<string>",
"styleColorCustomId2": "<string>",
"quantity": 123,
"available": true
}
]
}
]
}
]
'import requests
url = "http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests"
payload = [
{
"sampleTypeId": 123,
"sizeRangeId": 123,
"sizeRangeName": "<string>",
"deadline": "2023-11-07T05:31:56Z",
"etd": "2023-11-07T05:31:56Z",
"note": "<string>",
"locationId": 123,
"allowHalfSample": True,
"requestedSampleSizes": [
{
"sizeRangeSizeId": 123,
"sizeRangeSizeName": "<string>",
"sizeRangeSizeStatus": True,
"specs": [
{
"styleColorId": 123,
"styleColorName": "<string>",
"styleColorCustomId2": "<string>",
"quantity": 123,
"available": True
}
]
}
]
}
]
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([
{
sampleTypeId: 123,
sizeRangeId: 123,
sizeRangeName: '<string>',
deadline: '2023-11-07T05:31:56Z',
etd: '2023-11-07T05:31:56Z',
note: '<string>',
locationId: 123,
allowHalfSample: true,
requestedSampleSizes: [
{
sizeRangeSizeId: 123,
sizeRangeSizeName: '<string>',
sizeRangeSizeStatus: true,
specs: [
{
styleColorId: 123,
styleColorName: '<string>',
styleColorCustomId2: '<string>',
quantity: 123,
available: true
}
]
}
]
}
])
};
fetch('http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests', 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 => "http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests",
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([
[
'sampleTypeId' => 123,
'sizeRangeId' => 123,
'sizeRangeName' => '<string>',
'deadline' => '2023-11-07T05:31:56Z',
'etd' => '2023-11-07T05:31:56Z',
'note' => '<string>',
'locationId' => 123,
'allowHalfSample' => true,
'requestedSampleSizes' => [
[
'sizeRangeSizeId' => 123,
'sizeRangeSizeName' => '<string>',
'sizeRangeSizeStatus' => true,
'specs' => [
[
'styleColorId' => 123,
'styleColorName' => '<string>',
'styleColorCustomId2' => '<string>',
'quantity' => 123,
'available' => true
]
]
]
]
]
]),
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 := "http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests"
payload := strings.NewReader("[\n {\n \"sampleTypeId\": 123,\n \"sizeRangeId\": 123,\n \"sizeRangeName\": \"<string>\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"etd\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"locationId\": 123,\n \"allowHalfSample\": true,\n \"requestedSampleSizes\": [\n {\n \"sizeRangeSizeId\": 123,\n \"sizeRangeSizeName\": \"<string>\",\n \"sizeRangeSizeStatus\": true,\n \"specs\": [\n {\n \"styleColorId\": 123,\n \"styleColorName\": \"<string>\",\n \"styleColorCustomId2\": \"<string>\",\n \"quantity\": 123,\n \"available\": true\n }\n ]\n }\n ]\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("http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests")
.header("Content-Type", "application/json")
.body("[\n {\n \"sampleTypeId\": 123,\n \"sizeRangeId\": 123,\n \"sizeRangeName\": \"<string>\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"etd\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"locationId\": 123,\n \"allowHalfSample\": true,\n \"requestedSampleSizes\": [\n {\n \"sizeRangeSizeId\": 123,\n \"sizeRangeSizeName\": \"<string>\",\n \"sizeRangeSizeStatus\": true,\n \"specs\": [\n {\n \"styleColorId\": 123,\n \"styleColorName\": \"<string>\",\n \"styleColorCustomId2\": \"<string>\",\n \"quantity\": 123,\n \"available\": true\n }\n ]\n }\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"sampleTypeId\": 123,\n \"sizeRangeId\": 123,\n \"sizeRangeName\": \"<string>\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"etd\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"locationId\": 123,\n \"allowHalfSample\": true,\n \"requestedSampleSizes\": [\n {\n \"sizeRangeSizeId\": 123,\n \"sizeRangeSizeName\": \"<string>\",\n \"sizeRangeSizeStatus\": true,\n \"specs\": [\n {\n \"styleColorId\": 123,\n \"styleColorName\": \"<string>\",\n \"styleColorCustomId2\": \"<string>\",\n \"quantity\": 123,\n \"available\": true\n }\n ]\n }\n ]\n }\n]"
response = http.request(request)
puts response.read_body{
"status": "<unknown>",
"code": "<string>",
"data": [
{
"id": 123,
"styleId": 123,
"status": "<unknown>",
"deadline": "2023-11-07T05:31:56Z",
"etd": "2023-11-07T05:31:56Z",
"sendDate": "2023-11-07T05:31:56Z",
"lastStateChange": "2023-11-07T05:31:56Z",
"note": "<string>",
"trackingNumber": "<string>",
"sampleType": {
"id": 123,
"name": "<string>",
"state": "<unknown>",
"commentDeadline": 123,
"position": 123,
"notifySettings": "<array>",
"properties": [
"<string>"
]
},
"properties": [
"<string>"
]
}
]
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}SampleRequests
Bulk-create sample requests for a style
Creates one or more sample requests for a style in a single all-or-nothing transaction. Body must be an array, capped at 200 items per request. Every requested sample size must have at least one spec with a non-zero quantity, and half-sample (fractional) quantities are rejected unless allowHalfSample is set.
POST
/
api
/
styles
/
{styleId}
/
sample-requests
Bulk-create sample requests for a style
curl --request POST \
--url http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests \
--header 'Content-Type: application/json' \
--data '
[
{
"sampleTypeId": 123,
"sizeRangeId": 123,
"sizeRangeName": "<string>",
"deadline": "2023-11-07T05:31:56Z",
"etd": "2023-11-07T05:31:56Z",
"note": "<string>",
"locationId": 123,
"allowHalfSample": true,
"requestedSampleSizes": [
{
"sizeRangeSizeId": 123,
"sizeRangeSizeName": "<string>",
"sizeRangeSizeStatus": true,
"specs": [
{
"styleColorId": 123,
"styleColorName": "<string>",
"styleColorCustomId2": "<string>",
"quantity": 123,
"available": true
}
]
}
]
}
]
'import requests
url = "http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests"
payload = [
{
"sampleTypeId": 123,
"sizeRangeId": 123,
"sizeRangeName": "<string>",
"deadline": "2023-11-07T05:31:56Z",
"etd": "2023-11-07T05:31:56Z",
"note": "<string>",
"locationId": 123,
"allowHalfSample": True,
"requestedSampleSizes": [
{
"sizeRangeSizeId": 123,
"sizeRangeSizeName": "<string>",
"sizeRangeSizeStatus": True,
"specs": [
{
"styleColorId": 123,
"styleColorName": "<string>",
"styleColorCustomId2": "<string>",
"quantity": 123,
"available": True
}
]
}
]
}
]
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([
{
sampleTypeId: 123,
sizeRangeId: 123,
sizeRangeName: '<string>',
deadline: '2023-11-07T05:31:56Z',
etd: '2023-11-07T05:31:56Z',
note: '<string>',
locationId: 123,
allowHalfSample: true,
requestedSampleSizes: [
{
sizeRangeSizeId: 123,
sizeRangeSizeName: '<string>',
sizeRangeSizeStatus: true,
specs: [
{
styleColorId: 123,
styleColorName: '<string>',
styleColorCustomId2: '<string>',
quantity: 123,
available: true
}
]
}
]
}
])
};
fetch('http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests', 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 => "http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests",
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([
[
'sampleTypeId' => 123,
'sizeRangeId' => 123,
'sizeRangeName' => '<string>',
'deadline' => '2023-11-07T05:31:56Z',
'etd' => '2023-11-07T05:31:56Z',
'note' => '<string>',
'locationId' => 123,
'allowHalfSample' => true,
'requestedSampleSizes' => [
[
'sizeRangeSizeId' => 123,
'sizeRangeSizeName' => '<string>',
'sizeRangeSizeStatus' => true,
'specs' => [
[
'styleColorId' => 123,
'styleColorName' => '<string>',
'styleColorCustomId2' => '<string>',
'quantity' => 123,
'available' => true
]
]
]
]
]
]),
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 := "http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests"
payload := strings.NewReader("[\n {\n \"sampleTypeId\": 123,\n \"sizeRangeId\": 123,\n \"sizeRangeName\": \"<string>\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"etd\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"locationId\": 123,\n \"allowHalfSample\": true,\n \"requestedSampleSizes\": [\n {\n \"sizeRangeSizeId\": 123,\n \"sizeRangeSizeName\": \"<string>\",\n \"sizeRangeSizeStatus\": true,\n \"specs\": [\n {\n \"styleColorId\": 123,\n \"styleColorName\": \"<string>\",\n \"styleColorCustomId2\": \"<string>\",\n \"quantity\": 123,\n \"available\": true\n }\n ]\n }\n ]\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("http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests")
.header("Content-Type", "application/json")
.body("[\n {\n \"sampleTypeId\": 123,\n \"sizeRangeId\": 123,\n \"sizeRangeName\": \"<string>\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"etd\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"locationId\": 123,\n \"allowHalfSample\": true,\n \"requestedSampleSizes\": [\n {\n \"sizeRangeSizeId\": 123,\n \"sizeRangeSizeName\": \"<string>\",\n \"sizeRangeSizeStatus\": true,\n \"specs\": [\n {\n \"styleColorId\": 123,\n \"styleColorName\": \"<string>\",\n \"styleColorCustomId2\": \"<string>\",\n \"quantity\": 123,\n \"available\": true\n }\n ]\n }\n ]\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/api/styles/{styleId}/sample-requests")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"sampleTypeId\": 123,\n \"sizeRangeId\": 123,\n \"sizeRangeName\": \"<string>\",\n \"deadline\": \"2023-11-07T05:31:56Z\",\n \"etd\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"locationId\": 123,\n \"allowHalfSample\": true,\n \"requestedSampleSizes\": [\n {\n \"sizeRangeSizeId\": 123,\n \"sizeRangeSizeName\": \"<string>\",\n \"sizeRangeSizeStatus\": true,\n \"specs\": [\n {\n \"styleColorId\": 123,\n \"styleColorName\": \"<string>\",\n \"styleColorCustomId2\": \"<string>\",\n \"quantity\": 123,\n \"available\": true\n }\n ]\n }\n ]\n }\n]"
response = http.request(request)
puts response.read_body{
"status": "<unknown>",
"code": "<string>",
"data": [
{
"id": 123,
"styleId": 123,
"status": "<unknown>",
"deadline": "2023-11-07T05:31:56Z",
"etd": "2023-11-07T05:31:56Z",
"sendDate": "2023-11-07T05:31:56Z",
"lastStateChange": "2023-11-07T05:31:56Z",
"note": "<string>",
"trackingNumber": "<string>",
"sampleType": {
"id": 123,
"name": "<string>",
"state": "<unknown>",
"commentDeadline": 123,
"position": 123,
"notifySettings": "<array>",
"properties": [
"<string>"
]
},
"properties": [
"<string>"
]
}
]
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}{
"status": "<unknown>",
"code": "<string>",
"error": {
"operation": "<string>",
"total_items": 123,
"failed_items": 123,
"summary": "<string>",
"details": [
{
"type": "<string>",
"field": "<string>",
"value": "<string>"
}
]
}
}Path Parameters
Body
application/jsontext/jsonapplication/*+json
⌘I