Cart / Line Items
Add an Item to Cart
Adds a variant to the current cart by creating a line item. Each line item represents a specified variant and the desired quantity.
POST
Authorizations
Order token to authorize Cart and Checkout requests.
Query Parameters
Specify the related resources you would like to receive in the response body. More Information.
Specify the fields you would like returned in the response body. More information.
Body
application/vnd.api+json
Additional parameters can be passed in the options hash. Each custom parameter must be registered in config/initializers/spree.rb
, eg.
Spree::PermittedAttributes.line_item_attributes << :foo
The body is of type object
.
Response
200
application/vnd.api+json
200 Success - Returns the cart
object.
The response is of type object
.