magento2magento-rest-api

Magento 2 - Where to find the complete REST API documentation


It seems like the official Magento 2 REST API Documentation is not complete.

I found this code in a application of one of our ex colleagues:

protected function addItemToCart($cartId, $cartItem)
{
    return $this->client->request('POST', "carts/{$cartId}/items", [
        'json' => [
            'cartItem' => $cartItem,
        ],
    ]);
}

But I can't find any documenation for carts/{$cartId}/items.

The nearest I can find is: /V1/guest-carts/{cartId}/items

Where can I find the documentation for carts/{$cartId}/items?


Solution

  • There isn't a POST method available on the carts/{$cartId}/items route.


    So there's probably something else going on, could be one of these:


    Consider using the ReDoc Documentation page.