Create deal api

Hi

I’m passing in the payload as per the documentation to create a single deal. A deal appears but everything is blank?

Regards

Chris

Hey, @chriselliston :waving_hand: Did you get this resolved? If not, can you share an example request, response, and a screenshot of where the deal record should be, please?

This helps the community reproduce your issue and, hopefully, spot what is going on. Or provide a next step when possible.

Talk soon! — Jaycee

Hi Jaycee

Yes, i managed to resolve this. I was passing the wrong payload in to create a single deal.

For other users, this was the payload that worked…

{“properties” :

{

“amount”: “1500.00”,

“dealname”: “Custom data integrations”,

“pipeline”: “default”,

“closedate”: “2019-12-07T16:50:06.678Z”,

“dealstage”: “presentationscheduled”,

“hubspot_owner_id”: “1189703102”

}

}

While trying this payload then an error occurred:

{

“status”: “error”,

“message”: “Invalid input JSON on line 12, column 1. Some required fields were not set: [name, label, type, fieldType, groupName]”,

“correlationId”: “4648414c-7f2c-4be0-b139-a3be03c53299”,

“category”: “VALIDATION_ERROR”

}
How to fix it, please suggest further

Hi, I have the same situation.

Request

{

“properties”: {

“amount”: “1500.00”,

“closedate”: “2019-12-07T16:50:06.678Z”,

“dealname”: “New deal”,

“pipeline”: “default”,

“dealstage”: “contractsent”

}

}
Response

{

“status”: “error”,

“message”: “Invalid input JSON on line 9, column 1. Some required fields were not set: [name, label, type, fieldType, groupName]”,

“correlationId”: “99d6579c-d577-4e31-9ca1-ab5abe82b3ae”,

“category”: “VALIDATION_ERROR”

}

I have the same situation.

Request

{

“properties”: {

“amount”: “1500.00”,

“closedate”: “2019-12-07T16:50:06.678Z”,

“dealname”: “New deal”,

“pipeline”: “default”,

“dealstage”: “contractsent”

}

}
Response

{

“status”: “error”,

“message”: “Invalid input JSON on line 9, column 1. Some required fields were not set: [name, label, type, fieldType, groupName]”,

“correlationId”: “99d6579c-d577-4e31-9ca1-ab5abe82b3ae”,

“category”: “VALIDATION_ERROR”

}

Hey, @scamillo :waving_hand: I tried your request body using Postman and was able to create a deal with no issues.
Request

POST https://api.hubapi.com/crm/v3/objects/deals/

Body

{
"properties": {
"amount": "1500.00",
"closedate": "2019-12-07T16:50:06.678Z",
"dealname": "New deal 22",
"pipeline": "default",
"dealstage": "contractsent"
}
}

Response

{
 "id": "18150419773",
 "properties": {
 "amount": "1500.00",
 "amount_in_home_currency": "1500.00",
 "closedate": "2019-12-07T16:50:06.678Z",
 "createdate": "2024-03-21T16:54:34.031Z",
 "days_to_close": "0",
 "dealname": "New deal 22",
 "dealstage": "contractsent",
 "hs_closed_amount": "0",
 "hs_closed_amount_in_home_currency": "0",
 "hs_closed_won_count": "0",
 "hs_createdate": "2024-03-21T16:54:34.031Z",
 "hs_days_to_close_raw": "0",
 "hs_deal_stage_probability_shadow": "0.90000000000000002220446049250313080847263336181640625",
 "hs_forecast_amount": "1500.00",
 "hs_is_active_shared_deal": "false",
 "hs_is_closed": "false",
 "hs_is_closed_won": "false",
 "hs_is_deal_split": "false",
 "hs_is_open_count": "1",
 "hs_lastmodifieddate": "2024-03-21T16:54:34.031Z",
 "hs_object_id": "18150419773",
 "hs_object_source": "INTEGRATION",
 "hs_object_source_id": "959085",
 "hs_object_source_label": "INTEGRATION",
 "hs_projected_amount": "0",
 "hs_projected_amount_in_home_currency": "0",
 "pipeline": "default"
 },
 "createdAt": "2024-03-21T16:54:34.031Z",
 "updatedAt": "2024-03-21T16:54:34.031Z",
 "archived": false
}

Best,

Jaycee