# External API Error Invalid Type: Object (Expected Array)

**URL:** <https://discourse.nodered.org/t/external-api-error-invalid-type-object-expected-array/80393>\
**Category:** General\
**Tags:** http-request\
**Created:** [8 August 2023 01:39 UTC](https://discourse.nodered.org/t/external-api-error-invalid-type-object-expected-array/80393 "2023-08-08T01:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillShiell](https://avatars.discourse-cdn.com/v4/letter/w/76d3ee/32.png) [@WillShiell](https://discourse.nodered.org/u/WillShiell)\
**Post date:** [8 August 2023 01:39 UTC](https://discourse.nodered.org/t/external-api-error-invalid-type-object-expected-array/80393/1 "2023-08-08T01:39:47Z")

</div>

Hello,

I am seeing an error with a PATCH call I am making and receiving the following error message:  
{"message":"validation failure","errors":[{"dataPath":"","message":"Invalid type: object (expected array)"}]}

However the req.body that I am sending is:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/4/247c12bfd1815325ebe52fe052295d1a0cbecb69.png)  
(Json only version)

```auto
[
    {
        "op": "replace",
        "path": "/label",
        "value": "North America"
    }
]

```

I have opened up a ticket with the external api service for assistance, but I am wondering if I am potentially missing something as I am structuring my JSON body.

Appreciate any help!  
-Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 October 2023 01:40 UTC](https://discourse.nodered.org/t/external-api-error-invalid-type-object-expected-array/80393/2 "2023-10-07T01:40:19Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
