Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Accounts > Get account summary

Get account summary

This REST API reference describes how to retrieve detailed information about the specified customer account.

The response includes everything retrieved with the Get basic account information call, plus a summary of the account's subscriptions, invoices, payments, and usage for the last six months.

Request

  • Production: GET https://api.zuora.com/rest/v1/accounts/{account-key}/summary
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/accounts/{account-key}/summary

Request parameters

account-key

required

path

Account number or account ID

Response

Returns only the six most recent subscriptions based on the subscription updatedDate. Within those subscriptions, there may be many rate plans and many rate plan charges. These items are subject to the maximum limit on the array size. See REST API basics for more information on concurrent request limits.

success

Contains true if successful, otherwise false.

processId

Internal process ID to assist Zuora support. Only returned if success is false.

batch

optional

The alias name given to a batch. A string of 50 characters or less.

reasons

Information on one or more reasons for the result. Only returned if success is false.

code

Eight-digit numeric error code

message

Description of the error

basicInfo

Container for basic information about the account:

id

Account ID

accountNumber

Account number

name

Account name

balance

Current outstanding balance

lastInvoiceDate

Date of the most recent invoice for the account; null if no invoice has ever been generated.

lastPaymentDate

Date of the most recent payment collected for the account. Null if no payment has ever been collected.

lastPaymentAmount

Amount of the most recent payment collected for the account; null if no payment has ever been collected.

currency

A currency value. See Customize Currencies for more information.

status

Account status; possible values are: Active, Draft, Canceled.

billCycleDay

Billing cycle day (BCD), the day of the month when a bill run generates invoices for the account 

cf_txtn__c

One or more custom fields

cf_pkn__c

One or more custom fields

defaultPaymentMethod

Container for information about the default payment method:

id

The ID of the credit card payment method associated with this account

creditCardNumber

Credit card number, 16 characters or less, displayed in masked format (e.g., ************1234).

creditCardExpirationMonth

Two-digit numeric card expiration month as mm

creditCardExpirationYear

Four-digit card expiration year as yyyy

creditCardType

Possible values are: Visa, MasterCard, AmericanExpress, Discover

billToContact

Container for bill-to contact information:

id

Contact ID

firstName

First name , 100 characters or less

lastName

Last name, 100 characters or less

address1

First address line, 255 characters or less

address2

Second address line, 255 characters or less

city

City, 40 characters or less

county

County; 32 characters or less. Z-Tax uses this information to calculate county taxation.

state

A valid state name or abbreviation

zipCode

Zip code, 20 characters or less

country

A valid country name or abbreviation

workEmail

Work email address, 80 characters or less

workPhone

Work phone number, 40 characters or less

taxRegion

A region string, defined in your Z-Tax tax rules

fax

Fax number, 40 characters or less  

cf_txtn__c

One or more optional custom fields

cf_pkn__c

One or more optional custom fields

soldToContact

Container for sold-to contact information; uses the same structure as billToContact.

subscriptions

Container for subscriptions:

id

Subscription ID

subscriptionNumber

Subscription number

ratePlans

Container for rate plans for this subscription:

productId​​

Product ID

productName

Product name

productRatepPlanId

Product Rate Plan ID

ratePlanName

Rate plan name

subscriptionStartDate

Subscription start date

initialTerm

Duration of the first term of the subscription, in whole months

renewalTerm

Duration of the renewal term, in whole months

autoRenew

If true, auto-renew is enabled; if false, auto-renew is disabled.

termStartDate

Start date of the subscription term. If this is a renewal subscription, this date is different than the subscription start date.

termEndDate

End date of the subscription term. If the subscription is evergreen, this is either null or equal to the cancellation date, as appropriate.

status

Subscription status; possible values are: Draft, PendingActivation, PendingAcceptance, Active, Cancelled, Expired.

termType

Term type; possible values are TERMED, EVERGREEN.

 

cf_txtn__c

One or more custom fields

  cf_pkn__c

One or more custom fields

invoices

Container for invoices. Only returns the last 6 invoices.

id

Invoice ID

invoiceNumber

Invoice number

invoiceDate

Invoice date as yyyy-mm-dd

dueDate

Due date as yyyy-mm-dd

amount

Invoice amount before adjustments, discounts, and similar items

balance

Balance due on the invoice

status

Invoice status - not the payment status of the invoice, just the status of the invoice itself. Possible values are: Posted, Draft, Canceled, Error.

payments

Container for payments. Only returns the last 6 payments.

id

Payment ID

paymentType

Payment type; possible values are: External, Electronic.

