Sign up

Collections

Listing addresses

buyers/{buyer id}/emails/
HEAD, GET Returns the list of emails attached to the buyer's account.


Listing and filtering invoices

buyers/{buyer id}/emails/{email id}/invoices/
HEAD, GET Returns the list of invoices received by the user on a specific email address.

The collection can be filtered with one or a combination of the following attributes:

flagged Boolean
read Boolean
archived Boolean
date Timestamp
dueDate Timestamp
total Float
status String Possible values:
  • pending
  • paid
  • canceled
  • irrecoverable
seller String The Seller's Id
buyers/{buyer id}/emails/{email id}/invoices/?q=filter


Listing and filtering sellers history digests

buyers/{buyer id}/emails/{email id}/sellers/
HEAD, GET Returns a list of digests representing the history of transactions for each seller (provider) with which transactions have been recorded.

The collection can be filtered with one or a combination of the following attributes:

invoicesCount Number Number of invoices exchanged with the seller.
zipcode String
city String
country String An ISO 3166-1 alpha 2 country code string.
buyers/{buyer id}/emails/{email id}/sellers/q=filter


Listing and filtering seller day digests

buyers/{buyer id}/emails/{email id}/sellers/{seller id}/days/
HEAD, GET Returns a list of daily digests of the transactions recorded between a buyer and a seller.

The collection can be filtered with one or a combination of the following attributes:

date Timestamp

Here's an example of how to retrieve an hour by hour digest of all the transactions recorded during the first 6 months of 2012 with a specific seller:

buyers/{buyer id}/emails/{email id}/sellers/{seller id}/days/?q=date>>1325372400000|date<<1338501600000


Listing and filtering seller hour digests

buyers/{buyer id}/emails/{email id}/sellers/{seller id}/hours/
HEAD, GET Returns a list of hour digests of the transactions recorded between a buyer and a seller.

The collection can be filtered with one or a combination of the following attributes:

date Timestamp

Here's an example of how to retrieve an hour by hour digest of all the transactions recorded between 11pm and 12pm with a specific seller:

buyers/{buyer id}/emails/{email id}/sellers/{seller id}/hours/?q=date>>1340790596910|date<<1340794196910

Buyer

Overview

Represents the profile of a buyer.

buyers/{buyer id}/
Allowed methods HEAD, GET
Protected True

Attributes

firstname The first name of the buyer as a string.
lastname The last name of the buyer as a string.
birthday A timestamp in milliseconds representing the buyer's birthday.
avatar The URI of the buyer's avatar picture.
gender The gender of the buyer.

Settings

Overview

Represents the settings of the buyer.

buyers/{buyer id}/settings/
Allowed methods HEAD, GET
Protected True

Attributes

language The language of the user as a two letter code string.
region The regional settings of the user as a string. The format is:
{two letter language code}-{two letter country code}.
currency A three digit representation of the currency set in the user's settings.

Company

Overview

Represents the company for whom the buyer works.

buyers/{buyer id}/company/
Allowed methods HEAD, GET
Protected True

Attributes

name Then name of the company a string.
description A short description of the company as a string.
verified A boolean indicating whether or not the company was verified.
smallLogo the URI of the small version of the company's logo as a string.
largeLogo The URI of the large version of the company's logo as a string.

Billing Info

Overview

Represents the billing info that a buyer might want to share with his providers.

buyers/{buyer id}/info/
Allowed methods HEAD, GET
Protected True
OAuth scopes read_billinginfo

Attributes

name Full name of the buyer.
company The name of the buyer's company if any.
email The email address on which the buyer wants his invoices to be sent.
address A representation of a postal address.

Email

Overview

Represents an email address registered by a user or shared with him.

buyers/{buyer id}/emails/{email id}
Allowed methods HEAD, GET
Protected True

Attributes

label An alias name given by the user to the email address as a string.
address The email address.
verified A boolean value representing the status of the email.

Invoice

Overview

Represents a invoice received by the buyer.

buyers/{buyer id}/emails/{email id}/invoices/{invoice id}
Allowed methods HEAD, GET, PATCH, DELETE
Protected True
OAuth scopes read_invoices, modify_invoices

Attributes

secretKey Read-only A randomly generated secret access key as a string.
name Read-only The title given by the seller to the invoice as a a string.
description Read-only The description given by the seller to the invoice as a string.
buyer Read-only An object representing the buyer information included in the invoice.
  • name: the buyer name
  • email: the buyer email address
  • address the buyer postal address
  • delivery the buyer delivery address if available
sellerURI Read-only A string representing the URI of the seller's public representation.
date Read-only A timestamp representing the invoice date.
dueDate Read-only A timestamp representing the date on which the invoice is due.
currency Read-only The currency of the invoice as a 3 letters code string.
total Read-only The total of the invoice as a float.
archived A boolean indicating whether or not the invoice has been archived.
read A boolean indicating whether or not the invoice has been read.
flagged A boolean indicating whether or not the invoice has been flagged.
body Read-only The XML representation of the invoice body as a string.

Seller

Overview

A near realtime digest representation of the history of transactions recorded between the current buyer and a seller.

/buyers/{buyer id}/emails/{email id}/sellers/{seller id}/
Allowed methods HEAD, GET
Protected True
OAuth scopes read_history

Attributes

