Account Data Structures

Account

Description

A representation of a Lulu.com user account.  This structure is always formatted in JSON when sent between the client and server.

Example

This is a sample JSON-formatted account object.

"account": {
    "email": "email.address@example.com",
    "username": "tommy_toolsmith",
    "password": "s3c#r3PW",
    "remit": {
        "first_name": "Tommy",
        "last_name": "Toolsmith",
        "organization": "Example Company",
        "street1": "123 main street",
        "city": "Example",
        "state": "NC",
        "country": "US",
        "postal_code": "27607",
        "telephone": "111-111-1111",
        "ssn": "000000000",
        "taxation_country": "US",
        "pay_method": "check"
    }
}

Fields

Field Data Type Required? Description
email string yes The e-mail address associated with the account.  This is used to login to the system.
username string yes The username associated with the account.  This is displayed on the site, but not used to login.
password string yes The password to use when logging into the account.
remit_info data structure yes Contact information for royalty payments, can be null.  See Below for details.

Remit_info

Description

Contact information for royalty payments.  Not all accounts have a filled out remit_info structure, but if you want the end-user to collect royalties, they must have one. Because this data is used to complete payment of royalties it is essential that it be correct.

The data in the remit_info structure does not need to be associated to the data in the rest of the account, so if you want the royalty for books published by this account to be donated to charity, the remit_info field should specify the charity's payment information, not the author's.

Fields

Field Data Type Required? Description
first_name string yes (or last_name) The user's first name.  Either the first or last name must be specified.
last_name string yes (or first_name) The user's last name.  Either the first or last name must be specified.
organization string no The name of the Organization royalties are submitted to.  Leave blank if payment is to an individual.
street1 string yes The first portion of the street address.
street2 string no The second portion of the street address.
city string yes The city for the supplied address.
state string yes (if applicable) The two character state code for the supplied address.  Only required if the country has states.
country string yes The two character country code for the supplied address.
postal_code string yes The postal code for the supplied address.
telephone string yes The contact telephone number.
ssn string yes (or ein) The Social Security Number for the person being paid.  Either ssn or ein must be supplied, but not both.  This number cannot include any punctuation.
ein string yes (or ssn) The Employee Identification number for the person being paid.  Either ssn or ein must be supplied, but not both.
taxation_country string yes The two character country code to which income tax will be paid.
pay_method string yes Method by which payment will be made.  Supported options are "paypal" and "check".
email string yes (paypal only) The Paypal email address to which paymens will be made.  Only required if the pay_method is "paypal".
currency_code string yes (paypal only) The currency through which Paypal payments are made.  Only required if the pay_method is "paypal".
min_royalty_amount string no Amount of royalty that must accrue before a payment is made.  The default is $5 for paypal and $20 for checks.