How do I determine the values to use in the payload for the add to cart method in the Commerce API
I eventually located these using the path https://mydomain.com/jsonapi/product-variations/default.
A call to https://mydomain.com/jsonapi exposes the end-points you can use, based on your product configuration. Mine looked like this:
        &quot;product--default&quot;: {
            &quot;href&quot;: &quot;http:\/\/mydomain.com\/jsonapi\/products\/default&quot;
        },
        &quot;product-attribute&quot;: {
            &quot;href&quot;: &quot;http:\/\/mydomain.com\/jsonapi\/product-attributes&quot;
        },
        &quot;product-attribute-value--rate&quot;: {
            &quot;href&quot;: &quot;http:\/\/mydomain.com\/jsonapi\/product-attribute-values\/rate&quot;
        },
        &quot;product-type&quot;: {
            &quot;href&quot;: &quot;http:\/\/mydomain.com\/jsonapi\/product-types&quot;
        },
        &quot;product-variation--default&quot;: {
            &quot;href&quot;: &quot;http:\/\/mydomain.com\/jsonapi\/product-variations\/default&quot;
        },
        &quot;product-variation-type&quot;: {
            &quot;href&quot;: &quot;http:\/\/mydomain.com\/jsonapi\/product-variation-types&quot;
        }