Broadleaf Microservices
  • v1.0.0-latest-prod

Customer Types

Account

Property Type Description

id

string

The context ID of the account.

parentAccount?

AccountRef

The account’s parent account.

status

DefaultAccountStatuses | string

The status of this account. By default, the account is active.

name

string

The name of the account.

accountNumber?

string

A business-driven unique identifier for the account.

accountType?

string

A simple categorization that can be used to group accounts or enforce business logic.

taxId?

string

The unique tax id for the account’s related organization.

attributes?

Record<string, unknown>

Dynamic attributes that are a part of the account. This is an admin-entered field.

AccountAddress

extends Address

Property Type Description

id?

string

The unique id for this account address relationship.

name?

string

The account-provided name of the address.

type?

string

The type of address for this account.

isDefault?

boolean

Specifies whether or not this is the default for this type of address.

accountRef?

AccountRef

The account in the relationship.

visibleToChildren?

DefaultChildrenVisibilityType | string

Describes the type of this address' visibility to child accounts

AccountInvite

Property Type Description

id

string

The context ID of the invite.

email

string

The email address of the customer.

phone?

Phone

The main phone number of the customer.

accountId

string

The context ID of the account for the invite.

invitingCustomerId

string

The ID of customer who performed the invite.

inviteExpirationDate

string

The date that this invitation expires.

accountRoleIds

Array<string>

The customer’s roles within the account. These map to role IDs in the auth service.

attributes

Record<string, unknown>

Additional attributes that are used to describe the account member

account?

AccountRef

Information for the pending account invitation.

AccountInviteRequest

Property Type Description

email

string

The email address of the customer to be invited.

phone?

Phone

The main phone number of the customer to be invited.

accountRoleIds

Array<string>

The customer’s roles within the account they are invited to. These map to role IDs in the auth service.

AccountMember

Representation of a Customer’s relationship with an Account, their contact info, & the role that they have for the account.

Property Type Description

id

string

The context ID of the relationship.

account

Partial<Account>

The account in the relationship.

customer

Partial<Customer>

The customer in the relationship.

email?

string

The email of the account member — used for invited members.

accountRoleIds

Array<string>

The customer’s roles within the account. These map to role IDs in the auth service.

attributes

Record<string, unknown>

Additional attributes that are used to describe the account member

active

boolean

Flag that indicates if the account member has been successfully added to the account (either by invite or admin) or has yet to accept the invite

AccountRef

Property Type Description

id

string

The account’s id.

name

string

The account’s name.

AdditionalPhone

Property Type Description

type

string

The type of the additional phone. For example "FAX", "MOBILE", etc. or "OTHER"

phone

Phone

The phone number.

Address

Property Type Description

firstName?

string

The first name of the individual at this address.

lastName?

string

The last name of the individual at this address.

fullName?

string

The combined names of the individual at this address. It is considered better UX to use a full name field in place of separate first and last name fields.

emailAddress?

string

The email address of the individual at this physical address.

companyName?

string

The name of the company at this address.

addressLine1

string

Primary address information, typically street name and building number.

addressLine2?

string

Secondary address information, like apartment, suite, or unit number.

addressLine3?

string

Tertiary address information, typically for international addresses.

city

string

The city, town or village of this address.

county?

string

The county of this address.

stateProvinceRegion

string

The state, province or region of this address.

country

string

The country for this address.

postalCode

string

Postal code or ZIP code for this address.

phonePrimary?

Phone

The primary phone number for this address.

phoneSecondary?

Phone

The secondary phone number for this address.

phoneFax?

Phone

The fax number for this address.

isDefault?

boolean

Whether this address is the default address of the owner.

isActive?

boolean

Whether this address is an active address of the owner.

[key: string]

unknown

Any additional custom attributes included on this customer address.

Adjustment

Property Type Description

offerRef

OfferRef

A reference to the offer that originated this adjustment.

amount

MonetaryAmount

The amount of this adjustment.

codeUsed?

string | null

The code used (if any) that triggered the application of the offer for this adjustment.

AttributeChoiceValue

Property Type Description

optionLabel?

string

The label shown to customers for the option.

label

string

What the customer sees for display.

value

string

The value based on what the user selected.

CampaignRef

Property Type Description

campaignTrackingId

string

A text identifier used to track a specific campaign.

campaignCode

string

The user provided text code that refers to the campaign.

CreateSavedPaymentMethodRequest

Property Type Description

name?

string

The name of this saved payment method.

owningUserType

DefaultSavedPaymentMethodOwningUserType | string

Describes the type of the owning user of the saved payment method. For example, the saved payment could belong to a Broadleaf customer or an account, therefore this value might be BLC_CUSTOMER, or BLC_ACCOUNT.

owningUserId

string

