SDK Example: Add a Child Product to the Basket (Fall '19)
Use the example SDK code in this topic to add a child product to a basket.
Possible error conditions:
"AddToCartInput::getAPIPath() must have catalogCode."
"AddToCartInput::getAnonymousSiteRestUrl() must have catalogCode."
"AddToCartInput::getRequestPayload() must have basketAction."
"AddToCartInput::getRequestPayload() must have rootProductCode when basketAction is 'AddChildProduct'."
"AddToCartInput::getRequestPayload() must have parentLineKey when basketAction is 'AddChildProduct'."
"AddToCartInput::getRequestPayload() must have parentHierarchyPath when basketAction is 'AddChildProduct'."
"AddToCartInput::getRequestPayload() must have offer when basketAction is 'AddChildProduct'."
"AddToCartInput::getRequestPayload() must have cartContextkey when basketAction is 'AddChildProduct'."
"AddToCartInput::getRequestPayload() must have bundleContextKey when basketAction is 'AddChildProduct'."