# PROPERTY\_DOESNT\_EXIST when trying to create product via API

**URL:** <https://community.hubspot.com/t/property-doesnt-exist-when-trying-to-create-product-via-api/114990>\
**Category:** APIs & Integrations\
**Tags:** php\
**Created:** [August 21, 2024, 8:28pm UTC](https://community.hubspot.com/t/property-doesnt-exist-when-trying-to-create-product-via-api/114990 "2024-08-21T20:28:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JNichel](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@JNichel](https://community.hubspot.com/u/JNichel)\
**Post date:** [August 21, 2024, 8:28pm UTC](https://community.hubspot.com/t/property-doesnt-exist-when-trying-to-create-product-via-api/114990/1 "2024-08-21T20:28:40Z")

</div>

Hi all. I’m trying to create a product in HubSpot via the API but I’m running into an error that I can’t make sense of. I’m using PHP and cURL and my payload for this test product is below:

```lia-code-sample
{
	"properties":
	{
		"name": "8' Bar Foot Rail Kit - Polished Brass - 2 OD - Decorative Bar Rail Bracket + Domed End Cap",
		"price": "486.99",
		"hs_sku": "99000120",
		"ns_sku": "PB-8FT-DEC-DOMED-KIT",
		"description": "8' Bar Foot Rail Kit - Polished Brass - 2 OD - Decorative Bar Rail Bracket + Domed End Cap",
		"is_netsuite_product": "Y",
		"netsuite_product_id": "174733"
	}
}

```

And when I post it to /crm/v3/objects/contacts, I get the following error:

```lia-code-sample
(
 [status] => error
 [message] => Property values were not valid: [{"isValid":false,"message":"Property \"description\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"description","localizedErrorMessage":"Property \"description\" does not exist","portalId":6632597},{"isValid":false,"message":"Property \"is_netsuite_product\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"is_netsuite_product","localizedErrorMessage":"Property \"is_netsuite_product\" does not exist","portalId":6632597},{"isValid":false,"message":"Property \"hs_sku\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"hs_sku","localizedErrorMessage":"Property \"hs_sku\" does not exist","portalId":6632597},{"isValid":false,"message":"Property \"ns_sku\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"ns_sku","localizedErrorMessage":"Property \"ns_sku\" does not exist","portalId":6632597},{"isValid":false,"message":"Property \"price\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"price","localizedErrorMessage":"Property \"price\" does not exist","portalId":6632597},{"isValid":false,"message":"Property \"name\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"name","localizedErrorMessage":"Property \"name\" does not exist","portalId":6632597},{"isValid":false,"message":"Property \"netsuite_product_id\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"netsuite_product_id","localizedErrorMessage":"Property \"netsuite_product_id\" does not exist","portalId":6632597}]
 [correlationId] => f9630436-8bc3-43b9-a05e-979429c3634e
 [category] => VALIDATION_ERROR
)

```

Thing is, these properties do exist. Take ‘hs\_sku’ for example. This is a HubSpot field that exists normally:

 ![hs_sku.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/8/5846651b851ea9c3471a9b6d68e7a0d772c2c10d.jpeg)

But the response is telling me it doesn’t exist. Found another post with someone having this type of problem with adding a contact but he said that he solved it by correcting the name of the field in his code. I’ve double and triple checked them to make sure I have their names correct, even going so far as copying and pasting them from the HubSpot property editor. I’d appreciate a second set of eyes that may see what I’m missing.

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 22, 2024, 9:34am UTC](https://community.hubspot.com/t/property-doesnt-exist-when-trying-to-create-product-via-api/114990/2 "2024-08-22T09:34:45Z")

</div>

Hi @JNichel,

I think the issue is that you are calling the wrong endpoint, you reference “/crm/v3/objects/contacts/” when infact it should be “/crm/v3/objects/products”.

For example see this request:

```lia-code-sample
POST https://api.hubapi.com/crm/v3/objects/products
BODY 
{
 "properties": {
 "name": "8' Bar Foot Rail Kit - Polished Brass - 2 OD - Decorative Bar Rail Bracket + Domed End Cap",
 "price": "486.99",
 "hs_sku": "99000120",
 "ns_sku": "PB-8FT-DEC-DOMED-KIT",
 "description": "8' Bar Foot Rail Kit - Polished Brass - 2 OD - Decorative Bar Rail Bracket + Domed End Cap",
 "is_netsuite_product": "Y",
 "netsuite_product_id": "174733"
 }
}

RESPONSE CODE 201
BODY
{
 "id": "3895615460",
 "properties": {
 "createdate": "2024-08-22T09:31:58.733Z",
 "description": "8' Bar Foot Rail Kit - Polished Brass - 2 OD - Decorative Bar Rail Bracket + Domed End Cap",
 "hs_lastmodifieddate": "2024-08-22T09:31:58.733Z",
 "hs_object_id": "3895615460",
 "hs_object_source": "INTEGRATION",
 "hs_object_source_id": "3756289",
 "hs_object_source_label": "INTEGRATION",
 "hs_sku": "99000120",
 "is_netsuite_product": "Y",
 "name": "8' Bar Foot Rail Kit - Polished Brass - 2 OD - Decorative Bar Rail Bracket + Domed End Cap",
 "netsuite_product_id": "174733",
 "ns_sku": "PB-8FT-DEC-DOMED-KIT",
 "price": "486.99"
 },
 "createdAt": "2024-08-22T09:31:58.733Z",
 "updatedAt": "2024-08-22T09:31:58.733Z",
 "archived": false
}

```

and the Output in my HubSpot portal:

 ![Screenshot 2024-08-22 at 10.37.03.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/9/b9068af9f845667790d3dad5894f13dfff74b1ab.png)

I’ve recorded a short video running through how I go about creating a product via the HubSpot API using [this endpoint](https://developers.hubspot.com/beta-docs/reference/api/crm/objects/products#post-%2Fcrm%2Fv3%2Fobjects%2Fproducts).

- [Create a HubSpot Product via the API](https://share.vidyard.com/watch/X8FnhSigRtphbm2EDZCXLS?)

I hope this helps!

Jack

---

<div class="post-metadata">

**Author:** ![JNichel](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@JNichel](https://community.hubspot.com/u/JNichel)\
**Post date:** [August 22, 2024, 12:39pm UTC](https://community.hubspot.com/t/property-doesnt-exist-when-trying-to-create-product-via-api/114990/3 "2024-08-22T12:39:46Z")

</div>

Jack,

Thank you for this. I’m a bit embarassed that I didn’t catch that. Tis what I get for copying code from one script to this one.

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 22, 2024, 1:33pm UTC](https://community.hubspot.com/t/property-doesnt-exist-when-trying-to-create-product-via-api/114990/4 "2024-08-22T13:33:45Z")

</div>

Hey @JNichel, no worries at all - happens the best of us! 😂 Glad you are sorted now anyways!