The id of the entity that owns this saved payment method. For example, this may be a customer id, or an account id.

defaultForOwner

boolean

Whether this saved payment is the default payment method for the owner entity.

type

string

The type of this saved payment method like Credit Card or Gift Card.

gatewayType

string

The payment gateway associated with this saved payment method.

paymentMethodProperties?

Record<string, string>

Map to capture any gateway-specific information needed to perform gateway transactions

attributes?

Record<string, string>

General use map to capture any additional attributes needed for this saved payment method.

displayAttributes?

Record<string, string>

General use map to capture any display properties for this saved payment method.

billingAddress

Address

The billing address associated with this saved payment method.

visibleToChildren

DefaultChildrenVisibilityType | string

Describes the type of this payment’s visibility to child accounts

gatewayReferenceId?

string

The reference ID for this payment method known by payment gateway. It is used when we need to update the saved payment method from the webhook event. In this case we have to find the saved payment method by this reference ID.

For example, this can be the Stripe SetupIntent id.

nextAction?

SavedPaymentMethodAction

The next action to execute to complete setup this payment method

CreditAccount

The credit account is an alternative form of payment which has been granted to the customer (or account). Customers can use it like any other form of payment. Typical use cases are store credit, account credit (i.e. B2B buy on credit), & digital gift cards.

Property Type Description

id

string

The id of this credit account.

type

string

The type of this credit account.

accountNumber

string

Generated code that can be used to reference the credit account.

owningUserType

string

Describes the owning user type of the credit account. For example, the credit account could belong to a customer, anonymous user or an account, therefore this value might be BLC_CUSTOMER, ANONYMOUS_USER_EMAIL, ANONYMOUS_USER_PHONE, or BLC_ACCOUNT.

owningUserRef

string

The reference to the user that owns this credit account. For example, this may be a customer id, an account id, or the anonymous user’s email address.

alternativeOwningUserType

string

Describes an alternative owning user type of the credit account, that can be used instead of the owningUserType.

alternativeOwningUserRef

string

Describes an alternative owning user reference for the credit account, that can be used instead of the owningUserRef.

balance

MonetaryAmount

The current balance for this credit account.

version

number

The version of this credit account. Used for checking that the requested version of the credit account is up-to-date before saving changes. Required for any request which results in an update being made to the credit account. This should never be manually incremented/decremented.

currency?

string

The currency gathered from the balance.

ownerIdentifier

string

A unique identifier associating a credit account object to a customer. By default, this equals to "owningUserRef".

attributes

Record<string, unknown>

Additional attributes that are used to describe the credit account.

Customer

Property Type Description

id

string

The unique identifier for this customer.

firstName?

string

The first name of the customer, if the fullName is not being used for the customer.

middleName?

string

The middle name of the customer, if the fullName is not being used for the customer.

lastName?

string

The last name of the customer, if the fullName is not being used for the customer.

fullName?

string

The full name of the customer, if the component parts firstName, middleName, and lastName are not being used to comprise the full name.

username

string

The username of the customer, used to log in.

email

string

The email address of the customer.

externalId?

string

The id that associates this user with an external system.

phone?

Phone

The main phone number of the customer.

additionalPhones?

Array<AdditionalPhone>

Additional phone numbers associated with the customer.

defaultPaymentAccountId?

string

The id of the default payment account.

Deprecated: In favor of using {@code SavedPaymentMethod} in PaymentTransactionServices to manage saved payment methods.

attributes?

Record<string, unknown>

Dynamic attributes that are a part of the customer.

specialType?

string

The type of the customer, if it’s in a special circumstance.

CustomerAddress

extends Address

Property Type Description

id?

string

The unique id for this customer address relationship.

name?

string

The customer-provided name of the address.

defaultShippingAddress?

boolean

Specifies whether or not the address is the default shipping address for the customer.

defaultBillingAddress?

boolean

Specifies whether or not the address is the default billing address for the customer.

customerRef?

CustomerRef

The customer in the relationship.

CustomerRef

Property Type Description

id

string

The customer’s id.

username

string

The customer’s username.

email

string

The customer’s email address.

DefaultAccountStatuses (Enum)

Describes the default statuses of an Account.

Name Value Description

ACTIVE

'ACTIVE'

INACTIVE

'INACTIVE'

DefaultChildrenVisibilityType (Enum)

Name Value Description

NO

'NO'

Indicates an account entity is not visible to children accounts. For example, the account address or saved payment method is only visible to its own account but not sub-accounts.

YES

'YES'

Indicates an account entity is visible to children accounts. For example, the account address or saved payment method is both visible to its own account and sub-accounts.

DefaultOrderItemType (Enum)

The default types of order items.

Name Value Description

STANDARD

'STANDARD'

A normal order item with typical behavior.

EXTRA_FEE

