I'm having trouble using the "Make an API call" feature for Etsy and can't seem to identify the issue.
I'm attempting to use the following endpoint: /v2/listings/{{2.listing_id}}/files
, as detailed in the documentation here.
The method is set to POST.
The header is Content-Type=multipart/form-data.
The body is configured as:
{
"name":"{{2.listing_id}}.zip"
"file":{{6.data}}
}
Where "data" represents the file content obtained using "Get a File" through the SFTP module.
I've also experimented with a body configuration using an HTTPS URL:
"file": "https://iansphark.direct.quickconnect.to/ai_art/Zip/{{1.fldVXWKji0O92HepP}}_upscale.png.zip",
"name": "1376920112.zip"
Regardless of whether I use the "data" variable or the HTTPS URL, I consistently receive the following error: "The operation failed with an error. [400]: The request body is too large."
Any assistance would be greatly appreciated!
Hi,
I haven't examined it in detail, but I believe you need to include the complete body content within curly braces { } in the request body as well.
Perhaps this will assist?
Good point! I neglected to mention that I've experimented with both including and excluding braces { } in the body.
I've also attempted prepending -F
to the body, given that it's content-type: multipart/form-data.
So, I've tried...
{ "name":"{{2.listing_id}}.zip" "file":{{6.data}} }
{ "file": "https://iansphark.direct.quickconnect.to/ai_art/Zip/{{1.fldVXWKji0O92HepP}}_upscale.png.zip", "name": "1376920112.zip" }
and
-F { "name":"{{2.listing_id}}.zip" "file":{{6.data}} }
-F {"file": "https://iansphark.direct.quickconnect.to/ai_art/Zip/{{1.fldVXWKji0O92HepP}}_upscale.png.zip", "name": "1376920112.zip" }
Unfortunately, without success. I'm not entirely certain about the cause of the problem.
To further troubleshoot this issue, I installed the Integromat DevTool extension for Chrome. I then inspected the request body for callin.io's Create a Listing module. After that, I copied the request body to the Make an API Call module. Both request bodies are identical, yet the Make an API Call module continues to fail.
Create a Listing module:
{
"_engineData": {
"calledAt": "Not available"
},
"response": {
"status": 201,
"headers": {
"server": "Apache",
"x-cloud-trace-context": "ef3d0b26a2d45e6c1cf5ba57c74d23bf/12405794120957242449;o=0",
"x-etsy-request-uuid": "EurPG2fXFPNqQfEAS5yZp7WCP2f2",
"x-ratelimit-limit": "10000",
"x-ratelimit-remaining": "9955",
"cache-control": "private",
"content-length": "3283",
"content-type": "application/json",
"date": "Fri, 13 Jan 2023 01:13:13 GMT",
"connection": "close",
"set-cookie": [
"user_prefs=OvGu0XdA8QZjX_yT9jPasp9rVUdjZACC5AMbNGB0dF5pTo4OeUQsAwA.; expires=Sat, 13-Jan-2024 01:13:12 GMT; Max-Age=31535999; path=/; domain=.etsy.com"
]
},
"body": {
"count": 1,
"results": [
{
"listing_id": 1378403480,
"state": "draft",
"user_id": 738160777,
"category_id": null,
"title": "Tea & Trunks on the Shore - Digital Illustration Ready for Print",
"description": "**Includes a $10 off coupon for Mpix to print your digital illustration! (Coupon is valid for new Mpix customers only.)**nn"Tea & Trunks on the Shore" is a digital illustration featuring an elephant enjoying a peaceful afternoon tea party by the shore. The beach is filled with warm sunlight, soft sand, and tranquil nature. Two statues stand nearby; trunks raised in the air in a whimsical pose. It's the perfect coastal vacation scene.",
"creation_tsz": 1673572393,
"ending_tsz": 1683936793,
"original_creation_tsz": 1673572393,
"last_modified_tsz": 1673572393,
"price": "9.99",
"currency_code": "USD",
"quantity": 999,
"sku": [],
"tags": [
"elephant",
"teapot",
"beach",
"statue",
"shore",
"trunks",
"calm",
"sunny",
"nature",
"coastal",
"vacation",
"whimsical"
],
"materials": [],
"shop_section_id": null,
"featured_rank": null,
"state_tsz": 1673572393,
"url": "https://www.etsy.com/listing/1378403480/tea-trunks-on-the-shore-digital?utm_source=integromat&utm_medium=api&utm_campaign=api",
"views": 0,
"num_favorers": 0,
"shipping_template_id": 190689572809,
"processing_min": 1,
"processing_max": 1,
"who_made": "i_did",
"is_supply": "false",
"when_made": "2010_2019",
"item_weight": null,
"item_weight_unit": null,
"item_length": null,
"item_width": null,
"item_height": null,
"item_dimensions_unit": null,
"is_private": false,
"style": null,
"non_taxable": false,
"is_customizable": true,
"is_digital": false,
"file_data": "",
"can_write_inventory": true,
"should_auto_renew": false,
"language": "en-US",
"has_variations": false,
"taxonomy_id": 66,
"taxonomy_path": [
"Art & Collectibles"
],
"used_manufacturer": false,
"is_vintage": false,
"ShippingInfo": [
{
"shipping_info_id": 38239666263,
"origin_country_id": 209,
"destination_country_id": 209,
"currency_code": "USD",
"primary_cost": "0.00",
"secondary_cost": "0.00",
"listing_id": 1378403480,
"region_id": null,
"shipping_carrier_id": 1,
"mail_class": "priority",
"min_delivery_time": null,
"max_delivery_time": null,
"origin_country_name": "United States",
"destination_country_name": "United States"
}
]
}
],
"params": {
"quantity": "999",
"title": "Tea & Trunks on the Shore - Digital Illustration Ready for Print",
"description": "**Includes a $10 off coupon for Mpix to print your digital illustration! (Coupon is valid for new Mpix customers only.)**nn"Tea & Trunks on the Shore" is a digital illustration featuring an elephant enjoying a peaceful afternoon tea party by the shore. The beach is filled with warm sunlight, soft sand, and tranquil nature. Two statues stand nearby; trunks raised in the air in a whimsical pose. It's the perfect coastal vacation scene.",
"price": "9.99",
"materials": null,
"shipping_template_id": "190689572809",
"taxonomy_id": "66",
"shop_section_id": null,
"image_ids": null,
"is_customizable": null,
"non_taxable": "false",
"image": null,
"state": "draft",
"shipping_profile_id": null,
"primary_shipping_cost": null,
"origin_country_id": null,
"processing_min": "1",
"processing_max": "1",
"tags": "elephant,teapot,beach,statue,shore,trunks,calm,sunny,nature,coastal,vacation,whimsical",
"should_auto_renew": null,
"who_made": "i_did",
"is_supply": "false",
"when_made": "2010_2019",
"style": null
},
"type": "Listing",
"pagination": {}
},
"_engineData": {
"calledAt": "Not available"
}
},
"request": {
"url": "https://openapi.etsy.com/v2/listings",
"headers": {
"user-agent": "Make/production",
"content-type": "multipart/form-data"
},
"method": "POST",
"body": {
"tags": [
"elephant,teapot,beach,statue,shore,trunks,calm,sunny,nature,coastal,vacation,whimsical"
],
"price": 9.99,
"state": "draft",
"title": "Tea & Trunks on the Shore - Digital Illustration Ready for Print",
"language": "en",
"quantity": 999,
"who_made": "i_did",
"is_supply": "false",
"when_made": "2010_2019",
"description": "**Includes a $10 off coupon for Mpix to print your digital illustration! (Coupon is valid for new Mpix customers only.)**nn"Tea & Trunks on the Shore" is a digital illustration featuring an elephant enjoying a peaceful afternoon tea party by the shore. The beach is filled with warm sunlight, soft sand, and tranquil nature. Two statues stand nearby; trunks raised in the air in a whimsical pose. It's the perfect coastal vacation scene.",
"non_taxable": "false",
"taxonomy_id": 66,
"processing_max": 1,
"processing_min": 1,
"shipping_template_id": 190689572809
}
}
}
Make an API Call module:
{
"_engineData": {
"calledAt": "Not available"
},
"response": {
"status": 400,
"headers": {
"server": "Apache",
"x-cloud-trace-context": "09a5d3e795b9fc54e830495d16c4c60b/15067349835956082126;o=0",
"x-etsy-request-uuid": "EuM5Ri2sGw5x0NpQEdJXWQxBw4a7",
"x-error-detail": "The request body is too large",
"cache-control": "private",
"content-length": "29",
"content-type": "text/plain;charset=UTF-8",
"date": "Fri, 13 Jan 2023 01:13:19 GMT",
"connection": "close",
"set-cookie": [
"user_prefs=V0FhRcPaxbYuLO_MI4-ruARTSVtjZACC5AMb9GF0dF5pTo4OeUQsAwA.; expires=Sat, 13-Jan-2024 01:13:19 GMT; Max-Age=31536000; path=/; domain=.etsy.com"
]
},
"body": "The request body is too large",
"_engineData": {
"calledAt": "Not available"
}
},
"request": {
"url": "https://openapi.etsy.com/v2/listings",
"qs": {},
"headers": {
"user-agent": "Make/production",
"content-type": "multipart/form-data"
},
"method": "POST",
"body": "{n "tags": [n "elephant,teapot,beach,statue,shore,trunks,calm,sunny,nature,coastal,vacation,whimsical"
],
"price": 9.99,
"state": "draft",
"title": "Tea & Trunks on the Shore - Digital Illustration Ready for Print",
"language": "en",
"quantity": 999,
"who_made": "i_did",
"is_supply": "false",
"when_made": "2010_2019",
"description": "**Includes a $10 off coupon for Mpix to print your digital illustration! (Coupon is valid for new Mpix customers only.)**nn"Tea & Trunks on the Shore" is a digital illustration featuring an elephant enjoying a peaceful afternoon tea party by the shore. The beach is filled with warm sunlight, soft sand, and tranquil nature. Two statues stand nearby; trunks raised in the air in a whimsical pose. It's the perfect coastal vacation scene.",
"non_taxable": "false",
"taxonomy_id": 66,
"processing_max": 1,
"processing_min": 1,
"shipping_template_id": 190689572809n}"
}
}
Hi,
Apologies for the delayed response! This is indeed a rather intricate issue.
It appears that the "Create a Listing" module is escaping special characters, while the "Make an API Call" module is not.
Take a look at the second request body, specifically the part within the `. I suspect this is the reason for the "body is too large" error.
Thank you for the suggestion. I've removed all special characters, and it's still encountering an error.
{
"_engineData": {
"calledAt": "Not available"
},
"response": {
"status": 400,
"headers": {
"connection": "close",
"content-length": "29",
"server": "Apache",
"x-cloud-trace-context": "57224177b757ab7cd6d49e3e77e6f53f/6764443710642352718;o=0",
"x-etsy-request-uuid": "EuRpgHk_zRumTDWtrejkOLrVPX71",
"x-error-detail": "The request body is too large",
"cache-control": "private",
"set-cookie": [
"user_prefs=o867aUbQJGKJXF59bbjiBB3FxetjZACC5IMz18Do6LzSnBwd8ohYBgA.; expires=Sat, 13-Jan-2024 17:49:32 GMT; Max-Age=31536000; path=/; domain=.etsy.com"
],
"content-type": "text/plain;charset=UTF-8",
"via": "1.1 google, 1.1 varnish",
"accept-ranges": "bytes",
"date": "Fri, 13 Jan 2023 17:49:32 GMT",
"x-served-by": "cache-iad-kcgs7200031-IAD",
"x-cache": "MISS",
"x-cache-hits": "0",
"x-timer": "S1673632173.513630,VS0,VE35"
},
"body": "The request body is too large",
"_engineData": {
"calledAt": "Not available"
}
},
"request": {
"url": "https://openapi.etsy.com/v2/listings",
"qs": {},
"headers": {
"user-agent": "callin.io/production",
"content-type": "multipart/form-data"
},
"method": "POST",
"body": {
"tags": [
"elephant,teapot,beach,statue,shore,trunks,calm,sunny,nature,coastal,vacation,whimsical"
],
"price": 9.99,
"state": "draft",
"title": "Test",
"language": "en",
"quantity": 999,
"who_made": "i_did",
"is_supply": "false",
"when_made": "2010_2019",
"description": "Includes a 10 off coupon for Mpix to print your digital illustration! Coupon is valid for new Mpix customers only",
"non_taxable": "false",
"taxonomy_id": 66,
"processing_max": 1,
"processing_min": 1,
"shipping_template_id": 190689572809
}
}
}
Hi,
I apologize, but I'm not quite sure what the issue might be.
Could you please provide more details?