Assignment by Establishment
curl --request POST \
--url https://api.qa.sima.ag/app_dev.php/api/v2/third_party/assignments/from_establishment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"\"{\\n \\\"establishment_id\\\": 32,\\n \\\"user_id\\\": 17\\n}\""
'import requests
url = "https://api.qa.sima.ag/app_dev.php/api/v2/third_party/assignments/from_establishment"
payload = "\"{\n \\"establishment_id\\": 32,\n \\"user_id\\": 17\n}\""
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "*/*"
}
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': '*/*'
},
body: JSON.stringify('"{\n \"establishment_id\": 32,\n \"user_id\": 17\n}"')
};
fetch('https://api.qa.sima.ag/app_dev.php/api/v2/third_party/assignments/from_establishment', 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/app_dev.php/api/v2/third_party/assignments/from_establishment",
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('"{\\n \\"establishment_id\\": 32,\\n \\"user_id\\": 17\\n}"'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*",
"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;
}{
"newAssignmets": 1,
"newPlotDefaultCreated": true
}Version 1 > Assignments - Revisar
Assignment by Establishment
POST
/
app_dev.php
/
api
/
v2
/
third_party
/
assignments
/
from_establishment
Assignment by Establishment
curl --request POST \
--url https://api.qa.sima.ag/app_dev.php/api/v2/third_party/assignments/from_establishment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"\"{\\n \\\"establishment_id\\\": 32,\\n \\\"user_id\\\": 17\\n}\""
'import requests
url = "https://api.qa.sima.ag/app_dev.php/api/v2/third_party/assignments/from_establishment"
payload = "\"{\n \\"establishment_id\\": 32,\n \\"user_id\\": 17\n}\""
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "*/*"
}
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': '*/*'
},
body: JSON.stringify('"{\n \"establishment_id\": 32,\n \"user_id\": 17\n}"')
};
fetch('https://api.qa.sima.ag/app_dev.php/api/v2/third_party/assignments/from_establishment', 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/app_dev.php/api/v2/third_party/assignments/from_establishment",
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('"{\\n \\"establishment_id\\": 32,\\n \\"user_id\\": 17\\n}"'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*",
"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;
}{
"newAssignmets": 1,
"newPlotDefaultCreated": true
}Authorizations
access_token obtenido via POST /api/v2/login
Identificador del sistema integrador (8 para Third-Party API)
Body
*/*
The body is of type string.
Example:
"\"{\\n \\\"establishment_id\\\": 32,\\n \\\"user_id\\\": 17\\n}\""
Response
201 - application/json
Created
The response is of type object.