'EXTRA_FEE'

Represents a fee applied to the cart such as for Collect on Delivery or other payment options. These are not to be included in the cart subtotal or quantity.

COD_FEE

'COD_FEE'

Represents a fee applied to the cart for Collect on Delivery. These are not to be included in the cart subtotal or quantity.

DefaultSavedPaymentMethodOwningUserType (Enum)

Name Value Description

BLC_CUSTOMER

'BLC_CUSTOMER'

Represents a Broadleaf-managed customer.

BLC_ACCOUNT

'BLC_ACCOUNT'

Represents a Broadleaf-managed account.

FulfillmentOption

Property Type Description

name

string

The name of this option.

description?

string

The description of this option.

useFlatRates

boolean

Whether to use flat rates for this option.

taxCode?

string

The tax code for this option.

taxable

boolean

Whether any shipping prices should be taxable for this option.

ImageAssetRef

Property Type Description

contentUrl

string

The fully-resolvable content-URL to the binary data of the asset.

altText?

string

Text that corresponds to the HTML alt attribute that should be used when this asset is rendered in a browser.

title?

string

Text that corresponds to the HTML title attribute that should be used when this asset is rendered in a browser.

Instant

An instantaneous point on the time-line and is used to record event timestamps. Modeled after the java.time.Instant class.

Property Type Description

seconds

number

The number of seconds from the epoch of 1970-01-01T00:00:00Z.

nano

number

The number of nanoseconds, later along the time-line, from the seconds field. This is always positive, and never exceeds 999,999,999.

OfferRef

Property Type Description

id

string

The id of the offer.

name

string

The name of the offer.

description?

string | null

A description of what benefits the offer provides to a customer.

Order

Property Type Description

id

string

The unique id for this order.

cartId

string

The unique id of the original cart for this order.

name?

string

A unique name for the order, used for retrieval. This field is not displayed anywhere.

status

string

The status of this order.

customerId

string

The ID of the customer that owns this order.

customerName

string

The name of the customer that owns this order.

emailAddress

string

The customer’s email address.

orderNumber

string

The unique number associated with this Order.

cartCreateDate

string

The date that the originating cart was first created.

submitDate

string

The date that this order was submitted.

locale

string

The locale for this order.

orderPricing

OrderPricing

All the pricing information on this order.

orderItems

Array<OrderItem>

Items that are contained within this order. Typically represents a good or service that the customer is purchasing.

adjustments

Array<Adjustment>

Adjustments to order pricing that were applied to the subtotal.

offerCodes?

Array<string>

A list of offer codes that were added to this order. Used to apply Adjustments to different aspects of the order.

campaignRefs?

Array<CampaignRef>

A list of campaign references that are attached to this order.

payments

Array<Payment>

The list of payments associated with this order.

activePayments

Array<Payment>

The list of payments associated with this order.

attributes?

Record<string, unknown>

Miscellaneous attributes for this order.

internalAttributes?

Record<string, unknown>

Miscellaneous internal attributes for this item.

attributeChoices?

Record<string, AttributeChoiceValue>

Attribute choices for this order driven by its items' product options, where each key is the attributeName from an attribute choice.

currency

string

The currency unit used for the pricing of this Order.

ownerIdentifier

string

The owner of this order (i.e. customerId)

OrderFulfillment

Property Type Description

id

string

The unique identifier for this fulfillment.

externalId?

string

Intended to hold any unique identifier for this fulfillment as assigned by an external system.

orderFulfillmentNumber

string

The number for this individual fulfillment, unique within the order.

groupReferenceNumber

string

The reference number of the FulfillmentGroup this fulfillment was created from.

orderId

string

A soft reference to the parent Order this fulfillment belongs to.

status

string

The status of this fulfillment.

type

string

The type of means by which this fulfillment is fulfilled. This could be SHIP, PICKUP, or VIRTUAL, for example.

fulfillmentOption?

FulfillmentOption

The fulfillment option chosen for the type

pricedFulfillmentOption?

PricedFulfillmentOption

The priced fulfillment option. This is a more complex domain than fulfillment option. Both may be undefined and instead the individual FulfillmentItems would define a PricedFulfillmentOption.

inventoryLocationReference?

string

This is an optional field where the ID or reference number of the expected InventoryLocation is stored.

address

Address

The shipping address for this fulfillment.

shipment?

Shipment

The primary shipment details for this fulfillment.

additionalShipments?

Array<Shipment>

All additional shipment details for this fulfillment.

fulfillmentItems

Array<OrderFulfillmentItem>

Items within this fulfillment, each of which should relate back to a OrderItem.

merchandiseTotal

MonetaryAmount

The merchandise total for all items in the fulfillment, including item adjustments and prorated order adjustments.

fulfillmentCharge

