Jump to content

REST API Documentation

/nexus/purchases


Get list of purchases

For requests using an OAuth Access Token for a particular member, only the members own purchases will be included


Parameters

Name Type Description
customers string Comma-delimited list of customer IDs - if provided, only invoices belonging to those customers are returned. Ignored for requests using an OAuth Access Token for a particular member
active int If 1, only active purchases are returned. If 0, only inactive
canceled int If 1, only canceled purchases are returned. If 0, only not canceled
itemApp string If specified, only purchases with this application key are returned
itemType string If specified, only purchases with this item type are returned
itemId int If specified, only purchases with this item ID are returned
parent int If specified, only purchases with which are children of the purchase with the ID specified are returned
show int If 1, only purchases which show in the Admin CP are returned, if 0, only purchases which do not
sortBy string What to sort by. Can be 'start' (for purchase date), 'expire' (for the epiry date) or do not specify for ID
sortDir string Sort direction. Can be 'asc' or 'desc' - defaults to 'asc'
page int Page number
perPage int Number of results per page - defaults to 25

Exceptions

This endpoint doesn't throw any exceptions.

Response

Name Type Description
page int The page number for the results being shown
perPage int The number of results that will be on each page
totalResults int The total number of results
totalPages int The number of pages of results
results array of purchase objects The results for this page

purchase object

Name Type Description
id int ID number
name string Name
itemApp string Key for application. For example, 'nexus' for products and renewals; 'downloads' for Downloads files
itemType string Key for item type. For example, 'package' for products; 'file' for Downloads files.
itemId int The ID for the item. For example, the product ID or the file ID.
customer customer object Customer
purchased datetime Purchased date
expires datetime Expiration date
active bool If purchase is currently active (not expired)
canceled bool If purchase has been canceled
renewalTerm renewalterm object Renewal term
customFields object Values for custom fields
parent purchase object Parent purchase
show bool If this purchase shows in the client area and AdminCP
licenseKey string License key
image string If the item has a relevant image (for exmaple, product image, Downloads file screenshot), the URL to it
url string The URL for the customer to view this purchase in the client area

customer object

Name Type Description
id int ID number
name string Username
title string Member title
timezone string Member timezone
formattedName string Username with group formatting
primaryGroup group object Primary group
secondaryGroups array of group objects Secondary groups
email string Email address
joined datetime Registration date
registrationIpAddress string IP address when registered
warningPoints int Number of active warning points
reputationPoints int Number of reputation points
photoUrl string URL to photo (which will be the site's default if they haven't set one)
photoUrlIsDefault bool Indicates if the value of photoUrl is the site's default
coverPhotoUrl string URL to profile cover photo (will be blank if there isn't one)
profileUrl string|null URL to profile
validating bool Whether or not the validating flag is set on the member account
posts int Number of content item submissions member has made
lastActivity datetime|null Last activity date on the site.
lastVisit datetime|null Last distinct visit date on the site.
lastPost datetime|null Latest content submission date.
profileViews int Number of times member's profile has been viewed
birthday string Member birthday in MM/DD/YYYY format (or MM/DD format if no year has been supplied).
customFields array of fieldgroup objects Custom profile fields. For requests using an OAuth Access Token for a particular member, only fields the authorized user can view will be included
rank array of rank objects Rank
achievements_points int Points
allowAdminEmails bool Whether or not this member wants to receive admin emails
completed bool Whether or not the registration is completed

group object

Name Type Description
id int ID number
name string Name
formattedName string Name with formatting

fieldgroup object

Name Type Description
name string Group name
fields array of field objects Fields

field object

Name Type Description
name string Field name
value string Value

rank object

Name Type Description
id int ID number
name string Name
url string Path to the rank icon
points int Points

renewalterm object

Name Type Description
term string 'd' for days; 'w' for weeks; 'm' for months; 'y' for years
unit int The number for term. For example, if the renewal term is every 6 months, term will be 'm' and unit will be 6
price money object The renewal price
taxClass tax object If the renewal price is taxed, the tax class that applies

money object

Name Type Description
currency string The currency code (e.g. 'USD')
amount string The amount

tax object

Name Type Description
id int ID Number
name string Name
×
×
  • Create New...