paymentNumber

Payment number

effectiveDate

Effective date as yyyy-mm-dd

status

Payment status. Possible values are: Draft, Processing, Processed, Error, Voided, Canceled, Posted.

paidInvoices

Container for paid invoices for this subscription: 

invoiceID

Invoice ID

invoiceNumber

Invoice number

appliedPaymentAmount

Amount of payment applied to the invoice

usage

Container for usage data. Only returns the last 6 months of usage.

unitOfMeasure

Unit by which consumption is measured, as configured in the Z-Billing > Settings section of the web-based UI

quantity

Number of units used

startDate

The start date of a usage period as yyyy-mm. Zuora uses this field value to determine the usage date. 

taxInfo

Container for tax exempt information, used to establish the tax exempt status of a customer account.

companyCode

 

Unique code that identifies a company account in Avalara.

exemptCertificateId

ID of the customer tax exemption certificate. 

exemptCertificateType

Type of tax exemption certificate that the customer holds. 

exemptDescription

Description of the tax exemption certificate that the customer holds. 

exemptEffectiveDate

Date when the customer tax exemption starts. 

exemptExpirationDate

Date when the customer tax exemption expires.

exemptIssuingJurisdiction

Jurisdiction in which the customer tax exemption certificate was issued.

exemptStatus

Status of the account tax exemption. 

VATId

EU Value Added Tax ID.

Examples

HTTP/JSON request:

GET https://api.zuora.com/rest/v1/accounts/A00001115/summary

JSON response:

{
  "payments": [
    {
      "paidInvoices": [
        {
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0,
          "invoiceId": "2c92a09539190dbe0139190f42780012"
        },
        {
          "invoiceNumber": "INV00000323",
          "appliedPaymentAmount": 139722.1,
          "invoiceId": "2c92a0953a3fa95d013a407c10a60100"
        },
        {
          "invoiceNumber": "INV00000160",
          "appliedPaymentAmount": 10521.0,
          "invoiceId": "2c92a09739190dc60139194bcf1b0098"
        }
      ],
      "paymentNumber": "P-00000075",
      "status": "Processed",
      "effectiveDate": "2013-03-27",
      "id": "2c92c8f83dabf9cf013daf3bfa0305a6",
      "paymentType": "Electronic"
    },
    {
      "paidInvoices": [
        {
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0,
          "invoiceId": "2c92a09539190dbe0139190f42780012"
        }
      ],
      "paymentNumber": "P-00000056",
      "status": "Processed",
      "effectiveDate": "2012-08-11",
      "id": "2c92a0f9391832b101391922ad5f049d",
      "paymentType": "Electronic"
    }
  ],
  "invoices": [
    {
      "amount": 139722.1,
      "status": "Posted",
      "invoiceNumber": "INV00000323",
      "invoiceDate": "2013-02-11",
      "balance": 0.0,
      "id": "2c92a0953a3fa95d013a407c10a60100",
      "dueDate": "2013-02-11"
    },
    {
      "amount": 10521.0,
      "status": "Posted",
      "invoiceNumber": "INV00000160",
      "invoiceDate": "2012-08-11",
      "balance": 0.0,
      "id": "2c92a09739190dc60139194bcf1b0098",
      "dueDate": "2012-08-11"
    },
    {
      "amount": 10.0,
      "status": "Posted",
      "invoiceNumber": "INV00000159",
      "invoiceDate": "2012-08-11",
      "balance": 0.0,
      "id": "2c92a09539190dbe0139190f42780012",
      "dueDate": "2012-08-11"
    }
  ],
  "usage": [
    {
      "unitOfMeasure": "UOM",
      "quantity": 10.0,
      "startDate": "2012-02"
    },
    {
      "unitOfMeasure": "UOM",
      "quantity": 10.0,
      "startDate": "2012-01"
    }
  ],
  "basicInfo": {
    "defaultPaymentMethod": {
      "creditCardNumber": "************1111",
      "paymentMethodType": "CreditCard",
      "creditCardExpirationMonth": 10,
      "creditCardExpirationYear": 2020,
      "creditCardType": "Visa",
      "id": "2c92c8f83dabf9cf013daef12dd303b0"
    },
    "status": "Active",
    "lastInvoiceDate": "2013-02-11",
    "lastPaymentAmount": 150248.1,
    "billCycleDay": 1,
    "name": "subscribeCallYan_1",
    "balance": 0.0,
    "accountNumber": "A00001115",
    "id": "2c92a0f9391832b10139183e277a0042",
    "dfadsf__c": null,
    "currency": "USD",
    "lastPaymentDate": "2013-03-27"
  },
  "soldToContact": {
    "fax": "",
    "taxRegion": "",
    "country": "United States",
    "zipCode": "95135",
    "county": "",
    "lastName": "Cho",
    "workEmail": "work_email@zbcloud.com",
    "state": "California",
    "address2": "",
    "address1": "278 Bridgeton Circle",
    "firstName": "Bill",
    "id": "2c92a0f9391832b10139183e27940043",
    "workPhone": "5555551212",
    "city": "San Jose"
  },
  "success": true,
  "subscriptions": [
    {
      "termEndDate": "2014-02-01",
      "termStartDate": "2013-02-01",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": true,
      "subscriptionNumber": "A-S00001081",
      "subscriptionStartDate": "2013-02-01",
      "id": "2c92c8f83dc4f752013dc72c24ee016d",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "QSF_Tier"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2014-02-01",
      "termStartDate": "2013-02-01",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": true,
      "subscriptionNumber": "A-S00001080",
      "subscriptionStartDate": "2013-02-01",
      "id": "2c92c8f83dc4f752013dc72bb85c0127",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "QSF_Tier"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2014-04-01",
      "termStartDate": "2013-12-01",
      "status": "Cancelled",
      "initialTerm": 10,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001079",
      "subscriptionStartDate": "2013-02-01",
      "id": "2c92c8f83dc4f752013dc723fdab00d4",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "QSF_Tier"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 4
    },
    {
      "termEndDate": "2012-02-11",
      "termStartDate": "2011-02-11",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001076",
      "subscriptionStartDate": "2011-02-11",
      "id": "2c92c8f83db0b4b4013db4717ad000ec",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        },
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2012-02-11",
      "termStartDate": "2011-02-11",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001075",
      "subscriptionStartDate": "2011-02-11",
      "id": "2c92c8f83db0b4b4013db3ab6a4d00bc",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        },
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2012-02-11",
      "termStartDate": "2011-02-11",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001074",
      "subscriptionStartDate": "2011-02-11",
      "id": "2c92c8f83db0b4b4013db3aa9fbd0090",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    }
  ],
  "billToContact": {
    "fax": "",
    "taxRegion": "",
    "country": "United States",
    "zipCode": "95135",
    "county": "",
    "lastName": "Zou",
    "workEmail": "work_email@zbcloud.com",
    "state": "California",
    "address2": "",
    "address1": "1400 Bridge Pkwy",
    "firstName": "Cheng",
    "id": "2c92a0f9391832b10139183e27940043",
    "workPhone": "5555551212",
    "city": "San Jose"
  }
  "batch": "Australia"
}

