If you have any question left, please drop a note with the discussion link of this page.

REST V2009-05-01 Payments

From Wiki.zanox.com

Jump to: navigation, search

Products
  GET: Retrieving a single product item
  GET: Retrieving all product items by advertiser program
  GET: Contextual Product Search
Admedia
  GET: Retrieving a single admedium item
  GET: Retrieving a list of admedia items
  GET: Retrieving admedia categories
Programs
  GET: Retrieving a single program item
  GET: Retrieving all program items
  GET: Programsearch
  GET: Retrieving programs for a given category
  GET: Returns the last 20 advertiser program news
  GET: Returns all available program categories
  GET: Returns all programs for a specified user adspace
  POST: Creating a new program application
  DELETE: Deleting an existing program application
Reports
  GET: Retrieving a single sale item
  GET: Retrieving a single lead item
  GET: Retrieving all sale items
  GET: Retrieving all lead items
  GET: Retrieving aggregated report
Payments
  GET: Retrieving all payment items
  GET: Retrieving a single payment item
  GET: Retrieving all balance items
  GET: Retrieving a single balance item
  GET: Retrieving all account items
  GET: Retrieving a single account item
Adspaces
  GET: Retrieving a single adspace item
  GET: Retrieving all adspace items related to the user
  POST: Creating a new advertising space
  PUT: Updating properties of an advertising space
  DELETE: Removing an advertising space
Profiles
  GET: Retrieve the user profile
  PUT: Update the user profile

The payments RESTFul API resource enables the retrieval of the payment history of a publisher account.

Contents

GET: Retrieving all payment items

Parameters

applicationId mandatory only header parameter! applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory only header parameter! timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory only header parameter! signature is required for authorization to eliminate any possibility of data abuse.
items optional query parameter number of items in the result set [1..n] (default = 10; maximum = 50)
page optional query parameter page position [0..n] (default: 0)
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/payments
 
// REST JSON
http://api.zanox.com/json/payments

// REST XML using Header Authorization
GET /payments HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282


Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2008-05-21/">
    <page>0</page>
    <items>10</items>
    <total>2376</total>
    <paymentsResult>
	<paymentItem id="07C0075C7650CF68">
	            <createdate>2008-01-01T00:00:00</createdate>  //transdata
	            <modifydate>2008-01-01T00:00:00</modifydate>  //updatedate
	            <payoutdate>2008-01-11T00:00:00</payoutdate>  //payout
	            <status>instructed or received or rejected or authorised or made</status>
	            <amount>100.00</amount>
	            <currency>EUR</currency>
	            <account id="6F1D536C59643034">Bank of Trust</account>
	</paymentItem>
	<paymentItem id="http://api.zanox.com/xml/2008-05-21/payments/payment/{id}">...</paymentItem>
		...
    </paymentsResult>
</response>
 


GET: Retrieving a single payment item

Parameters

applicationId mandatory only header parameter! applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory only header parameter! timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory only header parameter! signature is required for authorization to eliminate any possibility of data abuse.
paymentId mandatory path parameter the paymentId specifies the related payment item.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/payments/payment/{paymentId}
 
// REST JSON
http://api.zanox.com/json/payments/payment/{paymentId}

// REST XML using Header Authorization
GET /payments/payment/{paymentId} HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2008-05-21/">
	<paymentsResult>
		<paymentItem id="http://api.zanox.com/xml/2008-05-21/payments/payment/{id}">
		            <createdate>2008-01-01T00:00:00</createdate>  //transdata
		            <modifydate>2008-01-01T00:00:00</modifydate>  //updatedate
		            <payoutdate>2008-01-11T00:00:00</payoutdate>  //payout
		            <status>instructed or received or rejected or authorised or made</status>
		            <amount>100.00</amount>
		            <currency>EUR</currency>
		            <account id="">my bank account</account>
		</paymentItem>
		<paymentItem id="http://api.zanox.com/xml/2008-05-21/payments/payment/{id}">...</paymentItem>
	</paymentsResult>
</response>
 

