Background: We are considering using Craft Commerce to replace Shopify for more custom fields. However Craft Commerce does not have simple export buttons for exporting orders, so we are looking at the Element API plugin to build our custom plugin to get each order as a order-xxx.json

Question: Can i use Craft Commerce orders as a element in the Element API plugin?

1 Answer 1


Orders are in fact an ElementType in Craft.

See Commerce_OrderElementType.php inside the commerce plug-in folder. With that said you should have no problem retrieving orders like you would any other element type in Craft.

There are also services available that make it very easy to retrieve orders so you may find a simple PHP plug-in will get the job done in terms of returning JSON for an order(s).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.