MonetaryAmount

The shipping charge for this fulfillment before adjustments are applied.

fulfillmentTotal

MonetaryAmount

The total shipping price of this fulfillment, including adjustments and item shipping prices

taxTotal

MonetaryAmount

The total tax of this fulfillment, including merchandise and fulfillment tax.

grandTotal

MonetaryAmount

The grand total of this fulfillment, including merchandise costs, all shipping costs including items, and tax.

adjustments?

Array<Adjustment>

Adjustments to fulfillment pricing that should be applied to fulfillment charge.

overrideFulfillmentPriceFlag?

boolean

Whether the total fulfillment price of this order fulfillment was specifically overridden, whether from a CSR or an automatic process.

overrideDetails?

Array<OverrideDetail>

List of details about any price overrides which have been performed on this fulfillment.

vendorRef?

string

A reference to the corresponding vendor for this fulfillment.

currency

string

The currency unit used for the pricing of this order fulfillment.

requiresCollectOnDelivery

boolean

Whether this OrderFulfillment requires at least part of the payment to be collected on delivery.

attributes?

Record<string, unknown>

Additional attributes for this order fulfillment.

OrderFulfillmentItem

Property Type Description

id

string

The unique ID of this fulfillment item.

referenceNumber

string

The reference number for this fulfillment item.

orderItemId

string

The id of the OrderItem to be represented by this fulfillment item.

quantity

number

The quantity of the item to be fulfilled by this fulfillment.

unitMerchandisePrice

MonetaryAmount

The individual unit price for the merchandise. This is the same as OrderItem.unitPrice.

merchandiseSubtotal

MonetaryAmount

The unitMerchandisePrice multiplied by quantity.

merchandiseAdjustmentsTotal

MonetaryAmount

The total of all the item adjustments for the merchandise. Does not include proratedOrderAdjustments.

merchandiseTotal

MonetaryAmount

The merchandise total for the item quantity, including merchandiseSubtotal and item merchandiseAdjustmentsTotal.

proratedOrderAdjustments

MonetaryAmount

The amount prorated to this item from order adjustments.

merchandiseTaxTotal

MonetaryAmount

The total tax of the item merchandise based on the price of the related OrderItem.

unitFulfillmentCharge

MonetaryAmount

The unit shipping charge of each item before adjustments are applied.

fulfillmentAdjustmentsTotal

MonetaryAmount

The total of all the item fulfillment adjustments for this item.

fulfillmentTotal

MonetaryAmount

The total fulfillment price of this item, including adjustments. This does not include taxes.

fulfillmentAdjustments

Array<Adjustment>

Adjustments to item fulfillment pricing that should be applied to the total of unitFulfillmentCharge.

pricedFulfillmentOption?

PricedFulfillmentOption

The fulfillment option chosen for the type.

availableOnline

boolean

Whether or not this product is available online - ie inventory is available somewhere to fulfill this product

inventoryCheckStrategy?

string

The inventory check strategy of the item. This value helps to determine when an inventory check is required.

inventoryReservationStrategy?

string

The reservation strategy of the item. This value helps to determine when an inventory reservation is required.

taxDetails?

Array<OrderFulfillmentItemTaxDetail>

The tax details for this fulfillment item.

OrderFulfillmentItemTaxDetail

Property Type Description

id

string

The unique id for this tax detail.

taxCalculated

MonetaryAmount

The amount of taxes calculated.

taxableAmount

MonetaryAmount

The amount that was taxable to determine the calculated tax.

rate

number

The tax rate

jurisdictionType?

string

The jurisdiction type, e.g. city, state, county, etc.

jurisdictionName?

string

The tax jurisdiction name. This may be a state, city, county, etc. For example, "California", "New York City", etc.

country

string

The 2 digit country code.

region?

string

The region that this tax was calculated.

taxName?

string

The tax name for this tax detail. Describes the tax (e.g. TX STATE TAX)

transactionId

string

The transaction ID for this tax detail.

attributes?

Record<string, unknown>

Additional attributes for this tax detail.

currency

string

The currency for this tax detail.

OrderItem

Property Type Description

id

string

The unique id for this order item.

name?

string

The name of this item. Typically derived from the product or sku name.

uri?

string

The navigable uri of the corresponding catalog entry (e.g. product) for this order item.

quantity

number

The number of this item in the Order.

overridePriceFlag?

boolean

Whether the price of this OrderItem was specifically overridden, whether from a CSR or an automatic process.

priceListId?

string

The id of the price list used to get the pricing for this OrderItem.

unitPrice

MonetaryAmount

The individual unit price for an OrderItem.

unitPriceType

string

The type of the unit price for an OrderItem. Typically "salePrice", "standardPrice", or "basePrice".

adjustmentsTotal

