Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Carts API: Line Items, Totals, and Inventory Snapshots

via CodeSignal

Overview

Introduce shopping carts and cart items. You'll create carts, add and update items, and return computed totals. This course establishes the data flow that powers checkout in the final course.

Syllabus

  • Unit 1: Creating and Viewing Carts
    • Observe Cart Creation and Retrieval
    • Implement Cart Creation
    • Implement Cart Retrieval with Totals
    • Harden GET /api/carts/:id
  • Unit 2: Adding Cart Line Items
    • Observe Adding Items and Price Snapshots
    • Validate Add-Item Payloads
    • Make Add-or-Increment Atomic
    • Enforce Inventory and Return 201
  • Unit 3: Managing Cart Line Items
    • Observe Quantity Updates and Deletion
    • Implement Update and Delete in cartsRepo
    • Enforce Rules for Quantity Updates
    • Complete PATCH/DELETE Routing and Deletion

Reviews

Start your review of Carts API: Line Items, Totals, and Inventory Snapshots

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.