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

CurrentInvoiceLine_CreateFromDataArray: Encoding: object has no 'Number' property


Gives me an error: SOAP-ERROR: Encoding: object has no 'Number' property

$bookinvoice = $client->CurrentInvoiceLine_CreateFromDataArray(
                            array('dataArray' =>
                                            'CurrentInvoiceLineData' => array (
                                            'Handle'    => array('Id' => $invoiceId), // user's unique ID
                                            'Number' => 1, // Is it invoice ID???
                                            'DeliveryDate' => date("c"),
                                            'Quantity' => 1.00,
                                            'UnitNetPrice' => $project->goal,
                                            'DiscountAsPercent' => 0.00,
                                            'TotalNetAmount' => $project->goal,
                                            'TotalMargin' => 20.00, //  
                                            'MarginAsPercent' => $marginaspercent


I have  (from function CurrentInvoice_CreateFromDataArray)

$invoiceId = $createinvoice->CurrentInvoiceHandle->Id;


QUESTION: where in this code for CurrentInvoiceLine_CreateFromDataArray abowe my $invoiceId ?

Why I am receiving SOAP-ERROR: Encoding: object has no 'Number' property?

But I added all fields which are required according to this documentation
(including Number, which  received from function CurrentInvoice_CreateFromDataArray)



MinOccurs means required, is that correct?

Maybe I am using wrong documentation? Do you think you could could
provide me link to correct version of documentation?

created Dec 21, 2015 by webmat
0% Accept Rate
Q 6 A 0 C 1

1 Answer


MinOccurs 1 is rather useless. It can help identify WSDL requirements but tells you nothing about application specific requirements.

You should go for the human readable documentation: https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=CurrentInvoiceLine_CreateFromData

XML structure as described on above link.



answered Dec 21, 2015 by olej
Visma e-conomic A/S