{"id":34354,"date":"2019-10-31T21:57:51","date_gmt":"2019-10-31T18:57:51","guid":{"rendered":"https:\/\/prohoster.info\/blog\/pisali-api-porvali-xml-dva\/"},"modified":"2019-10-31T21:57:51","modified_gmt":"2019-10-31T18:57:51","slug":"pisali-api-porvali-xml-dva","status":"publish","type":"post","link":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/pisali-api-porvali-xml-dva","title":{"rendered":"API-t \u00edrtunk \u2014 sz\u00e9tt\u00e9pt\u00fck az XML-t (kett\u0151)","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>A MyWarehouse API appeared 10 years ago. All this time we have been working on existing versions of the API and developing new ones. And several versions of the API have already been retired. <\/p>\n<p>This article will cover a lot of topics: how the API was created, why it is needed for cloud services, what it offers to users, what pitfalls we encountered, and what we want to do next. <br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nMy name is Oleg Alexeev <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/oalexeev\/\" class=\"user_link\">oalexeev<\/a><\/noindex>, I am the technical director and co-founder of MyWarehouse. <\/p>\n<h2>Why create an API for a service<\/h2>\n<p>\nOur clients, which number in the tens of thousands, actively use cloud solutions: banking, online stores, inventory management, and CRM. Once they connect to one, it becomes hard to stop. And now a fifth, eighth, tenth service makes the entrepreneur's work easier, but users transfer data between these cloud services manually. The work turns into a nightmare.<\/p>\n<p>The obvious solution is to give users the ability to transfer data between cloud services. For example, importing and exporting data as files that can then be uploaded to the required service. Files are usually modified to fit the format of each service. This is more or less simple manual work, but as the number of these services grows, it becomes increasingly difficult to manage.<\/p>\n<p>Therefore, the next step is the API. With it, the cloud service benefits from connecting multiple services at a single point. The emergence of such an ecosystem attracts new clients with additional opportunities. A product with new functionality becomes more profitable and useful.<\/p>\n<p>If you create your own APIs, it attracts third-party sellers in the form of programmers who learn about your product through the API. They start building solutions based on the proposed API and earn money by automating their clients' tasks.<\/p>\n<p>The MyWarehouse accounting system is built on simple processes. The main focus is on working with primary documents, allowing for receiving and shipping goods, and generating business reports based on primary data. There is also data transfer, for instance to cloud accounting, and acquiring data from banking systems or retail outlets. We also work with online stores: receiving information about products and sending inventory data.<\/p>\n<p><img decoding=\"async\" alt=\"API-t \u00edrtunk \u2014 sz\u00e9tt\u00e9pt\u00fck az XML-t (kett\u0151)\" src=\"\/wp-content\/uploads\/2019\/05\/aefa36019217c463d2a513a9e025ebc7.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h2>A MeuArmaz\u00e9m API<\/h2>\n<p>\nA MeuArmaz\u00e9m \u00e9 uma plataforma que, ao longo de 10 anos de uso de API, acumulou diversas integra\u00e7\u00f5es que permitem a troca de dados, intera\u00e7\u00e3o com bancos, processamento de pagamentos e uso de telefonia externa.<\/p>\n<p>No primeiro ano, disponibilizamos a op\u00e7\u00e3o de exportar quaisquer dados em formato XML. Naquela \u00e9poca, os usu\u00e1rios achavam muito mais compreens\u00edvel e costumeiro manter os dados offline, em vez de em alguma nuvem, e n\u00f3s oferecemos isso. A exporta\u00e7\u00e3o era realizada manualmente a partir da interface. Portanto, n\u00e3o pod\u00edamos ainda chamar isso de API. <\/p>\n<p>Na mesma \u00e9poca, iniciamos uma colabora\u00e7\u00e3o com a empresa Rusagro \u2014 eles j\u00e1 utilizavam um ERP 'maduro' para planejamento de produ\u00e7\u00e3o e vendas, enquanto a carga dos vag\u00f5es nas f\u00e1bricas foi automatizada no MeuArmaz\u00e9m. Assim, surgiram as primeiras sementes de uma verdadeira API: a troca de dados entre nosso servi\u00e7o e o ERP ocorria atrav\u00e9s do envio de um grande arquivo contendo informa\u00e7\u00f5es sobre todos os tipos de documentos. <\/p>\n<p>Esta era uma boa op\u00e7\u00e3o para a troca de dados em lote, mas com os documentos era necess\u00e1rio tamb\u00e9m transmitir suas depend\u00eancias: informa\u00e7\u00f5es sobre produtos, contrapartes e armaz\u00e9ns. Gerar essa confus\u00e3o na exporta\u00e7\u00e3o n\u00e3o era t\u00e3o dif\u00edcil, mas analis\u00e1-la na importa\u00e7\u00e3o era bastante complicado, j\u00e1 que todos os dados chegavam em um \u00fanico pacote: informa\u00e7\u00f5es sobre novos documentos e sobre documentos j\u00e1 existentes.<\/p>\n<p>A primeira API XML n\u00e3o durou muito \u2014 ap\u00f3s dois anos, come\u00e7amos a reestrutur\u00e1-la. Desde o in\u00edcio de sua opera\u00e7\u00e3o, cometemos alguns erros na constru\u00e7\u00e3o da interface program\u00e1tica.<\/p>\n<p><img decoding=\"async\" alt=\"API-t \u00edrtunk \u2014 sz\u00e9tt\u00e9pt\u00fck az XML-t (kett\u0151)\" src=\"\/wp-content\/uploads\/2019\/05\/3f1b04d030e7fcb5add795f8fd75d92b.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>Como foi realizada a API XML: ilustra\u00e7\u00e3o de um dos nossos arquitetos. A prop\u00f3sito, fique atento aos seus artigos.<\/i><\/p>\n<p>Aqui est\u00e3o nossos principais erros:<\/p>\n<ol>\n<li>A marca\u00e7\u00e3o JAXB foi feita diretamente nos beans de entidade. Para comunica\u00e7\u00e3o com o banco de dados, usamos Hibernate, e essa mesma marca\u00e7\u00e3o JAXB foi feita nos mesmos beans. Esse erro apareceu rapidamente: qualquer atualiza\u00e7\u00e3o na estrutura de dados exigia uma notifica\u00e7\u00e3o urgente a todos que utilizavam a API, ou a constru\u00e7\u00e3o de solu\u00e7\u00f5es alternativas que garantissem a compatibilidade com a estrutura de dados anterior.<\/li>\n<li>Az API kezdetben egy kieg\u00e9sz\u00edt\u00e9sk\u00e9nt fejl\u0151d\u00f6tt, \u00e9s eredetileg nem hat\u00e1roztuk meg, hogy a term\u00e9k melyik r\u00e9sz\u00e9t k\u00e9pezi. Arra sem gondoltunk, hogy az API valami fontos lenne, hogy sz\u00fcks\u00e9g lenne a visszafel\u00e9 kompatibilit\u00e1s fenntart\u00e1s\u00e1ra az els\u0151 \u00fcgyfelei sz\u00e1m\u00e1ra. Egy id\u0151szakban az API felhaszn\u00e1l\u00f3inak sz\u00e1ma mind\u00f6ssze 5%-\u00e1t tette ki a csek\u00e9ly \u00f6sszes felhaszn\u00e1l\u00f3nak, \u00edgy r\u00e1juk nem figyelt\u00fcnk. Az egyes\u00edtett sz\u0171r\u00e9s, amit valaha k\u00e9sz\u00edtett\u00fcnk, hozz\u00e1j\u00e1rult ahhoz, hogy minket backendk\u00e9nt kezdtek haszn\u00e1lni. Ez a sz\u0171r\u00e9s egy\u00e1ltal\u00e1n nem volt GraphQL, de hasonl\u00f3 volt \u2014 sz\u00e1mos lek\u00e9rdez\u00e9si param\u00e9teren kereszt\u00fcl m\u0171k\u00f6d\u00f6tt. Ezzel a hat\u00e9kony eszk\u00f6zzel a felhaszn\u00e1l\u00f3knak neh\u00e9z volt ellen\u00e1llni, \u00e9s a lek\u00e9rdez\u00e9seik k\u00f6zvetlen\u00fcl az online boltjaik UI-j\u00e1b\u00f3l indultak. A helyzet kellemetlen meglepet\u00e9sk\u00e9nt \u00e9rkezett, mert egy ilyen szolg\u00e1ltat\u00e1s ny\u00fajt\u00e1sa m\u00e1s d\u00edjaz\u00e1st \u00e9s egy\u00e9b meg\u00e9rt\u00e9st ig\u00e9nyel az API mint term\u00e9k tekintet\u00e9ben.<\/li>\n<li>Mivel az API nem mint f\u0151 term\u00e9k fejl\u0151d\u00f6tt, az API dokument\u00e1ci\u00f3j\u00e1t a marad\u00e9keli alapelvek szerint k\u00e9sz\u00edtett\u00fck \u00e9s publik\u00e1ltuk \u2014 visszafejleszt\u00e9sen kereszt\u00fcl. Ez az \u00fat el\u00e9g egyszer\u0171nek \u00e9s k\u00e9nyelmesnek t\u0171nik, azonban ellent\u00e9tes a szerz\u0151d\u00e9ses munk\u00e1val. Ez akkor t\u00f6rt\u00e9nik, amikor van egy komponens egy el\u0151re be\u00e1ll\u00edtott m\u0171k\u00f6d\u00e9si s\u00e9m\u00e1val. A fejleszt\u0151 ennek megfelel\u0151en val\u00f3s\u00edtja meg, a komponens tesztel\u00e9sen megy kereszt\u00fcl, az \u00fcgyf\u00e9l egy olyan term\u00e9ket kap, amely megfelel az elemz\u0151 elk\u00e9pzel\u00e9s\u00e9nek. A visszafejleszt\u00e9s viszont olyan term\u00e9ket dob a piacra, amely csak egyszer\u0171en l\u00e9tezik: akad\u00e1lyokkal, furcsa megold\u00e1sokkal \u00e9s ker\u00e9kp\u00e1rokkal a sz\u00fcks\u00e9ges funkcionalit\u00e1s helyett. <\/li>\n<li>Az \u00f6sszes API-n kereszt\u00fcl \u00e9rkez\u0151 lek\u00e9rdez\u00e9s \u00e1raml\u00e1s\u00e1t legfeljebb az Nginx vagy az alkalmaz\u00e1s szerver napl\u00f3jak\u00e9nt lehetett elemezni. Ez nem tette lehet\u0151v\u00e9 a szakter\u00fcletek kiemel\u00e9s\u00e9t, csak a felhaszn\u00e1l\u00f3k \u00e9s el\u0151fizet\u0151k szerinti bont\u00e1st. Ha nincs lehet\u0151s\u00e9g az alkalmaz\u00e1sok vagy \u00fcgyfelek regisztr\u00e1l\u00e1s\u00e1nak szab\u00e1lyoz\u00e1s\u00e1ra, lehetetlenn\u00e9 v\u00e1lik a helyzet elemz\u00e9se. Ez a probl\u00e9ma legkev\u00e9sb\u00e9 befoly\u00e1solta az API fejl\u0151d\u00e9s\u00e9t, ink\u00e1bb a kereslet\u00e9nek \u00e9s funkci\u00f3inak meg\u00e9rt\u00e9s\u00e9r\u0151l sz\u00f3l.<\/li>\n<\/ol>\n<p><\/p>\n<h2>A m\u00e1sodik k\u00eds\u00e9rlet: REST API<\/h2>\n<p>\n2010-ben pr\u00f3b\u00e1ltunk egy online k\u00f6nyvel\u0151 rendszerrel, a BuhSofttal, adatcser\u00e9l\u0151 rendszert \u00e9p\u00edteni. Ez nem siker\u00fclt. Viszont az integr\u00e1ci\u00f3s folyamat sor\u00e1n megjelent egy teljes funkcionalit\u00e1s\u00fa API: egy REST-alap\u00fa adatcser\u00e9l\u0151 szolg\u00e1ltat\u00e1s, amelyben nem voltak liber\u00e1lis megk\u00f6zel\u00edt\u00e9sek, mint a RPC h\u00edv\u00e1sok. Az API-val val\u00f3 kommunik\u00e1ci\u00f3t a REST szabv\u00e1nyos m\u00f3dj\u00e1ra hoztuk, ahol a k\u00e9r\u00e9s sor\u00e1ban a l\u00e9nyeg nev\u00e9t adjuk meg, m\u00edg a v\u00e9grehajtott m\u0171veletet az http-m\u00f3dszer hat\u00e1rozza meg. Bevezett\u00fck a sz\u0171r\u00e9st a l\u00e9nyek friss\u00edt\u00e9si ideje alapj\u00e1n, \u00edgy a felhaszn\u00e1l\u00f3knak lehet\u0151s\u00e9g\u00fck ny\u00edlt a saj\u00e1t rendszereikkel val\u00f3 replik\u00e1ci\u00f3ra.<\/p>\n<p>Ugyanebben az \u00e9vben megjelent az API a rakt\u00e1ri \u00e9s term\u00e9k\u00e1llom\u00e1nyok export\u00e1l\u00e1s\u00e1ra. A felhaszn\u00e1l\u00f3k sz\u00e1m\u00e1ra hozz\u00e1f\u00e9rhet\u0151v\u00e9 v\u00e1ltak az API-n kereszt\u00fcl a rendszer leg\u00e9rt\u00e9kesebb r\u00e9szei \u2014 a primer dokumentumok cser\u00e9je \u00e9s a k\u00e9szlet- \u00e9s \u00f6nk\u00f6lts\u00e9gadatok sz\u00e1m\u00edt\u00e1sa.<\/p>\n<p>2015 december\u00e9ben a RetailCRM k\u00f6zz\u00e9tette az els\u0151 k\u00fcls\u0151 k\u00f6nyvt\u00e1rat, amely hozz\u00e1f\u00e9r\u00e9st biztos\u00edtott az API-nkhoz. Ezt meglehet\u0151sen akt\u00edvan haszn\u00e1lt\u00e1k, mik\u00f6zben n\u00f6vekedett a szolg\u00e1ltat\u00e1s n\u00e9pszer\u0171s\u00e9ge is, \u00e9s az API terhel\u00e9se gyorsabban n\u0151tt, mint a webes fel\u00fclet terhel\u00e9se. Egyszer csak a n\u00f6veked\u00e9s ugr\u00e1ss\u00e1 v\u00e1ltozott. <\/p>\n<p><img decoding=\"async\" alt=\"API-t \u00edrtunk \u2014 sz\u00e9tt\u00e9pt\u00fck az XML-t (kett\u0151)\" src=\"\/wp-content\/uploads\/2019\/05\/86b289455db8a13f5583cd4eeb377970.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n<img decoding=\"async\" alt=\"API-t \u00edrtunk \u2014 sz\u00e9tt\u00e9pt\u00fck az XML-t (kett\u0151)\" src=\"\/wp-content\/uploads\/2019\/05\/da221a6a122ff6d15bcbf9ea09758727.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u00c9s ez az ugr\u00e1s, amelyet a bal oldalon mutat\u00f3 ny\u00edl jelez, teljes megd\u00f6bben\u00e9st okozott a mi API-nkat kiszolg\u00e1l\u00f3 szervernek. Egy h\u00e9tig pr\u00f3b\u00e1ltuk kider\u00edteni, hogy ez a terhel\u00e9s pontosan mit gener\u00e1l. Kider\u00fclt, hogy ezek azok a lek\u00e9rdez\u00e9sek, amelyeket az \u00fcgyfelek front-endjei transzferek az API-nkra. K\u00f6r\u00fclbel\u00fcl 50 \u00fcgyf\u00e9l fogyasztotta el az \u00f6sszes er\u0151forr\u00e1st. Ekkor meg\u00e9rtett\u00fck egyik hib\u00e1nkat \u2014 a teljesen hi\u00e1nyz\u00f3 korl\u00e1tokat. <\/p>\n<p>V\u00e9g\u00fcl bevezett\u00fck a korl\u00e1tot a p\u00e1rhuzamos lek\u00e9rdez\u00e9sek sz\u00e1m\u00e1ra. Egy fi\u00f3kb\u00f3l legfeljebb k\u00e9t lek\u00e9rdez\u00e9st lehetett egyszerre megnyitni. Ez elegend\u0151 volt a replik\u00e1ci\u00f3s m\u00f3dban val\u00f3 munk\u00e1hoz az adatok csomagolt cser\u00e9j\u00e9re. Azok sz\u00e1m\u00e1ra, akik minket backendk\u00e9nt k\u00edv\u00e1ntak haszn\u00e1lni, az\u00f3ta t\u00f6bbet kellett igazodniuk a tarif\u00e1khoz, mivel t\u00f6bb fi\u00f3k haszn\u00e1lat\u00e1ra is k\u00f6telez\u0151v\u00e9 tett\u00fck a programjaikban.<\/p>\n<h2>Rendet rakunk<\/h2>\n<p>\nM\u00e1r 2014 \u00f3ta a megl\u00e9v\u0151 API ir\u00e1nti kereslet a v\u00e1llalkoz\u00e1s fontos r\u00e9sz\u00e9v\u00e9 v\u00e1lt, \u00e9s maga az API gener\u00e1lta a legnagyobb adatforgalmat az \u00fcgyfelekkel val\u00f3 adatcser\u00e9ben. 2015-ben elind\u00edtottuk az API rendez\u00e9s\u00e9re ir\u00e1nyul\u00f3 projektet. A JSON form\u00e1tumot v\u00e1lasztottuk az XML helyett, \u00e9s azt az el\u0151z\u0151 verzi\u00f3 megval\u00f3s\u00edt\u00e1sa sor\u00e1n felt\u00e1rt jellemz\u0151k alapj\u00e1n kezdt\u00fck el fel\u00e9p\u00edteni:<\/p>\n<ol>\n<li>Verzi\u00f3kezel\u00e9si lehet\u0151s\u00e9g. A verzi\u00f3kezel\u00e9s lehet\u0151v\u00e9 teszi \u00faj verzi\u00f3k fejleszt\u00e9s\u00e9t an\u00e9lk\u00fcl, hogy az aktu\u00e1lis alkalmaz\u00e1st \u00e9rinten\u00e9, \u00e9s ne zavarja a felhaszn\u00e1l\u00f3k munk\u00e1j\u00e1t. <\/li>\n<li>A felhaszn\u00e1l\u00f3 lehet\u0151s\u00e9ge, hogy l\u00e1ssa a metaadatokat a kapott v\u00e1laszban.<\/li>\n<li>Nagy dokumentumok cser\u00e9j\u00e9nek lehet\u0151s\u00e9ge. Ha egy dokumentumot t\u00f6bb mint 4-5 ezer t\u00e9telnyi poz\u00edci\u00f3val dolgozunk fel, az probl\u00e9m\u00e1t jelent a szervernek: hosszan tart\u00f3 tranzakci\u00f3, hossz\u00fa http-k\u00e9r\u00e9s. Kifejlesztett\u00fcnk egy speci\u00e1lis mechanizmust, amely lehet\u0151v\u00e9 teszi a dokumentum darabokban val\u00f3 friss\u00edt\u00e9s\u00e9t \u00e9s a dokumentum egyes poz\u00edci\u00f3inak kezel\u00e9s\u00e9t, amelyek a szerverre k\u00fcldhet\u0151k.<\/li>\n<li>Replik\u00e1ci\u00f3s eszk\u00f6z\u00f6k \u2014 ezek m\u00e1r a kor\u00e1bbi verzi\u00f3ban is jelen voltak.<\/li>\n<li>Terhel\u00e9si korl\u00e1tok \u2014 mint az el\u0151z\u0151 verzi\u00f3ba hiba k\u00f6vetkezm\u00e9nyek\u00e9nt. Bevezett\u00fck a k\u00e9rd\u00e9sek sz\u00e1m\u00e1nak, p\u00e1rhuzamos k\u00e9r\u00e9sek sz\u00e1m\u00e1nak \u00e9s egy ip-c\u00edmr\u0151l \u00e9rkez\u0151 k\u00e9r\u00e9sek sz\u00e1m\u00e1nak korl\u00e1toz\u00e1s\u00e1t.<\/li>\n<\/ol>\n<p>\nAz\u00f3ta k\u00e9t kisebb API verzi\u00f3t adtunk ki, \u00e9s n\u00e9h\u00e1ny speci\u00e1lis API-t ind\u00edtottunk, de a megk\u00f6zel\u00edt\u00e9s \u00e1ltal\u00e1ban v\u00e1ltozatlan maradt. A friss\u00edtett adatcsere-form\u00e1tum \u00e9s az \u00faj architekt\u00fara lehet\u0151v\u00e9 tette a hib\u00e1k gyorsabb jav\u00edt\u00e1s\u00e1t az API-ban.<\/p>\n<h2>A M\u00f3dszerek API-ja ma<\/h2>\n<p>\nA M\u00f3dszerek API-ja ma sz\u00e1mos feladatot ell\u00e1t:<\/p>\n<ul>\n<li>adatcsere internetes boltakkal, k\u00f6nyvel\u0151 rendszerekkel, bankokkal;<\/li>\n<li>sz\u00e1m\u00edtott adatok, jelent\u00e9sek beszerz\u00e9se;<\/li>\n<li>backendk\u00e9nt val\u00f3 haszn\u00e1lat kliensalkalmaz\u00e1sok sz\u00e1m\u00e1ra \u2014 mobil alkalmaz\u00e1saink \u00e9s desktop p\u00e9nzt\u00e1rg\u00e9p\u00fcnk az API-n kereszt\u00fcl m\u0171k\u00f6dik<\/li>\n<li>\u00e9rtes\u00edt\u00e9sek k\u00fcld\u00e9se a M\u00f3dszerekben v\u00e9grehajtott adatv\u00e1ltoz\u00e1sokr\u00f3l \u2014 webhooks;<\/li>\n<li>telefon\u00e1l\u00e1s;<\/li>\n<li>lojalit\u00e1si rendszerek.<\/li>\n<\/ul>\n<p>\nAPI-ink alapj\u00e1n a vez\u00e9rigazgat\u00f3nk, Askar Rakhimberdiev <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/rhino\/\" class=\"user_link\">rhino<\/a><\/noindex> n\u00e9gy \u00f3ra alatt meg\u00edrta a telegram-botot, amely az API-n kereszt\u00fcl a k\u00e9szleteket szerzi be: <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/arahimberdiev\/com-lognex-telegram-moysklad-stock\">github.com\/arahimberdiev\/com-lognex-telegram-moysklad-stock<\/a><\/noindex><\/p>\n<p>Most j\u00f6jjenek a sz\u00e1raz sz\u00e1mok. <\/p>\n<p>\u00cdme a statisztik\u00e1nk a r\u00e9gi REST API-val kapcsolatban:<\/p>\n<ul>\n<li>400 c\u00e9g;<\/li>\n<li>600 felhaszn\u00e1l\u00f3;<\/li>\n<li>2 milli\u00f3 napi k\u00e9r\u00e9s;<\/li>\n<li>200 GB\/nap kimen\u0151 forgalom.<\/li>\n<\/ul>\n<p>\n\u00cdme a c\u00e9lra, amit el\u00e9rt\u00fcnk a M\u00f3dszerek \u00f6sszes API-j\u00e1val:<\/p>\n<ul>\n<li>t\u00f6bb mint 70 integr\u00e1ci\u00f3 (egyeseket itt meg lehet n\u00e9zni <noindex><a rel=\"nofollow\" href=\"https:\/\/www.moysklad.ru\/integratsii\/\">www.moysklad.ru\/integratsii<\/a><\/noindex>);<\/li>\n<li>8500 c\u00e9g;<\/li>\n<li>12 000 felhaszn\u00e1l\u00f3;<\/li>\n<li>46 milli\u00f3 napi k\u00e9r\u00e9s;<\/li>\n<li>2 TB\/nap kimen\u0151 forgalom.<\/li>\n<\/ul>\n<p><\/p>\n<h2>Mi k\u00f6vetkezik<\/h2>\n<p>\nAz API-fejleszt\u00e9si tervek akt\u00edvvit\u00e1k alatt \u00e1llnak. Igyeksz\u00fcnk figyelembe venni a felhaszn\u00e1l\u00f3ink tapasztalatait. Nem mindig \u00e9s nem minden azonnal megval\u00f3s\u00edthat\u00f3, de nincs messze egy \u00faj API-verzi\u00f3, amely k\u00e9nyelmesebb metaadatokat \u00e9s egyszer\u0171bb strukt\u00far\u00e1t k\u00edn\u00e1l, OAuth-ot az autentik\u00e1ci\u00f3hoz, valamint API-t be\u00e1gyazott alkalmaz\u00e1sokhoz. <\/p>\n<p>A h\u00edrekr\u0151l egy k\u00fcl\u00f6n oldalr\u00f3l t\u00e1j\u00e9koz\u00f3dhatsz, amely a MojSklad integr\u00e1ci\u00f3s fejleszt\u0151k sz\u00e1m\u00e1ra k\u00e9sz\u00fclt: <noindex><a rel=\"nofollow\" href=\"https:\/\/dev.moysklad.ru\">dev.moysklad.ru<\/a><\/noindex>.<br \/>\n<br \/>Forr\u00e1s: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/moysklad\/blog\/453136\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0435\u0440\u0432\u044b\u0439 API \u041c\u043e\u0435\u0433\u043e\u0421\u043a\u043b\u0430\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f 10 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434. \u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0434 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 API \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435. \u0410 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 API \u0443\u0436\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u043f\u043e\u0445\u043e\u0440\u043e\u043d\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e: \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 API, \u0437\u0430\u0447\u0435\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u043c\u044b \u0443\u0441\u043f\u0435\u043b\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0438 \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435. \u041c\u0435\u043d\u044f [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":25898,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-34354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0435\u0440\u0432\u044b\u0439 API \u041c\u043e\u0435\u0433\u043e\u0421\u043a\u043b\u0430\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f 10 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434. \u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0434 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 API \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435. \u0410 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 API \u0443\u0436\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u043f\u043e\u0445\u043e\u0440\u043e\u043d\u0438\u0442\u044c.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/pisali-api-porvali-xml-dva\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"hu_HU\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041f\u0438\u0441\u0430\u043b\u0438 API \u2014 \u043f\u043e\u0440\u0432\u0430\u043b\u0438 XML (\u0434\u0432\u0430) | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0435\u0440\u0432\u044b\u0439 API \u041c\u043e\u0435\u0433\u043e\u0421\u043a\u043b\u0430\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f 10 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434. \u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0434 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 API \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435. \u0410 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 API \u0443\u0436\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u043f\u043e\u0445\u043e\u0440\u043e\u043d\u0438\u0442\u044c.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/pisali-api-porvali-xml-dva\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:57:51+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:57:51+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47\u00cdrtunk API-t \u2014 sz\u00e9tszedt\u00fck az XML-t (kett\u0151) | ProHoster","description":"A MyWarehouse API appeared 10 years ago. All this time we have been working on existing versions of the API and developing new ones. And several versions of the API have already been retired.","canonical_url":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/pisali-api-porvali-xml-dva","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"hu_HU","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041f\u0438\u0441\u0430\u043b\u0438 API \u2014 \u043f\u043e\u0440\u0432\u0430\u043b\u0438 XML (\u0434\u0432\u0430) | ProHoster","og:description":"\u041f\u0435\u0440\u0432\u044b\u0439 API \u041c\u043e\u0435\u0433\u043e\u0421\u043a\u043b\u0430\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f 10 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434. \u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043d\u0430\u0434 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 API \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435. \u0410 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0439 API \u0443\u0436\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u043f\u043e\u0445\u043e\u0440\u043e\u043d\u0438\u0442\u044c.","og:url":"https:\/\/prohoster.info\/hu\/blog\/administrirovanie\/pisali-api-porvali-xml-dva","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:57:51+00:00","article:modified_time":"2019-10-31T18:57:51+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"34354","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 18:52:24","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:23:17","updated":"2026-01-21 18:52:24","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/34354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/comments?post=34354"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/34354\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media\/25898"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media?parent=34354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/categories?post=34354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/tags?post=34354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}