Create
curl --request POST \
--url https://api.qa.sima.ag/api/v3/third_party/silobag_campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"{\n \"silobag_id\": {{new_silobags}},\n \"campaign_id\": {{campaign_id}},\n \"quantity_tn\": 8.5,\n \"grain_humidity_percent\": 14.0,\n \"grain_quality_semaphore\": 2,\n \"observations\": \"SNWP-11578 campaign row\"\n}"
'import requests
url = "https://api.qa.sima.ag/api/v3/third_party/silobag_campaigns"
payload = "{
\"silobag_id\": {{new_silobags}},
\"campaign_id\": {{campaign_id}},
\"quantity_tn\": 8.5,
\"grain_humidity_percent\": 14.0,
\"grain_quality_semaphore\": 2,
\"observations\": \"SNWP-11578 campaign row\"
}"
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-SIMA-SYSTEM-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify('{\n "silobag_id": {{new_silobags}},\n "campaign_id": {{campaign_id}},\n "quantity_tn": 8.5,\n "grain_humidity_percent": 14.0,\n "grain_quality_semaphore": 2,\n "observations": "SNWP-11578 campaign row"\n}')
};
fetch('https://api.qa.sima.ag/api/v3/third_party/silobag_campaigns', 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.qa.sima.ag/api/v3/third_party/silobag_campaigns",
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('{
"silobag_id": {{new_silobags}},
"campaign_id": {{campaign_id}},
"quantity_tn": 8.5,
"grain_humidity_percent": 14.0,
"grain_quality_semaphore": 2,
"observations": "SNWP-11578 campaign row"
}'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-SIMA-SYSTEM-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Version 3 > SIlo Bag > Silobag Campaigns
Create
Create silobag campaign row Third Party v3 (SNWP-11578). quantity_tn in tons.
POST
/
api
/
v3
/
third_party
/
silobag_campaigns
Create
curl --request POST \
--url https://api.qa.sima.ag/api/v3/third_party/silobag_campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"{\n \"silobag_id\": {{new_silobags}},\n \"campaign_id\": {{campaign_id}},\n \"quantity_tn\": 8.5,\n \"grain_humidity_percent\": 14.0,\n \"grain_quality_semaphore\": 2,\n \"observations\": \"SNWP-11578 campaign row\"\n}"
'import requests
url = "https://api.qa.sima.ag/api/v3/third_party/silobag_campaigns"
payload = "{
\"silobag_id\": {{new_silobags}},
\"campaign_id\": {{campaign_id}},
\"quantity_tn\": 8.5,
\"grain_humidity_percent\": 14.0,
\"grain_quality_semaphore\": 2,
\"observations\": \"SNWP-11578 campaign row\"
}"
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-SIMA-SYSTEM-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify('{\n "silobag_id": {{new_silobags}},\n "campaign_id": {{campaign_id}},\n "quantity_tn": 8.5,\n "grain_humidity_percent": 14.0,\n "grain_quality_semaphore": 2,\n "observations": "SNWP-11578 campaign row"\n}')
};
fetch('https://api.qa.sima.ag/api/v3/third_party/silobag_campaigns', 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.qa.sima.ag/api/v3/third_party/silobag_campaigns",
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('{
"silobag_id": {{new_silobags}},
"campaign_id": {{campaign_id}},
"quantity_tn": 8.5,
"grain_humidity_percent": 14.0,
"grain_quality_semaphore": 2,
"observations": "SNWP-11578 campaign row"
}'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-SIMA-SYSTEM-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Authorizations
access_token obtenido via POST /api/v2/login
Identificador del sistema integrador (8 para Third-Party API)
Body
application/json
The body is of type object.
Response
200 - application/json
Successful response

