Add a product to a cart

Add a product to an existing cart.

Request

POST https://api.nexway.store/carts/public/{id}/addproduct

Path parameters

Parameter name Value Description Additional
id string

id

Required

Request body

The request body takes a complete ProductUpdate resource, containing the following writable properties:

{
    "discounts": [
        "string"
    ],
    "products": {
        "<key>": {
            "quantity": "int32"
        }
    }
}

Properties

Name Type Description Additional
discounts[] array of string Optional
products object

map of products id in the cart with its quantity

products.<key> map of object ProductInput Optional
products.<key>.quantity int32

This is the product quantity.

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
200 OK

Success

Cart
401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Failure


Explore this API

id

id

productUpdate

productUpdate

Request Content-Type
Response Content-Type
Try it out!