Hi there, I am trying to create a webhook in Zapier to create a catalog item in Square. Here’s some things to know…
-
In the code below, the double curly braces e.g. {{236150602__Price for Square API}} represent dynamic data fields in Zapier.
I believe that when the webhook is triggered, those values are replaced with the actual data, otherwise the non-expressed values like {{236150602__Price for Square API}} would be looking at that opening curly brace as an open bracket. -
My problem is that I am getting a 400 response in Zapier which unhelpfully tells me that “Failed to create a request in Webhooks by Zapier. Field must be set (HTTP Status Code: 400)” This sounds like a required field isn’t filled in, but it doesn’t tell me which one.
-
I’ve looked through the endpoint and I think I have the required fields below, but this is my first foray into APIs, so reading the docs is a little heavy!
Could anyone look at the below and let me know if there’s anything obvious from a syntax or missing data point of view?
Equally if anyone has any Zapier experience, I would happily pay for your expertise to get this finished!
{
"idempotency_key": "{{236150602__id}}{{zap_meta_timestamp}}",
"batches": [
{ "objects": [
{
"type": "ITEM",
"id": "#{{236150602__id}}",
"updated_at": "{{zap_meta_timestamp}}",
"created_at": "{{zap_meta_timestamp}}",
"present_at_all_locations": false,
"present_at_location_ids": [
"LJCAQQ7GEX7JZ"
],
"item_data": {
"name": "{{236150602__Name}}",
"is_taxable": true,
"variations": [
{
"type": "ITEM_VARIATION",
"id": "#NEW{{236150602__id}}",
"is_deleted": false,
"present_at_all_locations": false,
"present_at_location_ids": [
"LJCAQQ7GEX7JZ"
],
"item_variation_data": {
"item_id": "{{236150602__id}}",
"name": "{{236150602__Name}}",
"sku": "{{236150602__EAN for Automation}}",
"upc": "{{236150602__EAN for Automation}}",
"ordinal": 1,
"pricing_type": "FIXED_PRICING",
"price_money": {
"amount": {{236150602__Price for Square API}},
"currency": "GBP"
},
"location_overrides": [
{
"location_id": "LJCAQQ7GEX7JZ",
"track_inventory": true
}
],
"track_inventory": true,
"sellable": true,
"stockable": true,
"default_unit_cost": {
"amount": {{236150602__Cost Price for Square API}},
"currency": "GBP"
},
"item_variation_vendor_info_data": {
"ordinal": 1,
"sku": "{{236150602__Brand ID}}",
"price_money": {
"amount": {{236150602__Price for Square API}},
"currency": "GBP"
},
"item_variation_id": "#NEW{{236150602__id}}",
"vendor_id": "{{236150602__Brand ID}}"
}
}
}
],
"product_type": "REGULAR",
"skip_modifier_screen": false,
"ecom_available": false,
"ecom_visibility": "UNINDEXED",
"categories": [
{
"id": "{{236150602__Square Category ID (from Categories)}}",
"ordinal": "{{236150602__Square Ordinal Depth (from Categories)}}"
}
],
"reporting_category": {
"id": "{{236150602__Square Category ID (from Categories)}}",
"ordinal": "{{236150602__Square Ordinal Depth (from Categories)}}"
}
}
}]
}]}