
{"id":25524,"date":"2020-01-09T11:35:33","date_gmt":"2020-01-09T10:35:33","guid":{"rendered":"https:\/\/www.minicrm.hu\/help\/?p=25524"},"modified":"2025-11-27T13:47:42","modified_gmt":"2025-11-27T12:47:42","slug":"exemplu-de-script-pentru-facturare","status":"publish","type":"post","link":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/","title":{"rendered":"Exemplu de script pentru facturare"},"content":{"rendered":"<div class=\"alert alert-info\" style=\"text-align: justify;\">Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: <a href=\"https:\/\/minicrm-wp-help.s3.amazonaws.com\/uploads\/2019\/12\/MiniCRM-Api-English.pdf\">MiniCRM Api English<\/a>.<\/div>\n<p style=\"text-align: justify;\">\u00cen sec\u021biunea urm\u0103toare vei reg\u0103si un exemplu de script API \u0219i Curl scris \u00een PHP:<\/p>\n<ul style=\"text-align: justify;\">\n<li><strong>System ID (SystemId):<\/strong>\u00a0\u00a050<\/li>\n<li><strong>API Key (APIKey):\u00a0<\/strong>\u00a0ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1<\/li>\n<\/ul>\n<p><strong>Not\u0103:\u00a0<\/strong>\u00cenlocuie\u0219te aceste valori cu cele ale sistemului t\u0103u.<\/p>\n<pre><code>\/\/Compile URL\r\n$Url = 'https:\/\/50:ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1@r3.minicrm.hu\/Api\/Invoice\/';\r\n\r\n\/\/Parameters array\r\n$Params = array(\r\n    'CustomerId' =&gt; 12,\r\n    'Type' =&gt; 'ProForma',\r\n    'PaymentMethod' =&gt; 'WiredTransfer',\r\n    'Issued' =&gt; '2013-11-27',\r\n    'Performance' =&gt; '2013-11-27',\r\n    'Prompt' =&gt; '2013-11-27',\r\n    'CurrencyCode' =&gt; 'EUR',\r\n    'IsReverseCharge' =&gt; 0,\r\n    'Customer' =&gt; array(\r\n        'Name' =&gt; 'PHP Test User',\r\n        'Country' =&gt; 'Rom\u00e2nia',\r\n        'PostalCode' =&gt; 123456,\r\n        'City' =&gt; 'Cluj-Napoca',\r\n        'Address' =&gt; 'Str. Arie\u0219ului',\r\n        'AccountNumber' =&gt; '11111111-2222222-3333333',\r\n        'VatNumber' =&gt; '13579135-13-5'\r\n    ),\r\n    'Items' =&gt; array(\r\n        0 =&gt; array(\r\n            'Name' =&gt; 'Test service',\r\n            'Unit' =&gt; 'piece',\r\n            'Quantity' =&gt; 1,\r\n            'VAT' =&gt; 19,\r\n            'PriceNet' =&gt; 50\r\n        )\r\n    )\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\/\/Encode JSON parameters\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\/\/Set request type to POST\r\ncurl_setopt($Curl, CURLOPT_POST, 1);\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 = \"Error while running 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 = \"API Error Code: {$ResponseCode} - Message: {$Response}\";\r\n\r\n\/\/Close Curl\r\ncurl_close($Curl);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: MiniCRM Api English. \u00cen sec\u021biunea urm\u0103toare vei reg\u0103si un exemplu de script API \u0219i Curl scris \u00een PHP: System ID (SystemId):\u00a0\u00a050 API Key (APIKey):\u00a0\u00a0ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1 Not\u0103:\u00a0\u00cenlocuie\u0219te aceste valori cu cele ale sistemului t\u0103u. \/\/Compile URL $Url = &#8216;https:\/\/50:ZxPPCqDItuQhoaLeBM2679mT3iG5NgH1@r3.minicrm.hu\/Api\/Invoice\/&#8217;; [&hellip;]<\/p>\n","protected":false},"author":54,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2557,1422],"tags":[1509],"class_list":["post-25524","post","type-post","status-publish","format-standard","hentry","category-facturare","category-integrari","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 pentru facturare - Documenta\u021bie MiniCRM<\/title>\n<meta name=\"description\" content=\"Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: MiniCRM Api English. \u00cen\" \/>\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-pentru-facturare\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exemplu de script pentru facturare - Documenta\u021bie MiniCRM\" \/>\n<meta property=\"og:description\" content=\"Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: MiniCRM Api English. \u00cen\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/\" \/>\n<meta property=\"og:site_name\" content=\"Documenta\u021bie MiniCRM\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-09T10:35:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-27T12:47:42+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-pentru-facturare\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/\"},\"author\":{\"name\":\"Bogdan Burciu\",\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#\\\/schema\\\/person\\\/8a676279a8b36970727c5347285cebb9\"},\"headline\":\"Exemplu de script pentru facturare\",\"datePublished\":\"2020-01-09T10:35:33+00:00\",\"dateModified\":\"2025-11-27T12:47:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/\"},\"wordCount\":68,\"commentCount\":0,\"keywords\":[\"api-ro\"],\"articleSection\":[\"Facturare\",\"Integr\u0103ri\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/\",\"url\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/\",\"name\":\"Exemplu de script pentru facturare - Documenta\u021bie MiniCRM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#website\"},\"datePublished\":\"2020-01-09T10:35:33+00:00\",\"dateModified\":\"2025-11-27T12:47:42+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/#\\\/schema\\\/person\\\/8a676279a8b36970727c5347285cebb9\"},\"description\":\"Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: MiniCRM Api English. \u00cen\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.minicrm.ro\\\/help\\\/exemplu-de-script-pentru-facturare\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.minicrm.hu\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exemplu de script pentru facturare\"}]},{\"@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 pentru facturare - Documenta\u021bie MiniCRM","description":"Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: MiniCRM Api English. \u00cen","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-pentru-facturare\/","og_locale":"en_US","og_type":"article","og_title":"Exemplu de script pentru facturare - Documenta\u021bie MiniCRM","og_description":"Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: MiniCRM Api English. \u00cen","og_url":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/","og_site_name":"Documenta\u021bie MiniCRM","article_published_time":"2020-01-09T10:35:33+00:00","article_modified_time":"2025-11-27T12:47:42+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-pentru-facturare\/#article","isPartOf":{"@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/"},"author":{"name":"Bogdan Burciu","@id":"https:\/\/www.minicrm.hu\/help\/#\/schema\/person\/8a676279a8b36970727c5347285cebb9"},"headline":"Exemplu de script pentru facturare","datePublished":"2020-01-09T10:35:33+00:00","dateModified":"2025-11-27T12:47:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/"},"wordCount":68,"commentCount":0,"keywords":["api-ro"],"articleSection":["Facturare","Integr\u0103ri"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/","url":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/","name":"Exemplu de script pentru facturare - Documenta\u021bie MiniCRM","isPartOf":{"@id":"https:\/\/www.minicrm.hu\/help\/#website"},"datePublished":"2020-01-09T10:35:33+00:00","dateModified":"2025-11-27T12:47:42+00:00","author":{"@id":"https:\/\/www.minicrm.hu\/help\/#\/schema\/person\/8a676279a8b36970727c5347285cebb9"},"description":"Ultima versiune a documenta\u021biei MiniCRM API (disponibil\u0103 \u00een limba englez\u0103) poate fi consultat\u0103 d\u00e2nd click pe urm\u0103torul link: MiniCRM Api English. \u00cen","breadcrumb":{"@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.minicrm.ro\/help\/exemplu-de-script-pentru-facturare\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.minicrm.hu\/help\/"},{"@type":"ListItem","position":2,"name":"Exemplu de script pentru facturare"}]},{"@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\/25524","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=25524"}],"version-history":[{"count":7,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/posts\/25524\/revisions"}],"predecessor-version":[{"id":31293,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/posts\/25524\/revisions\/31293"}],"wp:attachment":[{"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/media?parent=25524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/categories?post=25524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.minicrm.ro\/help\/wp-json\/wp\/v2\/tags?post=25524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}