# error update deal api php

**URL:** <https://community.hubspot.com/t/error-update-deal-api-php/65331>\
**Category:** HubSpot Ideas\
**Tags:** api\
**Created:** [September 18, 2022, 11:54pm UTC](https://community.hubspot.com/t/error-update-deal-api-php/65331 "2022-09-18T23:54:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SMarquez\_1](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@SMarquez\_1](https://community.hubspot.com/u/SMarquez_1)\
**Post date:** [September 18, 2022, 11:54pm UTC](https://community.hubspot.com/t/error-update-deal-api-php/65331/1 "2022-09-18T23:54:59Z")

</div>

hi, this is my implementation

$client = Factory::createWithAccessToken(env(‘HBP\_KEY’));

```
    $properties = \[

        "ventas\_anuales\_\_last\_12\_months\_" => $subtotal

    ];

    $SimplePublicObjectInput = new \HubSpot\Client\Crm\LineItems\Model\SimplePublicObjectInput(\['properties' => $properties]);

    try {

        $apiResponse = $client->crm()->deals()->basicApi()->update($id\_deal,$SimplePublicObjectInput);

        return $apiResponse;

    } catch (ApiException $e) {

        echo "Exception when calling basic\_api->update: ", $e->getMessage();

    }

```

this is the error:

Exception when calling basic\_api-\>update: [400] Client error: `PATCH [https://api.hubapi.com/crm/v3/objects/deals/9837609656\`](https://api.hubapi.com/crm/v3/objects/deals/9837609656%5C%60) resulted in a `400 Bad Request` response: {“status”:“error”,“message”:“No properties found to update, please provide at least one.”,“correlationId”:"c468b0b6-abb2 (truncated…)

the property exists and also has read and write permissions for all

---

<div class="post-metadata">

**Author:** ![dmiller946](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@dmiller946](https://community.hubspot.com/u/dmiller946)\
**Post date:** [October 18, 2022, 5:57am UTC](https://community.hubspot.com/t/error-update-deal-api-php/65331/2 "2022-10-18T05:57:53Z")

</div>

Hi Idea,

There are several scenarios in which a 400 Bad Request Error could appear in an application, but below are the most likely causes:

- You may be sending deceptive request routing information. Some web applications/web servers look for custom HTTP headers to process requests and verify the client isn’t attempting anything malicious. If an expected custom HTTP header is missing or invalid, a 400 error is a likely result.
- You may be uploading a file that is too large. Most web servers or applications have an explicit file size limit that prevents files that are too big from being uploaded. This is to prevent bandwidth clogging.
- You try to accessing an invalid URL. If the client is sending a request to an invalid URL — particularly one that is malformed via improper characters — this could result in an http error 400.
- you may using an invalid or expired local cookie. Again, this could be malicious or accidental. It’s possible that a local cookie in the web browser is identifying you via a session cookie. If this particular session token matches the session token from _another_ request from a different client, the server/application may see this as a malicious act and produce a 400 Bad Request Error code.

Try to consider this thing to fix. May help.

[

usps tracking

]([https://usps-track.us](https://usps-track.us))

Dav
