question

brokenoval avatar image
brokenoval asked quick18dev answered

GET modifiers through /orders API

I'm trying to reconcile lineItems with the order - if you sum the total of each line item it does not always add up to the order total or the payments total because of modifiers.

Using the raw API: /v3/merchants/{mId}/orders

I have tried expanding on the 'modifications' field, 'modifiers' etc and can't seem to pull in modifers associated with the order. I've appended returnnullfields=true and digging through the data I can't find any reference to the modifiers I know are there.

How can I expand the API call to show me modifiers associated with the particular order, or multiple orders?

OrdersModifiers
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jim-patel avatar image jim-patel commented ·

I think Modifiers are tied to Line Items, not the Order, so you'll need to use expand=modifiers at /v3/merchants/{mid}/orders/{orderId}/line_items/{lineItemId}

0 Likes 0 ·
brokenoval avatar image brokenoval commented ·

Thanks Jim - I was hoping it would be visible in the Orders lineItems directly otherwise to get e.g. all items sold in a day, you'd have to loop through every order, grab the line item id and loop through each of them - almost definitely hitting the API limit :(

0 Likes 0 ·

1 Answer

quick18dev avatar image
quick18dev answered
Two levels of fields can be expanded with dotted syntax i.e. expand=lineItems.modifications. See the REST API documentation for more details https://docs.clover.com/build/web-api/
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community