Malformed json? AJAX Cart API

Can somebody tell me what’s wrong with this JSON? I’m trying to add variants to the cart and keep getting 400 bad request. “{“status”:“bad_request”,“message”:“Parameter Missing or Invalid”,“description”:“Required parameter missing or invalid: items”}”

Here’s my json string as it stands now, but it’s gone through a million permutations with the same results. I’m wondering if it’s a content type error I’m missing? I may just have spent so much time in front of my screen today that I’m not thinking clearly. That’s always a possibility. Anyway here’s the json:

"items": [
  {
    "id": "41305491210413",
    "quantity": "1",
    "properties": {
      "url": "https://upload.cloudlift.app/s/printify-canada/ekLpytDslL.png"
    }
  },
  {
    "id": "41305491308717",
    "quantity": "1",
    "properties": {
      "url": "https://upload.cloudlift.app/s/printify-canada/R5XSVqAlel.png"
    }
  }
]

and just in case I’ve lost all my faculties, here’s the ajax request. Not much to it at the moment.

$.ajax({
                    url: '../cart/add.js', 
                    type: 'post',
                    dataType: 'json',
                    data: json,
                    success: function(data){
                    	console.log(data);
                    },
                    error: function(data){
                    	console.log(data)
                    }
                  });
                }

I’m kind of at a loss here. I’m sure it’s something really stupid and I’ll feel dumb for even asking, because it just feels like that kind of day lol

Still don’t know what exactly the issue was, but I fixed it, so clearly it is past my bed time.

I think 1. missing content-type is why I was getting a bad request/missing parameter, and 2. there was definitely something wrong with my JSON, but just decided to reimplement the code that creates the object, before stringifying it, and hey look it worked this time. Working code:

var jsonObj = [];

var vid = $(this).parents('.printarea').attr('data-vid');
var url = $(this).parents('.printarea').find("input[type=hidden][name='properties["+$(this).parents('.printarea').attr('id')+"]']").val();
        
jsonObj.push({
	quantity: 1,
  id: vid,
  properties: {
  	'url': url
  }
});                      
  
var finaljson = {'items': jsonObj};

$.ajax({
  url: '../cart/add.js', 
  type: 'post',
  dataType: 'json',
  contentType: 'application/json',
  data: JSON.stringify(finaljson),
  success: function(data){
  	console.log(data);
  },
  error: function(data){
  	console.log(data)
  }
});