function invoice.getdetails

** page under construction **

Fetches the details of an invoice.

Arguments:

argrequired?syntaxinfo
invoiceIDYposintinvoiceID of invoice, as returned by invoice.create or invoice.list
custIDNposintcustID of account that the invoice was raised on (default is your own account)
formattedNbooleanif evaluates to true, an additional "formatted" array element is returned; this which contains formatted invoice layouts ready for output

Example

Perl example request:

POST https://live.apicontrol.co.uk/1/json
my $api = new CCclient($u, $p, $live); # this must be logging in to the parent account of the one being invoiced
my $items =
  [
    {
      'price' =>'3.23',
      'text' => 'Some bits',
    },
    {
      'price'=>'9.95',
      'domain'=>'mystuff.com',
      'datefrom'=>'2009-01-01',
      'dateto'=>'2009-12-31'
    },
  ];

my %invargs =
  (
    'invoicerID' => $api->custID,
    'custID' => 16526,
    'invoicer_company' => 'skycom',
    'ignore_credit_limit' => 1,
    'items' => $items,
    'address' =>
      {
        'contactname' => 'Mr Test',
        'companyname' => 'Tinkly Ltd',
        'addr1' => '81 Fothering Street',
        'addr2' => 'Tinkleton',
        'postcode' => 'N1 8QT',
        'email'=>'mrtest@mailme.tickles.org',
      },
  );


my $res = $api->invoice_create(%invargs);

XML example request:

POST https://live.apicontrol.co.uk/1/json

The response includes the following information:

Perl example response:

{
  'success' => '1',
  'vat' => '1.97',
  'payment_due' => '2009-07-20',
  'subtotal' => '13.18',
  'total' => '15.15',
  'errordiags' => '',
  'textID' => '201046',
  'invnum' => '127762',
  'error' => undef,
  'invoiceID' => '108239',
  'errornum' => '',
  'seq' => '34',
  'oldbalancepence' => '-2006',
  'results' => []
};

XML example response: