Connecting to the prom.ua API from 1C 7.7
Need a script (since internal tools of 1C do not work) that will deliver an import file via API to the Prom.ua website. There is a script I wrote, but it does not work, maybe you will find the error:
Function ImportProductsPromUaViaScript(AuthorizationToken, PathToXLSXFile, ImportSettings)
Dim WshShell, Command, ExecutionResult;
// Path to VBScript file
// Make sure that import_prom.vbs is located in an accessible place,
// or specify its full path.
If FSO.FileExists(DirectoryB() + "import_prom.vbs") = 1 Then
PathToScript = DirectoryB() + "import_prom.vbs"; // Change to the actual path!
Else
MsgBox("Script not found " + DirectoryB() + "import_prom.vbs");
Return 0;
EndIf;
// Escape quotes in JSON string for command line
// (replace " with \\" or "")
EscapedSettings = StrReplace(ImportSettings, """", "\\\"");
// Form the command to run VBScript
// Use cscript.exe for console output
Command = "cscript.exe //NoLogo \"" + PathToScript + "\" \"" + AuthorizationToken + "\" \"" + PathToXLSXFile + "\" \"" + EscapedSettings + "\"";
Try
WshShell = CreateObject("WScript.Shell");
// Run the script and wait for it to finish
// 0 - window hidden, True - wait for completion
ExecutionResult = WshShell.Run(Command, 0, 1);
// If the script outputs result to WScript.Echo,
// then it needs to be redirected to a file or stdout so 1C can read it.
// Usually, to get output, redirect it to a temporary file
// or run the script with PowerShell, which can capture stdout.
// Simple option: do not get output, only check the exit code.
// If you need server response, VBScript should write it to a file.
If ExecutionResult = 0 Then // Usually 0 indicates success
Return "Import script completed successfully (code: " + ExecutionResult + ").";
Else
Return "Import script finished with an error (code: " + ExecutionResult + "). Check the script logs.";
EndIf;
Catch
MsgBox("Error running external script: " + ErrorDescription());
Return "";
EndTry;
EndFunction
Procedure ExampleImport() Export
Dim Token, PathToFile, Settings, Result;
PathToFile = "D:\Obmen\Import_Prom.xlsx";
Token = STrim(Constance.TokenProm);
Settings = "{ "force_update": false, "only_available": false, "mark_missing_product_as": "none", "updated_fields": [ "price", "presence", "name", "sku", "images_urls", "quantity_in_stock", "description", "group", "keywords", "attributes", "discount", "labels", "gtin", "mpn", "translations" ] }";
Result = ImportProductsPromUaViaScript(Token, PathToFile, Settings);
MsgBox(Result);
EndProcedure
Client's review of cooperation with freelancer
Connecting to the prom.ua API from 1C 7.7Very professional, fast, high quality!
Freelancer's review of cooperation with Oleksii Kovalsky
Connecting to the prom.ua API from 1C 7.7Everything is great, a good client
![]()
-
475 2 0 Hello! Ready to discuss.
https://smate1.github.io/ink.design/
https://smate1.github.io/PanterEx/
https://smate1.github.io/stay_safe/
https://smate1.github.io/avg/
Current freelance projects in the category Data Parsing
Research of the premium segment in KyivResearch of the premium segment in Kyiv It is necessary to search for open public communication channels with representatives of the premium segment in Kyiv. What needs to be collected: openly published email or phone number for contact, if it is posted in a public source. Who… Data Parsing, Information Gathering ∙ 3 hours 27 minutes back ∙ 7 proposals |
A specialist in Telegram promotion is required.
29 USD
Tasks: invite real users from the username database to new chats and send messages to the target database. Only quality traffic and work with a live audience are of interest — performers using bots, fake engagement, or low-quality methods are requested NOT TO DISTURB. Work… Data Parsing, Social Media Marketing (SMM) ∙ 2 days 21 hours back ∙ 8 proposals |
Collection of B2B database of companies in Germany
40 USD
Goal: To obtain a list of potential employers (clients) for B2B mailing. Region: Munich (München) + radius of 50 km. Required niches: Construction companies (Bauunternehmen) Food enterprises (Lebensmittelhersteller, meat processing plants, bakeries) Logistics and… Data Parsing, Lead Generation & Sales ∙ 3 days back ∙ 33 proposals |
Consultation on parsing Instagram account subscribersHello. It is necessary to conduct a preliminary assessment of the feasibility of the following task. I have a list of Instagram accounts. The goal is to obtain contact information (primarily email addresses) of users who follow these accounts. Previously, I encountered companies… Data Parsing ∙ 6 days 16 hours back ∙ 13 proposals |
A specialist is needed to find contacts of decision-makers in Ukraine.It is necessary to gather a database (or ready database) of contacts of decision-makers (DMs) in companies in Ukraine. Information Gathering, Data Parsing ∙ 6 days 21 hours back ∙ 20 proposals |