# Can't send values to Airtable API using patch

**URL:** <https://community.parabola.io/t/cant-send-values-to-airtable-api-using-patch/1056>\
**Category:** Ask a question\
**Created:** [September 10, 2020, 9:40pm UTC](https://community.parabola.io/t/cant-send-values-to-airtable-api-using-patch/1056 "2020-09-10T21:40:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Lyon](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@Jonathan\_Lyon](https://community.parabola.io/u/Jonathan_Lyon)\
**Post date:** [September 10, 2020, 9:40pm UTC](https://community.parabola.io/t/cant-send-values-to-airtable-api-using-patch/1056/1 "2020-09-10T21:40:23Z")

</div>

Struggling with parabola ‘send to api’ module while trying to update an airtable table.  
I’m doing an update (patch) and I’m trying to send some numerical values.

```auto
{
  "records": [
    {
      "id": "{inventory record id}",
 "fields": {
 "sku":"{sku}",
 "in stock":"{in stock}",
 "prev stock":"{prev stock}",
 "updated":"{updated}"
        }
    }
  ]
}

```

If I send this I get an error stating that the ‘in stock’ and ‘prev stock’ can’t accept the values (because airtable is seeing the values as text trying to be inserted into a number field).

This works fine when creating records (Post) as I use typecast: true. It doesn’t work for Patch though even if I add typecast: true. It throws a different error.

If I change the json to this and remove the quotes from the value fields :-

```auto
{
  "records": [
    {
      "id": "{inventory record id}",
 "fields": {
 "sku":"{sku}",
 "in stock":{in stock},
 "prev stock":{prev stock},
 "updated":{updated}
        }
    }
  ]
}

```

Then it says my json isn’t valid.

Any ideas?

Thanks

Jonathan

---

<div class="post-metadata">

**Author:** ![michelle](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/michelle/32/40_2.png) [@michelle](https://community.parabola.io/u/michelle)\
**Post date:** [September 10, 2020, 11:00pm UTC](https://community.parabola.io/t/cant-send-values-to-airtable-api-using-patch/1056/2 "2020-09-10T23:00:59Z")

</div>

Hi Jonathan,

Are “in stock” or “prev stock” ever blank in your flow? If so, if they’re returning a blank into the json that might cause it to be invalid.

Best,  
Michelle

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lyon](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@Jonathan\_Lyon](https://community.parabola.io/u/Jonathan_Lyon)\
**Post date:** [September 10, 2020, 11:31pm UTC](https://community.parabola.io/t/cant-send-values-to-airtable-api-using-patch/1056/3 "2020-09-10T23:31:21Z")

</div>

Hi Michelle

Good point, but I run a regex that replaces ^$ with a 0 just in case.

I have it working now and it appears that I need the updated field (datetime field) to be in quotes:-

```auto
{
  "records": [
    {
      "id": "{inventory record id}",
 "fields": {
 "sku":"{sku}",
 "in stock":{in stock},
 "prev stock":{prev stock},
 "updated":"{updated}"
        }
    }
  ]
}

```

This now works 🙂

This was my first use of Parabola webhooks to bring in shopify orders into airtable.

It took me about 30 credits to get it working but I got there in the end!!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/1X/0b667300204b3bf0d8a29ebdaddc00f6e6279491.png)

Thanks

Jonathan

---

<div class="post-metadata">

**Author:** ![michelle](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/michelle/32/40_2.png) [@michelle](https://community.parabola.io/u/michelle)\
**Post date:** [September 11, 2020, 3:30pm UTC](https://community.parabola.io/t/cant-send-values-to-airtable-api-using-patch/1056/4 "2020-09-11T15:30:34Z")

</div>

Good catch with the date field and glad you got it working!

---

<div class="post-metadata">

**Author:** ![andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/andrew/32/36_2.png) [@andrew](https://community.parabola.io/u/andrew)\
**Post date:** [September 11, 2020, 8:37pm UTC](https://community.parabola.io/t/cant-send-values-to-airtable-api-using-patch/1056/5 "2020-09-11T20:37:54Z")

</div>

@Jonathan_Lyon – glad you got this working. Sorry you had to use so many credits though…send me a note (along with the email address associated with your Parabola account) at [andrew@parabola.io](mailto:andrew@parabola.io) and I’ll refund those for you 🙂
