400 Error on company create but company still created

companies

#1

I am attempting to force failure on company create, however, even though the api is correctly returning a 400 because my data is invalid, I am still successfully creating this company.

Please advise,

Thanks

Response from api

{"code":400,"headers":{"date":"Fri, 08 Jun 2018 15:59:06 GMT","content-type":"application/json;charset=utf-8","content-length":"1046","connection":"close","set-cookie":["__cfduid=d582061202def58d90079b47dc4055ec71528473546; expires=Sat, 08-Jun-19 15:59:06 GMT; path=/; domain=.hubapi.com; HttpOnly"],"access-control-allow-credentials":"false","x-trace":"2B675133582698E963AF834929C902B9A89231B6AF000000000000000000","expect-ct":"max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"","server":"cloudflare","cf-ray":"427c904f8fde2438-IAD"},"body":"{"status":"error","message":"Property values were not valid","correlationId":"f0bc2cb1-e127-4296-bcfb-b5d5754f57c5","validationResults":[{"isValid":false,"message":"Invalid deal stage id. Valid options are: [7f163882-3e57-435f-8626-157f7f5ad56f, 61958a0e-9989-44b7-8189-b52ca16a0c4e, 0448b1a3-d14f-43d3-81d5-b49cd94a8471, appointmentscheduled, 8d78ccfc-0fe6-42e9-bc49-f16f0356d1b6, f3c91b34-c573-4b03-898a-806f90189837, 30dc224e-f01a-47ef-b79b-5d0a44ce17c8, c287c5c8-f25e-4ecd-afef-15ae3e5c07ce, 2fb724bf-af19-49dd-8ba5-3e3e47387f29, 2d0809ca-99bc-45e3-9887-9120b4660410, b8166393-61f3-4a3c-88b5-1adc6873e437, 54a8d6c6-c31a-4ca9-b765-607cbe40f438, 8d2c69d9-7ec8-4566-9dfd-c03a3fdb476f, 3d49c6d8-bf27-4cbb-a0de-2e09c285aa25, 18dcb698-4ea4-415f-839f-4c9192ee6ef2, acdcc22e-5f15-49b7-be22-43a099146a25, ca9395af-ee75-4962-9e44-8d57e009cea0, 6c910132-e4e7-4f30-b21d-f6a6718fc793, 763e0de7-855a-4633-94cb-80c0de4bd36d, a8080325-3221-42a5-a672-e618f50997cc]","error":"INVALID_OPTION","name":"dealstage"}],"requestId":"c0357b27b195f71063f42caa00c3a87f"}"}


#2

Figured it out where the api is failing.

Thanks