Difference between revisions of "MOR API invoices get"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 8: Line 8:


Here:
Here:
* username/password - of the user who is asking for the invoices. If user has 'admin' rights - he will get all invoices from selected period, if user has 'user' rights - he will get only his invoices in selected period.
* from/till - time period for invoices in [http://en.wikipedia.org/wiki/Unix_time Unix Epoch Time] format. Invoice's '''period start''' should be >= '''from''' and '''period end''' <= '''till'''.
* from/till - time period for invoices in [http://en.wikipedia.org/wiki/Unix_time Unix Epoch Time] format. Invoice's '''period start''' should be >= '''from''' and '''period end''' <= '''till'''.
** http://www.epochconverter.com/ can help to convert time for testing
** http://www.epochconverter.com/ can help to convert time for testing

Revision as of 14:37, 17 January 2008

MOR API

Retrieves list of invoices in selected time period.

Request

HTML POST: http://<SERVER IP>/mor/api/invoices?u=username&p=password&from=1188604800&till=1191196799&lang=en

Here:

  • from/till - time period for invoices in Unix Epoch Time format. Invoice's period start should be >= from and period end <= till.
  • lang - choose in which language do you want to get invoice details (mainly 'Calls').

Example result

<Invoices from="2007-09-01" till="2007-10-01">
 <Invoice agreementnumber="0000000000" user_id="0" clientid="240887380">
   <Product>
     <Name>Monthly fee - test</Name>
     <Quantity></Quantity>
     <Price>10.0</Price>
   </Product>
 </Invoice>
 <Invoice agreementnumber="0000000000" user_id="0" clientid="240887380">
   <Product>
     <Name>Calls</Name>
     <Quantity>65</Quantity>
     <Price>112.3324</Price>
   </Product>
 </Invoice>
</Invoices>

Errors

<Error>user not found</Error>
<Error>no invoices found</Error>