LogoLogo
System status
Commerce API references
Commerce API references
  • Commerce API references
  • Warnings and error codes
    • Errors
    • Error codes
      • HTTP response status codes
      • Error format for Shopper APIs
      • Error codes for Shopper APIs
        • 400 Bad Request
        • 401 Unauthorized
        • 403 Forbidden
        • 404 Not Found
        • 405 Method Not Allowed
        • 409 Conflict
        • 412 Precondition Failed
        • 413 Payload Too Large
        • 500 Internal Server Error
      • Error format for Admin APIs
        • Async error objects
        • Sync error objects
        • Deployment objects
        • Warning objects
      • Error codes for Admin APIs
        • Error patterns
        • Supported image types
        • Asynchronous response error codes
        • Deployment error codes
        • Synchronous response error codes
  • Commerce API reference guide
    • API structure
      • API keys
      • Supported OAuth and Commerce API formats
      • Mini cart widget
      • Custom attributes
      • Fields used as keys
      • Fields and expand query parameters
      • Caching responses
      • CORS support
      • JSONP support
      • Transport
      • Service profiles
      • Supported protocols and formats
      • Elements
      • Rate limiting
      • Locale and currency
      • Exchange rate
      • Product identifier
      • Product external reference identifier (ERID)
      • Customer external reference identifier ERID
      • Cancel request process
      • Failover and redundancy
      • Troubleshooting API calls
    • Shopper APIs reference
      • Carts
        • Offers
          • Offer types
          • POP offers
          • Applied offers
          • Eligible offers
      • Orders
      • Returns
      • Links
    • Admin APIs reference
      • Subscriptions
      • Sites
      • Products
      • Live changes
      • Authorized shipping and billing countries
      • Merchandising
      • Disclosures
    • Glossary
Powered by GitBook
On this page
  • Email address
  • Consumer name
  • Digital rights
  • CustomerID field
  1. Commerce API reference guide
  2. API structure

Fields used as keys

Learn how to use fields as keys.

For reporting purposes, you can use the following keys described below with Order Notification, Sales Order Activity, and Subscription Services for reporting purposes.

Email address

To use email as a key, check the email element under the billingAddress element first.

{
	"billingAddress": {
		"emailAddress": ""
	}
}

If no billingAddress elements exist, locate the email element associated with the shippingAddress.

{
	"shippingAddress": {
		"emailAddress": ""
	}
}

Any shippingAddress for any lineItem will suffice since the address appears for all the line items.

Consumer name

To use the consumer name as a key, check the name element under the payment element first.

{
	"payment": {
		"customerFirstName": "",
		"customerLastName": ""
	}
}

If no payment element exists, locate the consumer name element associated with the shippingAddress.

{
	"shippingAddress": {
		"customerFirstName": "",
		"customerLastName": ""
	}
}

Any the shippingAddress for any lineItem will suffice since the address appears for all the line items.

Digital rights

To use digital rights as a key, check the serialNumber and unlockCode elements under the lineItems element.

{
	"lineItems": {
		"lineItem": {
			"digitalRights": {
				"serialNumber": "",
				"unlockCode": ""
			}
		}
	}
}

CustomerID field

Use the customerID field as a key when you want to attribute orders to users with access to MyAccount, where they can change their login IDs and email addresses.

PreviousCustom attributesNextFields and expand query parameters

Last updated 4 months ago