companyUri The URI of the seller's public representation as a string.
currencies A list of currencies in which transactions have been recorded.
invoicesCount The total number of invoices sent by the seller as an integer.
threadsCount The total number of threads opened between the seller and the buyer as an integer.
messagesCount The total number of messages exchanged between the seller and the buyer as an integer.
{Currency Code} Stats, list of items, taxes and discounts aggregated by currency.
Available metrics are min, max, average and total.
{
    "companyURI":"https://api.greendizer.com/companies/982/",
    "currencies":["USD", "EUR", "MAD"],
    "USD":{
        "count":25,
        "min":1,
        "max":1299.22,
        "average":657.23,
        "sum":12987.98,
        "totalTaxes":2283.21,
        "totalDiscounts":120.0,
        "items":['SRV Fender Stratocaster', 'Dunlop JH1B wah-wah pedal', 'Marshall AS100D Amplifier'],
        "taxes":[{
            "type":"percentage",
            "name":"VAT",
            "value":12.0
        }],
        "discounts":[{
            "type":"fixed",
            "name":"Coupon",
            "value":5.0
        }]
    },
    "EUR":{
        "count":2,
        "min":76.07,
        "max":129.22,
        "average":73.23,
        "sum":9877.98,
        "totalTaxes":2283.21,
        "totalDiscounts":120.0,
        "items":['Dunlop JH1B wah-wah pedal', 'Marshall AS100D Amplifier'],
        "taxes":[{
            "type":"percentage",
            "name":"TVA",
            "value":19.6
        }],
        "discounts":[{
            "type":fixed,
            "name":"Members discount",
            "value":20.0
        }]
    },
    "MAD":{
        "count":8,
        "min":3422.12,
        "max":123423.66,
        "average":9283.76,
        "sum":1928283.24,
        "totalTaxes":2283.21,
        "totalDiscounts":120.0,
        "items":['SRV Fender Stratocaster', 'Marshall AS100D Amplifier'],
        "taxes":[{
            "type":"percentage",
            "name":"TVA",
            "value":20.0
        }],
        "discounts":[{
            "type":"fixed",
            "name":"Coupon",
            "value":7.0
        }]
    },
    "invoicesCount":87,
    "threadsCount":22,
    "messagesCount":180
}

Day Digest

Overview

A near realtime digest representation of a day of transactions recorded between the current buyer and a seller.

/buyers/{buyer id}/emails/{email id}/sellers/{seller id}/days/{day timestamp}/
Allowed methods HEAD, GET
Protected True
OAuth scopes read_history

Attributes

currencies A list of currencies in which transactions have been recorded.
invoicesCount The total number of invoices sent by the seller as an integer.
threadsCount The total number of threads opened between the seller and the buyer as an integer.
messagesCount The total number of messages exchanged between the seller and the buyer as an integer.
{Currency Code} Stats, list of items, taxes and discounts aggregated by currency.
Available metrics are min, max, average and total.
{
    "currencies":["USD", "MAD"],
    "USD":{
        "count":25,
        "min":1,
        "max":1299.22,
        "average":657.23,
        "sum":12987.98,
        "totalTaxes":2283.21,
        "totalDiscounts":120.0,
        "items":['SRV Fender Stratocaster', 'Dunlop JH1B wah-wah pedal', 'Marshall AS100D Amplifier'],
        "taxes":[{
            "type":"percentage",
            "name":"VAT",
            "value":12.0
        }],
        "discounts":[{
            "type":"fixed",
            "name":"Coupon",
            "value":5.0
        }]
    },
    "MAD":{
        "count":8,
        "min":3422.12,
        "max":123423.66,
        "average":9283.76,
        "sum":1928283.24,
        "totalTaxes":2283.21,
        "totalDiscounts":120.0,
        "items":['SRV Fender Stratocaster', 'Marshall AS100D Amplifier'],
        "taxes":[{
            "type":"percentage",
            "name":"TVA",
            "value":20.0
        }],
        "discounts":[{
            "type":"fixed",
            "name":"Coupon",
            "value":7.0
        }]
    },
    "invoicesCount":87,
    "threadsCount":22,
    "messagesCount":180
}

Hour Digest

Overview

A near realtime digest representation of an hour of transactions recorded between the current buyer

/buyers/{buyer id}/emails/{email id}/sellers/{seller id}/hours/{hour timestamp}/
Allowed methods HEAD, GET
Protected True
OAuth scopes read_history

Attributes

currencies A list of currencies in which transactions have been recorded.
invoicesCount The total number of invoices sent by the seller as an integer.
threadsCount The total number of threads opened between the seller and the buyer as an integer.
messagesCount The total number of messages exchanged between the seller and the buyer as an integer.
{Currency Code} Stats, list of items, taxes and discounts aggregated by currency.
Available metrics are min, max, average and total.
{
    "currencies":["GPB", "MAD"],
    "GPB":{
        "count":25,
        "min":1,
        "max":1299.22,
        "average":657.23,
        "sum":12987.98,
        "totalTaxes":2283.21,
        "totalDiscounts":120.0,
        "items":['Dunlop JH1B wah-wah pedal', 'Marshall AS100D Amplifier'],
        "taxes":[{
            "type":"percentage",
            "name":"VAT",
            "value":12.0
        }],
        "discounts":[{
            "type":"fixed",
            "name":"Coupon",
            "value":5.0
        }]
    },
    "MAD":{
        "count":8,
        "min":3422.12,
        "max":123423.66,
        "average":9283.76,
        "sum":1928283.24,
        "totalTaxes":2283.21,
        "totalDiscounts":120.0,
        "items":['SRV Fender Stratocaster', 'Marshall AS100D Amplifier'],
        "taxes":[{
            "type":"percentage",
            "name":"TVA",
            "value":20.0
        }],
        "discounts":[{
            "type":"fixed",
            "name":"Coupon",
            "value":7.0
        }]
    },
    "invoicesCount":87,
    "threadsCount":22,
    "messagesCount":180
}