API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

how to create a new debtor using api


i want to create a new debtor in an existing debtor group using Debtor_CreateFromData() method

i am using the soap client web service following  https://www.e-conomic.com/secure/api1/economicwebservice.asmx

but getting the error,

Economic.Api.Exceptions.IntegrityException(E06000): The template collection '0' does not exist

the data array passed is as:

  "Number" => "729",
 "Name" => "Sumit",
  "VatZone" => "HomeCountry",
  "ExtendedVatZone" => array("Number"=>"1"),
   "CurrencyHandle" =>array("Code"=>"DKK"),
    "PriceGroupHandle" => array("Number"=>""),
     "IsAccessible" => "1",
      "Ean" => "",
       "PublicEntryNumber" => "",
           "Email" => "sumit@hotmail.com",
     "TelephoneAndFaxNumber" => "8950376652",
      "Website" => "http://www.g29technology.com",
      "Address" => "sco 76 mugal canal",
       "PostalCode" => "132001",
        "City" => "Karnal",
       "Country" => "India",
         "CreditMaximum" => "2000",
          "VatNumber" => "",
                 "County" => "Haryana",
                  "CINumber" =>"",
                 "TermOfPaymentHandle" => array("Id"=>"2"),
                   "LayoutHandle" =>array("Id"=>""),
                     "AttentionHandle" =>array("Id"=>""),
                     "YourReferenceHandle" =>array("Id"=>""),
                     "OurReferenceHandle" => array("Number"=>""),
        "Balance" => "29000"

please also help me if any other way of creating a debtor
created Apr 7, 2015 by manishkvaish
0% Accept Rate
Q 1 A 0 C 0

1 Answer

Hi Manish,

The error states that you have not defined a layout handle. The error message is misleading as we use two different names for layout, the other one being template collection.

You can find a list of layout handles by calling TemplateCollection_GetAll.

I hope that helps,
Rasmus Beck
Developer, e-conomic
answered Apr 9, 2015 by rbb
Visma e-conomic A/S