MonetaryAmount

The total adjustment price for all adjustments of an OrderItem.

subtotal

MonetaryAmount

The subtotal price of this OrderItem.

total

MonetaryAmount

The total price of this OrderItem.

variantId?

string | null

The id to the corresponding variant for this item.

productId?

string

The id to the corresponding product for this item.

sku?

string

Represents a SKU code, similar to productId or variantId, except this is a unified, unique concept across both products and variants.

imageAsset?

ImageAssetRef

The image asset for this item, usually sourced from the product.

catalogRef

string | null

A reference to the corresponding catalog for this item.

dependentOrderItems?

Array<OrderItem>

OrderItems that depend on this OrderItem. Also could be called "child items".

itemAdjustments?

Array<Adjustment>

Adjustments to item pricing that should be applied to the subtotal

attributes?

Record<string, unknown>

Miscellaneous attributes for this item.

internalAttributes?

Record<string, unknown>

Miscellaneous internal attributes for this item.

attributeChoices?

Record<string, AttributeChoiceValue>

Attribute choices for this item driven by product options, where each key is the attributeName from an attribute choice.

overrideDetails?

Array<OverrideDetail>

List of details about any price overrides which have been performed on this item.

type?

string

The type of this order item.

OrderPricing

Property Type Description

currency

string

The currency unit used for the pricing of this Order.

totalTax

MonetaryAmount

The total tax amount for this Order.

fulfillmentTotal

MonetaryAmount

The total fulfillment price of this Order, including adjustments.

subtotal

MonetaryAmount

The subtotal price of this Order.

adjustmentsTotal

MonetaryAmount

he total adjustment price for all adjustments of an Order and its order items.

total

MonetaryAmount

The total price of this Order.

feesTotal

MonetaryAmount

The total fees of this Cart. This is the sum of all subtotals for cart items with type DefaultCartItemType EXTRA_FEE

OrderWithFulfillmentsAndReturns

extends Order

Property Type Description

fulfillments

Array<OrderFulfillment>

The fulfillemnts associated with this order.

returnAuthorizations

Array<ReturnAuthorization>

The return authorizations associated with this order.

OverrideDetail

Property Type Description

userId

string

The user ID of the admin user who performed the override.

author

string

The admin user who performed the override.

type

string

The type of override performed, e.g. a Cart Item Price override or a Fulfillment Group Price override.

originalAmount

MonetaryAmount

The amount contained in the field prior to being overridden.

overrideAmount

MonetaryAmount

The amount which the field has been overridden to.

reason?

string

The reason the override was performed, for example, "Price Match".

comment?

string

The optional, long-form comment explaining any extra context for the override.

PageableClientCallOptions

extends ClientCallOptions

Property Type Description

page?

number | string

The page number.

size?

number | string

The size of the page.

sort?

string

Any sorting params to apply to the response.

direction?

'ASC' | 'DESC'

The direction to sort by.

Deprecated: This is not used. Direction should be part of the sort param, e.g., sort=name,asc.

Payment

Property Type Description

id

string

The id of this payment.

name?

string

The name of this payment. This name is typically something like "Visa ending in 1234".

customerPaymentAccountId?

string | null

The id of the customer’s saved payment account that was used to build this payment object.

Deprecated: in favor of #savedPaymentMethodId for more accurate naming.

savedPaymentMethodId?

string | null

The id of the owning user’s saved payment method that was used to build this payment object.

isSingleUsePaymentMethod?

boolean

Whether or not the underlying payment method can only be used once.

In most cases, we’re managing a single-use token that represents a credit card. This flag is especially important for managing payments with successful transactions. In those cases, the token has already been used and cannot be reused. If we need modify the payment’s amount, then we may actually need to archive the existing payment, and create a new payment, with a new underlying token.

Additionally, this flag is helpful when needing to re-authorize an expired authorization transaction. In that case, if the payment represents a single-use payment method, then the re-authorization may not be possible, and you’ll need to seek an alternative form of payment.

shouldSavePaymentToCustomer?

boolean

Should the payment method be saved to the customer.

Deprecated: In favor of #shouldSavePaymentForFutureUse to support owning user types other than a customer (i.e. account).

shouldSavePaymentForFutureUse?

boolean

Should the payment method be saved to the owning user (i.e. customer or account).

status?

string

The status of the payment.

type

string

The type of this payment like Credit Card or Gift Card.

gatewayType

string

The gateway used to process this payment.

amount

MonetaryAmount

The amount for which this payment is allotted.

subtotal?

MonetaryAmount

The payment’s total usually excluding adjustments, tax, and fulfillment.

adjustmentsTotal?

MonetaryAmount

The payment’s adjustments (a.k.a discounts) total, usually excluding fulfillment discounts.

fulfillmentTotal?

