How do I determine the values to use in the payload for the add to cart method in the Commerce API The documentation for the Commerce API gives the example payload below for adding items to a cart. How do I find the type and ID values for the product variants in my store configuration?
{
  &quot;data&quot;: [
    {
      &quot;type&quot;: &quot;product-variations--default&quot;,
      &quot;id&quot;: &quot;e8daecd7-6444-4d9a-9bd1-84dc5466dba7&quot;,
      &quot;meta&quot;: {
        &quot;quantity&quot;: 1
      }
    }
  ]
}
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;
        }