GET: Retrieving all balance items

Parameters

applicationId mandatory only header parameter! applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory only header parameter! timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory only header parameter! signature is required for authorization to eliminate any possibility of data abuse.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/payments/balances
 
// REST JSON
http://api.zanox.com/json/payments/balances

// REST XML using Header Authorization
GET /payments/balances HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2008-05-21/">
    <paymentsResult>
        <balanceItem id="EUR">
                    <open>150.00</open>             
                    <confirmed>50.00</confirmed>
        </balanceItem>
        <balanceItem id="USD">
                    <open>50.00</open>             
                    <confirmed>35.00</confirmed>
        </balanceItem>
    </paymentsResult>
</response>
 

GET: Retrieving a single balance item

Parameters

applicationId mandatory only header parameter! applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory only header parameter! timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory only header parameter! signature is required for authorization to eliminate any possibility of data abuse.
currency mandatory path parameter to constrain the user balances for the given currency. Please abide by the ISO 4217 syntax. avaliable currencies
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/payments/balances/balance/EUR
 
// REST JSON
http://api.zanox.com/json/payments/balances/balance/EUR

// REST XML using Header Authorization
GET /payments/balances/balance/EUR HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2008-05-21/">
    <paymentsResult>
        <balanceItem id="http://api.zanox.com/xml/2008-05-21/reports/balances/balance/eur">
                    <open>150.00</open>             
                    <confirmed>50.00</confirmed>
        </balanceItem>
    </paymentsResult>
</response>
 

GET: Retrieving all account items

Parameters

applicationId mandatory only header parameter! applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory only header parameter! timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory only header parameter! signature is required for authorization to eliminate any possibility of data abuse.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/payments/accounts
 
// REST JSON
http://api.zanox.com/json/payments/accounts

// REST XML using Header Authorization
GET /payments/accounts HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2008-05-21/">
    <paymentsResult>
        <accountItem id="12fv123bv">
                    <profile>Standard</profile>
                    <iban>64003033</iban>
                    <swift>64003033</swift>
                    <bankcode>64003033</bankcode>
                    <accountnumber>12345678</accountnumber>
                    <accountholder>John Doe</accountholder>
                    <name>Deutsche Bank</name>
                    <address>Strasse Hausnummer, PLZ Stadt</address>
                    <country>DE</country>
                    <minpayout>25</minpayout>
        </accountItem>
        <accountItem id="yy34ya3as">
                    <profile>Deutsche Bank 2</profile>
                    <iban>64333033</iban>
                    <swift>64333033</swift>
                    <bankcode>64333033</bankcode>
                    <accountnumber>12335678</accountnumber>
                    <accountholder>John Doe</accountholder>
                    <name>Deutsche Bank</name>
                    <address>Strasse Hausnummer, PLZ Stadt</address>
                    <country>DE</country>
                    <minpayout>25</minpayout>
        </accountItem>
    </paymentsResult>
</response>
 

GET: Retrieving a single account item

Parameters

applicationId mandatory header parameter applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory header parameter timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory header parameter signature is required for authorization to eliminate any possibility of data abuse.
accountId mandatory path parameter the accountId specifies the related account item.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/payments/accounts/account/{id}
 
// REST JSON
http://api.zanox.com/json/payments/accounts/account/{id}

// REST XML using Header Authorization
GET /payments/accounts/account/{id} HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2008-05-21/">
    <paymentsResult>
        <accountItem id="">
                    <profile>Standard</profile>
                    <iban>64003033</iban>
                    <swift>64003033</swift>
                    <bankcode>64003033</bankcode>
                    <accountnumber>12345678</accountnumber>
                    <accountholder>John Doe</accountholder>
                    <name>Deutsche Bank</name>
                    <address>Strasse Hausnummer, PLZ Stadt</address>
                    <country>DE</country>
                    <minpayout>25</minpayout>
        </accountItem>
    </paymentsResult>
</response>
 

Explanation of Response Items

  1. paymentItem
  2. accountItem
  3. balanceItem
Personal tools