Jump to content

Syntax for CURL command

Recommended Posts

Good morning.

I am trying to POST data to a system, and am experiencing difficulty in doing so.
In the snippet below, I am easily able to upload the name, sale_price etc, but when it comes to "images" I am unsure how to format the line - whether it be a single image or several images. Could somebody please point me in the right direction for the syntax of such a command?


curl -X POST https://example.com/site/products 
-u consumer_key:consumer_secret 
-H “Content-Type: application/json” 
-d ‘{
“name”: “Product name”,
“sale_price”: “25.50”,
“description”: “Body of text”,
“images”: [
“src”: “http://site.com/images/image1.jpg
“src”: “http://site.com/images/image2.jpg

I have tried a number of versions (admittedly guesses), but could not crack it.
Any help is appreciated. :)






Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.