I can't seem to insert any data when there is a hierarchial partition key. I keep getting the "(Partition key provided either doesn't correspond to definition in the collection or doesn't match partition key field values specified in the document." error but it doesn't make sense as I am providing the right key and document has those values
'key' variable is a string variable containing a guid:

dynamic document = new
{
Id = key,
ObjectName = "PlayerInfo",
PlayerID = key,
PlayerInfo = "foobarbaz"
// other document properties
};
string partitionKeyValue = $"/{document.ObjectName}/{document.PlayerID}";
ItemResponse<dynamic> resp = await container.CreateItemAsync(document, new PartitionKey(partitionKeyValue));
Since you're using a hierarchical partition key, you need to specify all the parts of the partition key. In your case, maybe construct your partition key with something like this:
You can compare using
PartitionKeyBuilder().Build()output to the partition key value you constructed, to see what the differences are...