Creates a shopping cart

Creates a Shopping Cart with all it's fields and relationships.

  • A prospect customer can create a cart

  • A customer can also create a cart, and the cart should be associated with the user.


Following validations are applied:

  • Product eligibility validation ensures the cart contains only eligible products. The validation checks are performed by an external service based on TMF679 Product Offering Qualification API REST Specification

    • The cart cannot be created if the given products do not fulfill the validation

    • It will validate if a offer can be swapped.

  • Service eligibility checks if the cart contains serviceable items. The validation checks are performed by an external service based on TMF645 - Service Qualification API REST Specification.

    • If the service is unqualified then the cart items are saved for later.

  • Custom validation ensures that the cart's content fulfills the tenant's validity rules, if such are pre-defined.

    • Each tenant is allowed to define validation rule sets, against which the validity of the cart shall be checked.

    • The cart cannot be created if it fails to meet the validation rule set.

  • Following validation are performed on Cart Item Relationship:

    • If cartItem Relationship Id exists.

    • If there exists another cartItem with same Id as cartItem Relationship Id

    • If cartItem Relationship type is one of the valid value. (Valid values are swap, swapped by, hasAddOn, depends on, ports-in, ported-in by).

    • If cartItem Relationship Id is not same as the cartItem Id.


The promotions are applied to the cart as follows

  • Promotions and discounts (Customer is eligible for) is applied to the shopping cart based on the selected /added product offerings.

  • Applied promotions are used from TMF671 - Promotion Management

  • Promotion is added automatically to the shopping cart based on the defined promotion criteria / conditions

  • The total price of the cart is recalculated when discount is applied.

  • If the customer updates the cart and updated cart does not satisfy promotion criteria, the promotion is automatically removed from the shopping cart and the total price is recalculated accordingly

Example BYOP payload

Can be called by: user,m2m,customer,unauthenticated

Required roles: sc.ops

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string

When sub-classing, this defines the sub-class entity name

string

When sub-classing, this defines the super-class

string

A URI to a JSON-Schema file that defines additional attributes and relationships

cartItem
array of objects
cartItem
contactMedium
array of objects
contactMedium
relatedParty
array of objects
relatedParty
cartTotalPrice
array of objects

An array which contains prices, which are separated and aggregated based on their priceType and recurringChargePeriod. If there is an amount ( total sum of all prices, which are for a product offering whose cartItem doesn't have a startDate or whose startDate is before or equal to today) that needs to be paid right away it will always be the FIRST element of the array and it will have an additional field type: @UpfrontTotalPrice. The rest of the elements contain prices which are the sum of all product offering prices, who have the same priceType and reccuringChargePeriod

cartTotalPrice
validFor
object

The period for which the shopping cart is valid (e.g. 90 if no activity or 7 days if cart is empty)

Headers
string
required

Required channel id to determine the channel through which the request is initiated

Responses
201

Cart Created

400

Bad Request

The following error messages can appear upon cart creation:

  • "Authorization required to set Related Party!" - Prospect Customers are not allowed to associate cart with related party

  • "Invalid id for related party!" - Logged in Customers are not allowed to associate cart with a different related party

  • Validations

    • "Offerings with ids: {(e.g. 1,2,3)} are ineligible!" - Lists the product offerings in the cart that fail to qualify against the product eligibility validation
    • If tenant's custom validation fails, the error message indicates which property of the given payload does not match the pre-defined rule set
409

Cart already exists

500

Internal server error

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!