API Module Financial searchInvoiceResellerRequest

From Openprovider API documentation

(Difference between revisions)
Jump to: navigation, search
(Created page with '==Module Reseller > Search Invoices== {| border="1" cellpadding="4" |- style="background-color:#BBBBBB;" |'''Module''' |reseller |- style="background-color:#EEEEEE;" |'''Command …')
(Module Reseller > Search Invoices)
 
(7 intermediate revisions not shown)
Line 13: Line 13:
|'''Input'''
|'''Input'''
|
|
-
*startCreationDate ''format: yyyy-mm-dd''
+
*[[API Format Limit|limit]] (''default value: 100, maximum value: 1000'')
-
*endCreationDate ''format: yyyy-mm-dd''
+
*[[API Format Offset|offset]] (''default value: 0'')
 +
*startCreationDate (''format: yyyy-mm-dd'')
 +
*endCreationDate (''format: yyyy-mm-dd'')
|- style="vertical-align:top;"
|- style="vertical-align:top;"
|'''Output'''
|'''Output'''
Line 21: Line 23:
*creationDate
*creationDate
*invoiceNumber
*invoiceNumber
-
*fileUrl ''cannot be used outside RCP''
+
*invoiceUrl (''cannot be used outside reseller control panel'')
 +
*attachmentUrl (''cannot be used outside reseller control panel'')
|}
|}
Line 35: Line 38:
===Raw XML===
===Raw XML===
 +
''Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.''
  <?xml version="1.0" encoding="UTF-8"?>
  <?xml version="1.0" encoding="UTF-8"?>
  <openXML>
  <openXML>
Line 50: Line 54:
  <openXML>
  <openXML>
   <reply>
   <reply>
-
     < code>0</code>
+
     <nowiki><code>0</code></nowiki>
     <desc />
     <desc />
     <data>
     <data>
Line 68: Line 72:
               </reseller>
               </reseller>
             </amount>
             </amount>
-
             <fileUrl>http://rest.openprovider.eu/invoice/OP123482?token=</fileUrl>
+
             <invoiceUrl>http://rest.openprovider.eu/invoice/OP123482?token=</invoiceUrl>
 +
            <attachmentUrl>http://rest.openprovider.eu/attachment/OP123482?token=</attachmentUrl>
           </item>
           </item>
           <item>
           <item>
Line 83: Line 88:
               </reseller>
               </reseller>
             </amount>
             </amount>
-
             <fileUrl>http://rest.openprovider.eu/invoice/OP123483?token=</fileUrl>
+
             <invoiceUrl>http://rest.openprovider.eu/invoice/OP123483?token=</invoiceUrl>
 +
            <attachmentUrl>http://rest.openprovider.eu/attachment/OP123483?token=</attachmentUrl>
           </item>
           </item>
           <item>
           <item>
Line 98: Line 104:
               </reseller>
               </reseller>
             </amount>
             </amount>
-
             <fileUrl>http://rest.openprovider.eu/invoice/OP123484?token=</fileUrl>
+
             <invoiceUrl>http://rest.openprovider.eu/invoice/OP123484?token=</invoiceUrl>
 +
            <attachmentUrl>http://rest.openprovider.eu/attachment/OP123484?token=</attachmentUrl>
           </item>
           </item>
         </array>
         </array>

Current revision as of 11:15, 17 June 2016

Contents

Module Reseller > Search Invoices

Module reseller
Command name searchInvoiceResellerRequest
Use Retrieves a list of invoices from your reseller account
Input
  • limit (default value: 100, maximum value: 1000)
  • offset (default value: 0)
  • startCreationDate (format: yyyy-mm-dd)
  • endCreationDate (format: yyyy-mm-dd)
Output
  • amount
  • creationDate
  • invoiceNumber
  • invoiceUrl (cannot be used outside reseller control panel)
  • attachmentUrl (cannot be used outside reseller control panel)

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('searchInvoiceResellerRequest')
  ->setAuth(array('username' => 'username', 'password' => 'password'))
  ->setArgs(array(
    'startCreationDate' => '2010-01-01',
    'endCreationDate' => '2010-03-31'
  ));

Raw XML

Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.

<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <credentials>
    <username>username</username>
    <password>password</password>
  </credentials>
  <searchInvoiceResellerRequest>
    <startCreationDate>2010-01-01</startCreationDate>
    <endCreationDate>2010-03-31</endCreationDate>
  </searchInvoiceResellerRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    <code>0</code>
    <desc />
    <data>
      <results>
        <array>
          <item>
            <creationDate>2010-01-31 00:00:00</creationDate>
            <invoiceNumber>OP123482</invoiceNumber>
            <amount>
              <product>
                <price>259.90</price>
                <currency>EUR</currency>
              </product>
              <reseller>
                <price>259.90</price>
                <currency>EUR</currency>
              </reseller>
            </amount>
            <invoiceUrl>http://rest.openprovider.eu/invoice/OP123482?token=</invoiceUrl>
            <attachmentUrl>http://rest.openprovider.eu/attachment/OP123482?token=</attachmentUrl>
          </item>
          <item>
            <creationDate>2010-02-28 00:00:00</creationDate>
            <invoiceNumber>OP123483</invoiceNumber>
            <amount>
              <product>
                <price>204.20</price>
                <currency>EUR</currency>
              </product>
              <reseller>
                <price>204.20</price>
                <currency>EUR</currency>
              </reseller>
            </amount>
            <invoiceUrl>http://rest.openprovider.eu/invoice/OP123483?token=</invoiceUrl>
            <attachmentUrl>http://rest.openprovider.eu/attachment/OP123483?token=</attachmentUrl>
          </item>
          <item>
            <creationDate>2010-03-31 00:00:00</creationDate>
            <invoiceNumber>OP123484</invoiceNumber>
            <amount>
              <product>
                <price>225.92</price>
                <currency>EUR</currency>
              </product>
              <reseller>
                <price>225.92</price>
                <currency>EUR</currency>
              </reseller>
            </amount>
            <invoiceUrl>http://rest.openprovider.eu/invoice/OP123484?token=</invoiceUrl>
            <attachmentUrl>http://rest.openprovider.eu/attachment/OP123484?token=</attachmentUrl>
          </item>
        </array>
      </results>
      <total>3</total>
    </data>
  </reply>
</openXML>
Views
Personal tools