
{"id":25860,"date":"2020-01-13T13:06:19","date_gmt":"2020-01-13T12:06:19","guid":{"rendered":"https:\/\/www.minicrm.hu\/help\/?p=25860"},"modified":"2025-11-27T14:40:49","modified_gmt":"2025-11-27T13:40:49","slug":"exemplu-de-script","status":"publish","type":"post","link":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/","title":{"rendered":"Exemplu de script"},"content":{"rendered":"<p style=\"text-align: justify;\">Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl.<\/p>\n<p style=\"text-align: justify;\">\n<h3 id=\"PldakeressreGET\" style=\"text-align: justify;\"><span>Exemplu de c\u0103utare (GET):<\/span><\/h3>\n<ul style=\"text-align: justify;\">\n<li><strong><span>System ID (SystemId):<\/span><\/strong><span>\u00a0\u00a050<\/span><\/li>\n<li><strong><span>API Key (APIKey):\u00a0<\/span><\/strong><span>\u00a0ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1<\/span><\/li>\n<li><strong><span>Requested project:<\/span><\/strong><span>\u00a0\u00a0Test project<\/span><\/li>\n<\/ul>\n<pre><code>\/\/ Compile Url\r\n$Url = 'https:\/\/50:ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1@r3.minicrm.hu\/Api\/R3\/Project?Query=Teszt projekt';\r\n\r\n\/\/ Initialize Curl\r\n$Curl = curl_init();\r\ncurl_setopt($Curl, CURLOPT_RETURNTRANSFER , true);\r\ncurl_setopt($Curl, CURLOPT_SSL_VERIFYPEER , false);\r\n\r\n\/\/ Pass the url to Curl\r\ncurl_setopt($Curl, CURLOPT_URL, $Url);\r\n\r\n\/\/ Run Curl request\r\n$Response = curl_exec($Curl);\r\n\r\n\/\/ Was there a problem running the Curl request?\r\nif(curl_errno($Curl)) $Error = \"Eroare CURL : \".curl_error($Curl);\r\n\r\n\/\/ Get the http code returned by the API\r\n$ResponseCode = curl_getinfo($Curl, CURLINFO_HTTP_CODE);\r\nif($ResponseCode != 200) $Error = \"Eroare API : {$ResponseCode} - mesaj: {$Response}\";\r\n\r\n\/\/ Close Curl\r\ncurl_close($Curl);\r\n\r\n\/\/ Decode and print JSON received in response\r\n$Response = json_decode($Response, true);\r\nvar_export($Response);\r\n<\/code><\/pre>\n<h3 id=\"PldaletltsreGET\" style=\"text-align: justify;\"><span>Exemplu de interogare a detaliilor (GET):<\/span><\/h3>\n<ul style=\"text-align: justify;\">\n<li><strong><span>System ID (SystemId):<\/span><\/strong><span>\u00a0\u00a050<\/span><\/li>\n<li><strong><span>API Key (APIKey):\u00a0<\/span><\/strong><span>\u00a0ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1<\/span><\/li>\n<li><strong><span>Project ID for<\/span><\/strong><span>\u00a0\u00a0download\u00a0<strong>:<\/strong>\u00a012345<\/span><\/li>\n<\/ul>\n<pre><code>\/\/ Compile Url\r\n$Url = 'https:\/\/50:ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1@r3.minicrm.hu\/Api\/R3\/Project\/12345';\r\n\r\n\/\/ Initialize Curl\r\n$Curl = curl_init();\r\ncurl_setopt($Curl, CURLOPT_RETURNTRANSFER , true);\r\ncurl_setopt($Curl, CURLOPT_SSL_VERIFYPEER , false);\r\n\r\n\/\/ Pass the url to Curl\r\ncurl_setopt($Curl, CURLOPT_URL, $Url);\r\n\r\n\/\/ Run Curl request\r\n$Response = curl_exec($Curl);\r\n\r\n\/\/ Was there a problem running the Curl request?\r\nif(curl_errno($Curl)) $Error = \"Eroare CURL: \".curl_error($Curl);\r\n\r\n\/\/ Get the http code returned by the API\r\n$ResponseCode = curl_getinfo($Curl, CURLINFO_HTTP_CODE);\r\nif($ResponseCode != 200) $Error = \"Eroare API : {$ResponseCode} - mesaj: {$Response}\";\r\n\r\n\/\/ Close Curl\r\ncurl_close($Curl);\r\n\r\n\/\/ Decode and print JSON received in response\r\n$Response = json_decode($Response, true);\r\nvar_export($Response);\r\n<\/code><\/pre>\n<h3 id=\"PldafeltltsrePUT\" style=\"text-align: justify;\"><span>Exemplu creere card nou (PUT):<\/span><\/h3>\n<ul style=\"text-align: justify;\">\n<li><strong><span>System ID (SystemId):<\/span><\/strong><span>\u00a0\u00a050<\/span><\/li>\n<li><strong><span>API Key (APIKey):\u00a0<\/span><\/strong><span>\u00a0ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1<\/span><\/li>\n<li><strong><span>Data to upload:<\/span><\/strong>\n<ul>\n<li><strong>Project Name<\/strong><span>: First API project<\/span><\/li>\n<li><strong>Responsible for the project<\/strong><span>: Bogdan Burciu (3200)<\/span><\/li>\n<li><strong>Project Status<\/strong><span>: Needs Assessment (2500)<\/span><\/li>\n<li><strong>Project produse<\/strong><span> \u00a0(obligatoriu pentru card nou): 3<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code>\/\/ Compile Url\r\n$Url = 'https:\/\/50:ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1@r3.minicrm.hu\/Api\/R3\/Project';\r\n\r\n\/\/ Specify parameters in array format\r\n$Params = array(\r\n  'Name' =&gt; 'Proiect API',\r\n  'UserId' =&gt; 3200,\r\n  'StatusId' =&gt; 2500,\r\n  'CategoryId' =&gt; 3\r\n);\r\n\r\n\/\/ Initialize Curl\r\n$Curl = curl_init();\r\ncurl_setopt($Curl, CURLOPT_RETURNTRANSFER , true);\r\ncurl_setopt($Curl, CURLOPT_SSL_VERIFYPEER , false);\r\n\r\n\/\/ Parameters JSON coding\r\n$Params = json_encode($Params);\r\n\r\n\/\/ Set headers (data type, length and character encoding)\r\ncurl_setopt($Curl, CURLOPT_HTTPHEADER, array('Content-Type: application\/json','Content-Length: '.strlen($Params), 'charset=UTF-8'));\r\n\r\n\/\/ Move request type to PUT\r\ncurl_setopt($Curl, CURLOPT_CUSTOMREQUEST, \"PUT\"); \r\n\r\n\/\/ Pass parameters to Curl\r\ncurl_setopt($Curl, CURLOPT_POSTFIELDS, $Params);\r\n\r\n\/\/ Pass the url to Curl\r\ncurl_setopt($Curl, CURLOPT_URL, $Url);\r\n\r\n\/\/ Run Curl request\r\n$Response = curl_exec($Curl);\r\n\r\n\/\/ Was there a problem running the Curl request?\r\nif(curl_errno($Curl)) $Error = \"Eroare CURL: \".curl_error($Curl);\r\n\r\n\/\/ Get the http code returned by the API\r\n$ResponseCode = curl_getinfo($Curl, CURLINFO_HTTP_CODE);\r\nif($ResponseCode != 200) $Error = \"Eroare API: {$ResponseCode} - mesaj: {$Response}\";\r\n\r\n\/\/ Close Curl\r\ncurl_close($Curl);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl. Exemplu de c\u0103utare (GET): System ID (SystemId):\u00a0\u00a050 API Key (APIKey):\u00a0\u00a0ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1 Requested project:\u00a0\u00a0Test project \/\/ Compile Url $Url = &#8216;https:\/\/50:ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1@r3.minicrm.hu\/Api\/R3\/Project?Query=Teszt projekt&#8217;; \/\/ Initialize Curl $Curl = curl_init(); curl_setopt($Curl, CURLOPT_RETURNTRANSFER , true); curl_setopt($Curl, CURLOPT_SSL_VERIFYPEER , false); \/\/ Pass the url [&hellip;]<\/p>\n","protected":false},"author":54,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1422,2579],"tags":[1509],"class_list":["post-25860","post","type-post","status-publish","format-standard","hentry","category-integrari","category-integrari-personalizate","tag-api-ro"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Exemplu de script - Documenta\u021bie MiniCRM<\/title>\n<meta name=\"description\" content=\"Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl. Exemplu de c\u0103utare (GET): System ID (SystemId):\u00a0\u00a050 API\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exemplu de script - Documenta\u021bie MiniCRM\" \/>\n<meta property=\"og:description\" content=\"Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl. Exemplu de c\u0103utare (GET): System ID (SystemId):\u00a0\u00a050 API\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/\" \/>\n<meta property=\"og:site_name\" content=\"Documenta\u021bie MiniCRM\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-13T12:06:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-27T13:40:49+00:00\" \/>\n<meta name=\"author\" content=\"Bogdan Burciu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bogdan Burciu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/\"},\"author\":{\"name\":\"Bogdan Burciu\",\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#\\\/schema\\\/person\\\/8a676279a8b36970727c5347285cebb9\"},\"headline\":\"Exemplu de script\",\"datePublished\":\"2020-01-13T12:06:19+00:00\",\"dateModified\":\"2025-11-27T13:40:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/\"},\"wordCount\":101,\"commentCount\":0,\"keywords\":[\"api-ro\"],\"articleSection\":[\"Integr\u0103ri\",\"Integrari personalizate\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/\",\"url\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/\",\"name\":\"Exemplu de script - Documenta\u021bie MiniCRM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#website\"},\"datePublished\":\"2020-01-13T12:06:19+00:00\",\"dateModified\":\"2025-11-27T13:40:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#\\\/schema\\\/person\\\/8a676279a8b36970727c5347285cebb9\"},\"description\":\"Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl. Exemplu de c\u0103utare (GET): System ID (SystemId):\u00a0\u00a050 API\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exemplu de script\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/\",\"name\":\"Documenta\u021bie MiniCRM\",\"description\":\"Welcome to MiniCRM\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#\\\/schema\\\/person\\\/8a676279a8b36970727c5347285cebb9\",\"name\":\"Bogdan Burciu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e14cb779ed6e91c809dfbe3a892ee4d39402679edbbf262dbb8811974db2df54?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e14cb779ed6e91c809dfbe3a892ee4d39402679edbbf262dbb8811974db2df54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e14cb779ed6e91c809dfbe3a892ee4d39402679edbbf262dbb8811974db2df54?s=96&d=mm&r=g\",\"caption\":\"Bogdan Burciu\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exemplu de script - Documenta\u021bie MiniCRM","description":"Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl. Exemplu de c\u0103utare (GET): System ID (SystemId):\u00a0\u00a050 API","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/","og_locale":"en_US","og_type":"article","og_title":"Exemplu de script - Documenta\u021bie MiniCRM","og_description":"Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl. Exemplu de c\u0103utare (GET): System ID (SystemId):\u00a0\u00a050 API","og_url":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/","og_site_name":"Documenta\u021bie MiniCRM","article_published_time":"2020-01-13T12:06:19+00:00","article_modified_time":"2025-11-27T13:40:49+00:00","author":"Bogdan Burciu","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Bogdan Burciu","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/#article","isPartOf":{"@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/"},"author":{"name":"Bogdan Burciu","@id":"https:\/\/www.minicrm.hu\/help\/#\/schema\/person\/8a676279a8b36970727c5347285cebb9"},"headline":"Exemplu de script","datePublished":"2020-01-13T12:06:19+00:00","dateModified":"2025-11-27T13:40:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/"},"wordCount":101,"commentCount":0,"keywords":["api-ro"],"articleSection":["Integr\u0103ri","Integrari personalizate"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/","url":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/","name":"Exemplu de script - Documenta\u021bie MiniCRM","isPartOf":{"@id":"https:\/\/www.minicrm.hu\/help\/#website"},"datePublished":"2020-01-13T12:06:19+00:00","dateModified":"2025-11-27T13:40:49+00:00","author":{"@id":"https:\/\/www.minicrm.hu\/help\/#\/schema\/person\/8a676279a8b36970727c5347285cebb9"},"description":"Po\u021bi folosi urm\u0103torul exemplu de scrip PHP pentru a eviden\u021bia produs de lucru al API prin Curl. Exemplu de c\u0103utare (GET): System ID (SystemId):\u00a0\u00a050 API","breadcrumb":{"@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.minicrm.hu\/help\/"},{"@type":"ListItem","position":2,"name":"Exemplu de script"}]},{"@type":"WebSite","@id":"https:\/\/www.minicrm.hu\/help\/#website","url":"https:\/\/www.minicrm.hu\/help\/","name":"Documenta\u021bie MiniCRM","description":"Welcome to MiniCRM","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.minicrm.hu\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.minicrm.hu\/help\/#\/schema\/person\/8a676279a8b36970727c5347285cebb9","name":"Bogdan Burciu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e14cb779ed6e91c809dfbe3a892ee4d39402679edbbf262dbb8811974db2df54?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e14cb779ed6e91c809dfbe3a892ee4d39402679edbbf262dbb8811974db2df54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e14cb779ed6e91c809dfbe3a892ee4d39402679edbbf262dbb8811974db2df54?s=96&d=mm&r=g","caption":"Bogdan Burciu"}}]}},"_links":{"self":[{"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/posts\/25860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/users\/54"}],"replies":[{"embeddable":true,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/comments?post=25860"}],"version-history":[{"count":4,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/posts\/25860\/revisions"}],"predecessor-version":[{"id":31509,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/posts\/25860\/revisions\/31509"}],"wp:attachment":[{"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/media?parent=25860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/categories?post=25860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/tags?post=25860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}