Are GS orders surfaced in the JS script API?

I was hoping to spend a few minutes (!) today and write a quick Javascript that does this:

  • for every selected order [typically the “ready to ship” ones, but not always]
    • for every listing of each order
      • print (to console) the title and listing.userProperties["location"]

I suddenly realized there’s nothing in the current documentation about order objects or iterating over their listings in JS, and I was a loss. selectedOrders is definitely not a thing, given the error message.

Hi @Vaguery , it sounds you need to select orders to ship and print a list of SKUs and/or titles to pick sold items to ship. If so, I think this might do the work: Export order data and a list of SKUs . This is extremely useful. You can select any group of orders and then print a list ordered by SKU, but I guess that you can also set it differently with titles or user properties.

Well, technically no. What I need to do is not export the list of SKUs, but create a printable string which contains data specifically stored in the userProps[] map associated with the listings associated with the selected orders.

That will take scripting, either in Javascript or AppleScript, but I’m quite sure the AppleScript will not work, since (as I recall) the coverage for the Order → Listing → Inventory tables is not quite complete?

At the movement, Orders aren’t exposed via JavaScript at all. But your request ist noted…

1 Like

Well, I can’t think of any attributes we would need write access to, just reading and shared-key lookups to Listings and/or Inventory.

1 Like

Basic JavaScript access for order is included here: GarageSale 9.8 Alpha 7 Released - #4 by ilja

Something along the lines of selectedOrders[0].orderTransactions[0].listing should give you access to the listing’s properties.

1 Like

Thank you! Will try when I’m back from travels.

Can you post the latest structure of the [object GSEbayListingJSWrapper] and [object GSEbayOrderJSWrapper] records, so we can see all the fields and data types?

Or… Is there a JavaScript command to show all the properties and fields and data types of an Object??


It’s all documented: