Jump to content

"Get Specific Order" via Orders API is returning all orders in response rather than queried order

Recommended Posts

I have been following this tutorial to extract order information from Squarespace to Zapier:

https://www.optimi.co.nz/blog/how-to-automate-with-squarespace-and-zapier-and-get-your-order-info-in-real-time

I have this set up exactly as per this post - everything works great up until the webhooks stage, where instead of returning the queried order, the API seems to be returning all orders.

I have set up the query as per https://developers.squarespace.com/commerce-apis/retrieve-specific-order

The example attached is the setup in Zapier to create the URL to call the order API - you will note this differs slightly from the screenshot in the original tutorial, but setting it up exactly like they did just created a 404 error, I could only get it to work by putting the Metadata ID in the query string parameters box. (404 error also attached for reference)

https://api.squarespace.com/1.0/commerce/orders/66b9ea69e0d57141842e0809

But the API is sending back multiple orders in the response - I have attached the start of the response so you can see it and then the Zap finally sends this to a Google Sheet where you can see in many cells, it's inputting this like an array rather than a single response  

https://docs.google.com/spreadsheets/d/1ddw1Bnp-kyw23smE7CB7voS8tIZs_6cx3EVG0Cw43bo/edit?usp=sharing

Here is API response:

 

 

id

66b9ea69e0d57141842e0809

orderNumber

512

createdOn

2024-08-12T10:56:39.648Z

modifiedOn

2024-08-12T10:56:41.658Z

channel

web

testmode

false

customerEmail

chrXXX.robXXX@gmail.com

billingAddress

firstName

ChrXXX

lastName

RobXXX

address1

96 XXX Road

address2

city

Brighton

state

East Sussex

countryCode

GB

postalCode

BN1 6LU

phone

7980XXXXXX

shippingAddress

firstName

ChrXXX

lastName

RobXXX

address1

96 XXX Road

address2

city

Brighton

state

East Sussex

countryCode

GB

postalCode

BN1 XXX

phone

7980XXXXXX

fulfillmentStatus

PENDING

lineItems

1

id

66b9e9b405e2362520341207

variantId

d9db0e65-4cb0-4351-ac4c-4c74145d926f

sku

SQ8452449

weight

0.5

width

0

length

0

height

0

productId

657897afb5f2423e5610e050

productName

Francli Daypack DIY Pattern

quantity

1

unitPricePaid

value

16.00

currency

GBP

variantOptions

customizations

imageUrl

https://images.squarespace-cdn.com/content/v1/5e5f827701857452815651e3/1702402755066-HW6EJ7CBQLUHQYBN3SIP/101223_AG_FRANCLI_DEC23_117.jpg?format=300w

lineItemType

PHYSICAL_PRODUCT

internalNotes

shippingLines

1

method

United Kingdom

amount

value

3.00

currency

GBP

discountLines

formSubmission

fulfillments

subtotal

value

16.00

currency

GBP

shippingTotal

value

3.00

currency

GBP

discountTotal

value

0.00

currency

GBP

taxTotal

value

0.00

currency

GBP

refundedTotal

value

0.00

currency

GBP

grandTotal

value

19.00

currency

GBP

channelName

Squarespace

externalOrderReference

fulfilledOn

priceTaxInterpretation

EXCLUSIVE

2

id

66b5f6c7e0d57141842d20c8

orderNumber

511

createdOn

2024-08-09T11:00:19.650Z

modifiedOn

2024-08-09T11:00:23.420Z

channel

web

testmode

false

customerEmail

gilXXXleXXX@gmail.com

billingAddress

firstName

GilXXX

lastName

LeXXX

Result Billing Address Address 1

The XXX House

address2

High Road

city

STOWMARKET

state

countryCode

GB

postalCode

XXX

phone

7708XXXXXX

 

 

Screenshot 2024-08-19 at 15.20.38.png

Screenshot 2024-08-19 at 15.27.09.png

Link to comment
  • Replies 0
  • Views 277
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

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


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.