CURL request:

##
## get account summary
##
echo
echo "==========GET Account Summary=============="
echo
curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" -H "Accept:application/json" -X GET $BASE_URL/v1/accounts/A00000001/summary

JSON response:

{
  "payments": [
    {
      "paidInvoices": [
        {
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0,
          "invoiceId": "2c92a09539190dbe0139190f42780012"
        },
        {
          "invoiceNumber": "INV00000323",
          "appliedPaymentAmount": 139722.1,
          "invoiceId": "2c92a0953a3fa95d013a407c10a60100"
        },
        {
          "invoiceNumber": "INV00000160",
          "appliedPaymentAmount": 10521.0,
          "invoiceId": "2c92a09739190dc60139194bcf1b0098"
        }
      ],
      "paymentNumber": "P-00000075",
      "status": "Processed",
      "effectiveDate": "2013-03-27",
      "id": "2c92c8f83dabf9cf013daf3bfa0305a6",
      "paymentType": "Electronic"
    },
    {
      "paidInvoices": [
        {
          "invoiceNumber": "INV00000159",
          "appliedPaymentAmount": 5.0,
          "invoiceId": "2c92a09539190dbe0139190f42780012"
        }
      ],
      "paymentNumber": "P-00000056",
      "status": "Processed",
      "effectiveDate": "2012-08-11",
      "id": "2c92a0f9391832b101391922ad5f049d",
      "paymentType": "Electronic"
    }
  ],
  "invoices": [
    {
      "amount": 139722.1,
      "status": "Posted",
      "invoiceNumber": "INV00000323",
      "invoiceDate": "2013-02-11",
      "balance": 0.0,
      "id": "2c92a0953a3fa95d013a407c10a60100",
      "dueDate": "2013-02-11"
    },
    {
      "amount": 10521.0,
      "status": "Posted",
      "invoiceNumber": "INV00000160",
      "invoiceDate": "2012-08-11",
      "balance": 0.0,
      "id": "2c92a09739190dc60139194bcf1b0098",
      "dueDate": "2012-08-11"
    },
    {
      "amount": 10.0,
      "status": "Posted",
      "invoiceNumber": "INV00000159",
      "invoiceDate": "2012-08-11",
      "balance": 0.0,
      "id": "2c92a09539190dbe0139190f42780012",
      "dueDate": "2012-08-11"
    }
  ],
  "usage": [
    {
      "unitOfMeasure": "UOM",
      "quantity": 10.0,
      "startDate": "2012-02"
    },
    {
      "unitOfMeasure": "UOM",
      "quantity": 10.0,
      "startDate": "2012-01"
    }
  ],
  "basicInfo": {
    "defaultPaymentMethod": {
      "creditCardNumber": "************1111",
      "paymentMethodType": "CreditCard",
      "creditCardExpirationMonth": 10,
      "creditCardExpirationYear": 2020,
      "creditCardType": "Visa",
      "id": "2c92c8f83dabf9cf013daef12dd303b0"
    },
    "status": "Active",
    "lastInvoiceDate": "2013-02-11",
    "lastPaymentAmount": 150248.1,
    "billCycleDay": 1,
    "name": "subscribeCallYan_1",
    "balance": 0.0,
    "accountNumber": "A00001115",
    "id": "2c92a0f9391832b10139183e277a0042",
    "dfadsf__c": null,
    "currency": "USD",
    "lastPaymentDate": "2013-03-27"
  },
  "soldToContact": {
    "fax": "",
    "taxRegion": "",
    "country": "United States",
    "zipCode": "95135",
    "county": "",
    "lastName": "Cho",
    "workEmail": "work_email@zbcloud.com",
    "state": "California",
    "address2": "",
    "address1": "278 Bridgeton Circle",
    "firstName": "Bill",
    "id": "2c92a0f9391832b10139183e27940043",
    "workPhone": "5555551212",
    "city": "San Jose"
  },
  "success": true,
  "subscriptions": [
    {
      "termEndDate": "2014-02-01",
      "termStartDate": "2013-02-01",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": true,
      "subscriptionNumber": "A-S00001081",
      "subscriptionStartDate": "2013-02-01",
      "id": "2c92c8f83dc4f752013dc72c24ee016d",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "QSF_Tier"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2014-02-01",
      "termStartDate": "2013-02-01",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": true,
      "subscriptionNumber": "A-S00001080",
      "subscriptionStartDate": "2013-02-01",
      "id": "2c92c8f83dc4f752013dc72bb85c0127",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "QSF_Tier"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2014-04-01",
      "termStartDate": "2013-12-01",
      "status": "Cancelled",
      "initialTerm": 10,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001079",
      "subscriptionStartDate": "2013-02-01",
      "id": "2c92c8f83dc4f752013dc723fdab00d4",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "QSF_Tier"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 4
    },
    {
      "termEndDate": "2012-02-11",
      "termStartDate": "2011-02-11",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001076",
      "subscriptionStartDate": "2011-02-11",
      "id": "2c92c8f83db0b4b4013db4717ad000ec",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        },
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2012-02-11",
      "termStartDate": "2011-02-11",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001075",
      "subscriptionStartDate": "2011-02-11",
      "id": "2c92c8f83db0b4b4013db3ab6a4d00bc",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        },
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    },
    {
      "termEndDate": "2012-02-11",
      "termStartDate": "2011-02-11",
      "status": "Active",
      "initialTerm": 12,
      "autoRenew": false,
      "subscriptionNumber": "A-S00001074",
      "subscriptionStartDate": "2011-02-11",
      "id": "2c92c8f83db0b4b4013db3aa9fbd0090",
      "ratePlans": [
        {
          "productName": "Recurring Charge",
          "ratePlanName": "Month_PerUnit"
        }
      ],
      "termType": "TERMED",
      "renewalTerm": 3
    }
  ],
  "billToContact": {
    "fax": "",
    "taxRegion": "",
    "country": "United States",
    "zipCode": "95135",
    "county": "",
    "lastName": "Zou",
    "workEmail": "work_email@zbcloud.com",
    "state": "California",
    "address2": "",
    "address1": "1400 Bridge Pkwy",
    "firstName": "Cheng",
    "id": "2c92a0f9391832b10139183e27940043",
    "workPhone": "5555551212",
    "city": "San Jose"
  }
  "batch": "Australia"
}
Last modified
13:24, 17 Feb 2016

Tags

Classifications

(not set)