GetBundleComponentsAsync (...)

Introduction
Returns the bundles available to the account, with their components and prices. Use the returned component IDs and product codes to build the BundleComponentSelections of the order items you send to PostOrder.
  • When bundleProductCode is empty, returns every available bundle. Bundles that fail the checks of this call, such as bundles with no price for the destination, are left out.
  • When bundleProductCode is set, returns that bundle. If it fails the checks of this call, the call fails with an error or returns no bundles.
  • Pass the same shipToId, assignToId, isBulkOrder and shippingLocalType that you will send to PostOrder. They decide the prices and hide products that cannot be shipped to the destination.
  • Prices are worked out without a promo code. With a promo code, PostOrder can charge different prices and can pick a different contract offering; the acknowledgements must use the offering PostOrder picks, and its error lists the pairs it expects.
  • A returned bundle is not a promise that the order will be accepted. PostOrder makes the final check and can reject the order, for example when the ship-to and assign-to contacts belong to different companies.
Opex and Capex bundles (see ApiBundleTemplate.PricingModel):
  • Opex (BundlePriced): the bundle's PurchasePrice and MonthlyPrice are the charges, and the component prices are zero. When the bundle lists RequiredTermsAndConditionsIds, get the terms with GetContractOfferingTermsAndConditionsAsync and send the acknowledgements on the order item.
  • An Opex bundle returned without a ContractOfferingId cannot be ordered: PostOrder rejects it.
  • Capex (ComponentPriced): each kept component is charged the PurchasePrice or MonthlyPrice shown for its product, per unit, and a product PostOrder adds (see ProductDependencies) is charged its own purchase price on top. Do not send terms acknowledgements for a Capex bundle.
  • Capex bundles are returned only where Capex bundle ordering is enabled. Elsewhere they are left out, and a request for one by code fails with "Capex bundle '...' is not available for ordering."
Geotab must enable bundle ordering for the account. For an account that is not enabled, the call returns no bundles, and a request by code fails with "Product '...' not found or not available for the specified account." Where bundle ordering is switched off entirely, the call fails with "Bundle order support is not enabled."
Parameters

apiKey

The active API Key.

assignToId

The assign-to contact ID you will send as ApiOrderHeader.AssignToId. It must be an active contact on forAccount; its company is the customer used for pricing. Defaults to shipToId for non-bulk orders. Leave it out for bulk orders: any value, even 0, is rejected.

bundleProductCode

The product code of one bundle, matched ignoring case and surrounding spaces (dashes must match). Send an empty string to return every available bundle. Fails when the product is not found or not available for the account, or is not a bundle.

forAccount

The account the order is for.

isBulkOrder

When true, prices against the account's default region with no customer; shipToId is optional and assignToId must be left out. Requires the BULKORDER account option to be enabled and a default region on the account. For a bulk order, still pass shipToId or shippingLocalType so that products that cannot be shipped to the destination are hidden.

sessionId

The active session ID.

shippingLocalType

The local pickup location you will send as ApiOrderHeader.ShippingLocalType (LOCAL_CANADA or LOCAL_BRAZIL); see GetLocalPickupLocations. Cannot be combined with shipToId. It sets the pickup country whose product restrictions apply and, unless isBulkOrder is true, the region used for pricing.

shipToId

The ship-to contact ID you will send as ApiOrderHeader.ShipToId. It must be an active contact on forAccount. Its country sets the pricing region (unless isBulkOrder is true) and hides products that cannot be shipped there. It cannot be combined with shippingLocalType. Unless isBulkOrder is true, shipToId or assignToId is required.
Return value
Array of ; no bundles when none are available.
Code samples

Loading API Runner...