curl -X POST 'https://foodsoul.pro/api/crm/v2/integration_payment_certificates.update?chain_id=1' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: hy' \
-H 'role: partner' \
-F 'id=1' \
-F 'name=cert' \
-F 'type=custom' \
-F 'certificate=@file.jpg'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://foodsoul.pro/api/crm/v2/integration_payment_certificates.update?chain_id=1', [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN',
'language' => 'hy',
'role' => 'partner',
],
'multipart' => [
[
'name' => 'id',
'contents' => '1',
],
[
'name' => 'name',
'contents' => 'cert',
],
[
'name' => 'type',
'contents' => 'custom',
],
[
'name' => 'certificate',
'contents' => '<file>',
],
],
]);
$data = json_decode((string) $response->getBody(), true);
const body = new FormData()
body.append("id", "1")
body.append("name", "cert")
body.append("type", "custom")
body.append("certificate", "<file>")
const response = await fetch("https://foodsoul.pro/api/crm/v2/integration_payment_certificates.update?chain_id=1", {
method: "POST",
headers: {
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "hy",
"role": "partner"
},
body,
})
const data = await response.json()
import requests
response = requests.request(
"POST",
"https://foodsoul.pro/api/crm/v2/integration_payment_certificates.update?chain_id=1",
headers={
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "hy",
"role": "partner",
},
files={
"id": [
None,
"1",
],
"name": [
None,
"cert",
],
"type": [
None,
"custom",
],
"certificate": [
None,
"<file>",
],
},
)
data = response.json()
Պատասխան 200
{
"status": "success",
"data": {}
}
Հարցումները ուղարկվում են foodsoul.pro՝ այս պորտալի հոստը, այլ ընտրություն հնարավոր չէ։.