Join Order Item records to Catalog records?

I am new to Square API and am finding it difficult to join order items to corresponding catalog data. Can anyone provide me the foreign key join path between the two data sets?

Thanks,
Steven

:wave: Welcome! Each order will have a catalog_object_id that you can use the Catalog API to retrieve the item variation details. If there’s no catalog_object_id in the line_items then that item is an ad hoc item. :slightly_smiling_face:

Thank you Bryan,

That was the solution. Is there a published ERD for the API Endpoints?

Steven

Unfortunately, there isn’t entity relationship diagram for all the objects across our APIs. We do document everything and you’re always more then welcome to ask. :slightly_smiling_face:

Hi Bryan,

I am having difficulty completing a report for a customer using the order item and catalog datasets. The customer is using categories in the square reporting tools and I am having difficulty joining the Catalog_Categories to Line Items. Is this something you can help me with?

Thanks,
Steven

Happy to help. Are you getting the related_objects for the items in an order which will include the category_id to build the reports? :slightly_smiling_face: