#.saberkhan

1 messages · Page 1 of 1 (latest)

haughty cosmosBOT
mighty geyser
#

It's supposed to be an array of hashes

#

You passed 1 hash

#

So wrap [] around it

normal sand
#

I have tried other fields under shipping_options and it gives the same errro

#

Postman is not allowing it

mighty geyser
#

Not allowing what?

#

You need to pass an array of hashes not 1 hash

normal sand
#

shipping_options[shipping_rate]

#

is the postman code

#

I wrote the above code in postman and it is giving the same error

mighty geyser
#

That's not an array of hashes either

normal sand
#

I wrote similar code in postmand and it works. Only this time with shipping_options is not workin

mighty geyser
#

needs to be something like:

shipping_options=[{shipping_rate: rate}]
normal sand
#

Let me try the above

mighty geyser
#

Not sure how postman's syntax works, but the main thing is it needs to be an array of hashes

normal sand
#

I am trying

#

Although I am trying to pass array of hashes, input in postman is [shipping_options] =[shipping_rate:shr_1NYURxCjwmDvqQqqRq36OsCe] and output becomes string like "shipping_options": "[shipping_rate:shr_1NYURxCjwmDvqQqqRq36OsCe]",

haughty cosmosBOT
normal sand
mighty geyser
#

Since request body needs to be form encoded, have you tried:

shipping_options[0][shipping_rate]=rate
normal sand
#

Let me try

#

Works now. I tried more than 1 hour to debug this line of code. Thanks!

mighty geyser
#

No problem

normal sand
#

Thank you again!