MonetaryAmount

The payment’s total shipping cost

taxTotal?

MonetaryAmount

The payment’s total tax cost

billingAddress

Address

The billing address associated with this payment.

paymentGatewayProperties

Record<string, string>

Map to capture any gateway-specific information needed to perform gateway transactions

attributes?

Record<string, string>

General use map to capture any additional attributes needed for this Payment

displayAttributes?

Record<string, string>

General use map to capture any display properties for this Payment.

transactions

Array<PaymentTransaction>

Transaction data representing each payment gateway interaction related to this payment.

archived?

boolean

Whether this payment has been archived.

PaymentAccount

This should only be used if saved payments are represented using PaymentAccount and stored in CustomerServices. Otherwise SavedPaymentMethodSummary should be used instead.

Property Type Description

id?

string

The unique identifier for the payment account.

customerRef?

CustomerRef

The customer associated with this payment account.

displayName?

string

The user-friendly name provided for the payment account.

accountType?

string

This represents the type of payment that is associated with this account.

cardType?

string

The specific card type, i.e. Visa, Mastercard, Discover, etc.

Deprecated: This is no longer desired as a 1st class property. Instead, place it in the displayAttributes if desired.

gatewayType

string

The payment gateway associated with this payment account.

paymentGatewayProperties?

Record<string, string>

Map to capture any gateway-specific information needed to perform gateway transactions

displayAttributes?

Record<string, string>

General use map to capture any display properties for this Payment.

maskedAccountNumber?

string

Partial information about the payment account, e.g. last four numbers of a credit card.

Deprecated: This is no longer desired as a 1st class property. Instead, place it in the displayAttributes if desired.

nameOnAccount?

string

The name associated with this payment account.

Deprecated: This is no longer desired as a 1st class property. Instead, place it in the displayAttributes if desired.

expirationMonth?

number

The month the payment gateway account associated with this payment account will expire.

Deprecated: This is no longer desired as a 1st class property. Instead, place it in the displayAttributes if desired.

expirationYear?

number

The year the payment gateway account associated with this payment account will expire.

Deprecated: This is no longer desired as a 1st class property. Instead, place it in the displayAttributes if desired.

fullName

string

The combined names of the individual at this billing address.

addressLine1

string

Primary address information associated with this payment account, typically street name and building number.

addressLine2?

string

Secondary address information associated with this payment account, typically apartment, suite, or unit number.

addressLine3?

string

Tertiary address information associated with this payment account, typically for international addresses.

city

string

The city, town or village of this billing address.

county?

string

The county of this billing address.

stateProvinceRegion

string

The state, province or region of this address.

country

string

The country for this billing address.

postalCode

string

Postal code or ZIP code for this billing address.

phonePrimary?

Phone

The primary phone number for this billing address.

phoneSecondary?

Phone

The secondary phone number for this billing address.

lastTransactionDateTime?

string

The timestamp of the last transaction made by this payment account.

lastTransactionResultCode?

string

The result code returned from the gateway on the last transaction.

deactivated?

boolean

Whether the account is deactivated.

PaymentTransaction

Property Type Description

id

string

The id of this payment transaction.

type

string

The type of this transaction (authorize, capture, refund, etc.)

status

string

The status of the transaction

transactionReferenceId

string

The transaction id known by the payment gateway.

requestId

string

The id used to represent the request that produced this transaction.

amount

MonetaryAmount

The amount related to this transaction.

dateRecorded?

string | null

The timestamp when this transaction response was recorded

gatewayResponseCode

string | null

The response code provided by the payment gateway which may represent a success or failure

failureType?

string | null

The type of transaction failure

declineType?

string | null

The type of transaction failure (hard vs soft failure)

rawResponse

string | null

The string representation of the serialized response from the gateway.

parentTransactionId?

string | null

The id of the parent PaymentTransaction.

attributes?

Record<string, string>

Map of specific attributes that have been gathered from the raw response.

customerIpAddress?

string | null

The customer IP address that instigated this transaction

indeterminateResult?

boolean

Tells if this transaction has an indeterminate result.

Phone

Property Type Description

countryCode?

string | null

The country calling code that acts as a prefix to the main telephone number.

phoneNumber

string

The telephone number, including the area code.

extension?

string | null

The internal extension for this phone.

PricedFulfillmentOption

Property Type Description

serviceLevel

string

User-defined service level. This will typically include values like "SAME_DAY", "FIRST_CLASS", "OVERNIGHT", "STANDARD", etc. for [DefaultFulfillmentType] SHIP; or "IN_STORE" or "CURBSIDE" for [DefaultFulfillmentType] PICKUP This will depend on how clients (tenants or applications) define their available Fulfillment Option Service levels.

if [AbstractFulfillmentOption] inventoryType is "NONE" then this must return "NONE" as well.

