Close
logo

Querying by External IDs

Git RepositoryEdit on Github
Last update: 10 months ago by Francesco de LorenziReading time: 2 min

Querying by External IDs

All resources in Jetti have an internal object ID, which you can use for targeting various instances (e.g. doing a GET to retrieve a specific object). This ID is driven by the underlying data storage and unique to each item within a given resource. However, when looking up data within the platform, it's often desirable to look up by some kind of external ID:

  • Looking up a customer sale by it's external ID
  • Looking up a channel variant by it's external ID
  • Looking up an inventory feed variant by it's external ID

This is fairly straightforward within the querying API available on endpoints. You'd need to lookup the extact naming of the external ID attribute, however, this is typically just externalId. For example, to look up a sale object by the external ID from the channel it came from, you can use against the sales.json resource.

curl --request GET \
--url 'https://api.jetti.io/api/sales.json?where[externalId]=your-reference' \
--header 'Authorization: Bearer {{token}}'

There are usually unique constraints in the system on these external IDs (e.g. to avoid duplication of external orders), so you can usually assume there will only ever be a single returned entry.

๐Ÿ” Recipes โ€” Previous
Image Transformation
Next โ€” ๐Ÿ” Recipes
Variant Transformation