Properties missing from custom object

Hello. I am trying to get the properties for a custom object, and I can’t find anything when using the hubspot client. I’m guessing there’s something I’ve missed, but I can’t find any documentation that is helpful.

With the following code:

const associations = await client.crm.deals.associationsApi.getAll(
 dealId,
 'car',
);
const [id] = associations.results.map((item) => item.id);
const car = await client.crm.objects.basicApi.getById('car', id, ['Modell']);
console.log(car);

I am seeing the following output:

SimplePublicObjectWithAssociations {
 id: '416093891',
 properties: {
 hs_createdate: '2022-09-20T09:08:02.811Z',
 hs_lastmodifieddate: '2022-09-20T09:39:03.827Z',
 hs_object_id: '416093891'
 },
 createdAt: 2022-09-20T09:08:02.811Z,
 updatedAt: 2022-09-20T09:39:03.827Z,
 archived: false
}

There should be a massive amount of properties on this object, but I can only see the three standard hs properties. Where’s the rest of them? How do I fetch all of them? I’ll attach a screenshot of the custom object from my sandbox.

You have to specify the properties you want returned. Per your code, if ‘Modell’ is the underlying field name you should be getting that back. (Those may be case sensistive and since you have a capital M and it’s not there I suspect it is.)
Either way, your array of field property names needs to include all the properties you want back from the API. You can’t use the display name either, you need to use the underlying property name which can be seen when you edit the property in your object settings by clicking the </> icon.

const car = await client.crm.objects.basicApi.getById('car', id, ['modell','field_b','field_c','field_d']);

Is there a way to get wildcard? All properties on an object?

Where do I check my property names for the custom object?

Here is a link to the KB article that talks about where to find the internal name. I don’t think there is a “get all” type thing.