Edit
curl --request PATCH \
--url https://api.qa.sima.ag/api/v3/third_party/establishments/{new_establishment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"\"{ \\n \\\"farmer_id\\\": \\\"{{new_farmer}}\\\", \\n \\\"name\\\": \\\"Establecimiento 1 edit\\\",\\n \\\"observations\\\": \\\"Una observación edit\\\"\\n}\\n\\n\""
'import requests
url = "https://api.qa.sima.ag/api/v3/third_party/establishments/{new_establishment}"
payload = "\"{ \n \\"farmer_id\\": \\"{{new_farmer}}\\", \n \\"name\\": \\"Establecimiento 1 edit\\",\n \\"observations\\": \\"Una observación edit\\"\n}\n\n\""
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "*/*"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-SIMA-SYSTEM-ID': '<api-key>',
'Content-Type': '*/*'
},
body: JSON.stringify('"{ \n \"farmer_id\": \"{{new_farmer}}\", \n \"name\": \"Establecimiento 1 edit\",\n \"observations\": \"Una observación edit\"\n}\n\n"')
};
fetch('https://api.qa.sima.ag/api/v3/third_party/establishments/{new_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/api/v3/third_party/establishments/{new_establishment}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode('"{ \\n \\"farmer_id\\": \\"{{new_farmer}}\\", \\n \\"name\\": \\"Establecimiento 1 edit\\",\\n \\"observations\\": \\"Una observación edit\\"\\n}\\n\\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;
}{
"id": 118448,
"farmer_id": 13873,
"name": "Establecimiento 1 edit",
"observations": "Una observación edit",
"created_at": "2024-09-12T11:24:55-03:00",
"modified_at": "2024-09-12T11:26:13-03:00",
"deleted_at": null,
"active": true
}Version 3 > Establishments
Edit
PATCH
/
api
/
v3
/
third_party
/
establishments
/
{new_establishment}
Edit
curl --request PATCH \
--url https://api.qa.sima.ag/api/v3/third_party/establishments/{new_establishment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--header 'X-SIMA-SYSTEM-ID: <api-key>' \
--data '
"\"{ \\n \\\"farmer_id\\\": \\\"{{new_farmer}}\\\", \\n \\\"name\\\": \\\"Establecimiento 1 edit\\\",\\n \\\"observations\\\": \\\"Una observación edit\\\"\\n}\\n\\n\""
'import requests
url = "https://api.qa.sima.ag/api/v3/third_party/establishments/{new_establishment}"
payload = "\"{ \n \\"farmer_id\\": \\"{{new_farmer}}\\", \n \\"name\\": \\"Establecimiento 1 edit\\",\n \\"observations\\": \\"Una observación edit\\"\n}\n\n\""
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>",
"Content-Type": "*/*"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-SIMA-SYSTEM-ID': '<api-key>',
'Content-Type': '*/*'
},
body: JSON.stringify('"{ \n \"farmer_id\": \"{{new_farmer}}\", \n \"name\": \"Establecimiento 1 edit\",\n \"observations\": \"Una observación edit\"\n}\n\n"')
};
fetch('https://api.qa.sima.ag/api/v3/third_party/establishments/{new_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/api/v3/third_party/establishments/{new_establishment}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode('"{ \\n \\"farmer_id\\": \\"{{new_farmer}}\\", \\n \\"name\\": \\"Establecimiento 1 edit\\",\\n \\"observations\\": \\"Una observación edit\\"\\n}\\n\\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;
}{
"id": 118448,
"farmer_id": 13873,
"name": "Establecimiento 1 edit",
"observations": "Una observación edit",
"created_at": "2024-09-12T11:24:55-03:00",
"modified_at": "2024-09-12T11:26:13-03:00",
"deleted_at": null,
"active": true
}Authorizations
access_token obtenido via POST /api/v2/login
Identificador del sistema integrador (8 para Third-Party API)
Path Parameters
Body
*/*
The body is of type string.
Example:
"\"{ \\n \\\"farmer_id\\\": \\\"{{new_farmer}}\\\", \\n \\\"name\\\": \\\"Establecimiento 1 edit\\\",\\n \\\"observations\\\": \\\"Una observación edit\\\"\\n}\\n\\n\""
Response
200 - application/json
OK
The response is of type object.