fulfillmentType

string

Broad categorization of how this fulfillment option is fulfilled. For instance, SHIP, PICKUP, or VIRTUAL.

description?

string

Human-readable description (e.g. First Class, USPS First Class, or Pickup at Store #53).

calculatorIds

Set<string>

The list of calculatorIds which were used to compute the price for this option.

fulfillmentReference

string

This is either the ID of the Fulfillment Group or Fulfillment Item, depending on the value of PricedFulfillmentOption pricingStrategy.

estimatedMinDaysToFulfill

number

The minimum number of days estimated for delivery. Null value is possible and means that the estimated days to deliver is unknown.

estimatedMaxDaysToFulfill

number

The maximum number of days expected for delivery. Null value is possible meaning no max days to fulfill has been configured.

price

MonetaryAmount

This will be the price of using this Fulfillment Option. This may be ZERO.

taxable

boolean

Indicate if this fulfillment price is taxable.

taxCode

string

A tax code for this fulfillment option.

additionalAttributes?

Record<string, unknown>

Map to hold arbitrary additional attributes.

ReturnAuthorization

Property Type Description

id

string

The unique id of the return authorization.

orderId

string

The context ID of the order from which items are returned.

status

string

The status of the return.

trackingNumber?

string

Optional tracking number for the return shipment of items.

estimatedMerchandiseTotalToRefund

MonetaryAmount

The estimated merchandise total which can be refunded.

estimatedFulfillmentTotalToRefund

MonetaryAmount

The estimated fulfillment total which can be refunded.

estimatedTaxTotalToRefund

MonetaryAmount

The estimated tax total which can be refunded. This contains all taxes, including merchandise and fulfillment taxes.

estimatedTotalToRefund

MonetaryAmount

The estimated grand total which can be refunded.

estimatedReturnShippingCharge

MonetaryAmount

The estimated charge to the customer to ship back the items to return.

merchandiseTotalRefunded

MonetaryAmount

The merchandise total which has been refunded.

fulfillmentTotalRefunded

MonetaryAmount

The fulfillment total which has been refunded.

taxTotalRefunded

MonetaryAmount

The tax total which has been refunded. This contains all taxes, including merchandise and fulfillment taxes.

totalRefunded

MonetaryAmount

The estimated grand total which has been refunded.

returnShippingCharged

MonetaryAmount

The amount charged to the customer to ship back the items to return.

items

Array<ReturnAuthorizationItem>

The items which are being returned.

currency

string

The currency unit used for monetary amounts.

ReturnAuthorizationItem

Property Type Description

id

string

The id of this return authorization item.

orderFulfillmentItemId

string

The context ID of the OrderFulfillmentItem being returned.

quantity

number

The quantity of the item being returned.

primaryReturnReason?

string

The primary reason for the return.

secondaryReturnReason?

string

The secondary reason for the return, providing more detail in addition to the primary return reason.

expectedCondition?

string

The condition of the item expected when returned.

returnType

string

The type of the return, indicating how it should be processed.

note?

string

An optional note containing extra information about the item being returned.

estimatedMerchandiseTotalToRefund

MonetaryAmount

The estimated merchandise total which can be refunded.

estimatedFulfillmentTotalToRefund

MonetaryAmount

The estimated fulfillment total which can be refunded.

estimatedTaxTotalToRefund

MonetaryAmount

The estimated tax total which can be refunded. This contains all taxes, including merchandise and fulfillment taxes.

estimatedTotalToRefund

MonetaryAmount

The estimated grand total which can be refunded.

confirmations

Array<ReturnConfirmation>

The portions of this item which have been confirmed as returned.

ReturnConfirmation

Property Type Description

id

string

The id of this return confirmation.

status

string

The status of the returned item.

quantity

number

The quantity of the item which was returned.

actualCondition?

string

The actual condition of the returned item received.

note?

string

An optional note containing extra information about the item being returned.

refundFulfillmentCharge

boolean

Whether the fulfillment charge should be refunded.

merchandiseTotalToRefund

MonetaryAmount

The merchandise total which can be refunded.

fulfillmentTotalToRefund

MonetaryAmount

The fulfillment total which can be refunded.

taxTotalToRefund

MonetaryAmount

The tax total which can be refunded. This contains all taxes, including merchandise and fulfillment taxes.

totalToRefund

MonetaryAmount

The grand total which can be refunded.

overrideTotalToRefund?

MonetaryAmount

The overridden grand total to refund.

SavedPaymentMethodAction

Property Type Description

actionType

string

The action type.

status

string

The status of this action. Defaults to PENDING.

  • PENDING - the action is still to be completed

  • SUCCESS - the action was successfully completed

  • FAILURE - the action was not successfully completed

statusDetails?

string

Any details for the current action status.

attributes

Record<string, unknown>

Any additional attributes for this action.

SavedPaymentMethodClientCallOptions

extends ClientCallOptions

Property Type Description

version?

number

The current saved payment method version.

SavedPaymentMethodSummary

Property Type Description

id

string

The id of this saved payment method.

name

string

The name of this saved payment method.

status?

string

The status of this saved payment method.

  • AVAILABLE_TO_USE - this method is available to use

  • REQUIRES_ACTION - this method requires an additional action to complete setup

  • ACTION_FAILED - the action is failed

defaultForOwner

boolean

Whether this saved payment is the default payment method for the owner entity.

owningUserType

DefaultSavedPaymentMethodOwningUserType | string

Describes the type of the owning user of the saved payment method. For example, the saved payment could belong to a Broadleaf customer or an account, therefore this value might be BLC_CUSTOMER, or BLC_ACCOUNT.

owningUserId

string

The id of the entity that owns this saved payment method. For example, this may be a customer id, or an account id.

type

string

The type of this saved payment method like Credit Card or Gift Card.

gatewayType

string

The payment gateway associated with this saved payment method.

attributes?

Record<string, string>

General use map to capture any additional attributes needed for this saved payment method.

displayAttributes?

Record<string, string>

General use map to capture any display properties for this saved payment method.

billingAddress

Address

The billing address associated with this saved payment method.

lastTransactionDateTime

string

The timestamp of the last transaction made by this saved payment method.

lastTransactionResultCode

string

The result code returned from the gateway on the last transaction.

version

number

The version of this saved payment method. Used for checking that the requested version of the saved payment is up-to-date before saving changes. Required for any request which results in an update being made to the saved payment method. This should never be manually incremented/decremented.

visibleToChildren

DefaultChildrenVisibilityType | string

Describes the type of this payment’s visibility to child accounts

gatewayReferenceId?

string

The reference ID for this payment method known by payment gateway. It is used when we need to update the saved payment method from the webhook event. In this case we have to find the saved payment method by this reference ID.

For example, this can be the Stripe SetupIntent id.

Note
This value should be unique.

nextAction?

SavedPaymentMethodAction

The next action to execute to complete setup this payment method

Shipment

Property Type Description

trackingNumber?

string

The tracking number for this shipment.

trackingUrl?

string

The URL to the tracking page for this shipment.

shipDate?

string

The date the shipment was shipped.

shipperType?

string

The shipper responsible for the shipment, for example a carrier.

Sort

Property Type Description

sorted

boolean

Whether it is sorted.

unsorted

boolean

Whether it is NOT sorted.

empty

boolean

Whether it is empty.

UpdateAccountMemberRequest

Property Type Description

accountRoleIds

Array<string>

The customer’s roles within the account. These map to role IDs in the auth service.

attributes

Record<string, unknown>

Additional attributes that are used to describe the account member

UpdateSavedPaymentMethodRequest

Property Type Description

id

string

The id of this saved payment method.

name?

string

The name of this saved payment method.

defaultForOwner?

boolean

Whether this saved payment method is the default payment method for the owner entity.

type?

string

The type of this saved payment method like Credit Card or Gift Card.

gatewayType?

string

The payment gateway associated with this saved payment method.

paymentMethodProperties?

Record<string, string>

Map to capture any gateway-specific information needed to perform gateway transactions

attributes?

Record<string, string>

General use map to capture any additional attributes needed for this saved payment method.

displayAttributes?

Record<string, string>

General use map to capture any display properties for this saved payment method.

billingAddress?

Address

The billing address associated with this saved payment method.

version

number

The version of this saved payment method. Used for checking that the requested version of the saved payment is up-to-date before saving changes. Required for any request which results in an update being made to the saved payment method. This should never be manually incremented/decremented.

visibleToChildren

DefaultChildrenVisibilityType | string

Describes the type of this payment’s visibility to child accounts

nextAction?

SavedPaymentMethodAction

The next action to execute to complete setup this payment method

UserPermissionRef

Property Type Description

id

string

The id of the user permission.

name

string

The name of the user permission.

UserRole

Representation of a user role that can be assigned to an Account or a User, such as customers or admin users.

Property Type Description

id

string

The context ID of the user role.

name

string

The name of the user role.

archived

boolean

Set to true when the role is soft-deleted/unavailable for assignment.

lastUpdated

Instant

Indicates when the role was last updated.

permissions

Set<UserPermissionRef>

Permissions that this role has been assigned and has inherited from the parent role as indicated by the parentRoleId.

parentRoleId

string

The id of the parent role for this role, if any.

accountRole

boolean

Set to true if the role is for accounts only.

friendlyName

string

The name that is formatted for display purposes for this role.

description

string

The description of this role.