Definitively check if a customer_account_id exists?

Hi, What’s the best way to check if a customer_account_id is valid and exists with us, as a 3PL?

I tried running the Orders query with it, but while if I butcher a valid ID too much it returns the error message "message": "Invalid id xxxxxxxxxxxxx==", a slightly incorrect id with maybe one/two chars replaced returns the query ok with a blank result set. So that isn’t foolproof.

Is there a better way?

Thank you!
Raj

Hey @Raj,

Thanks for reaching out!
Looking into this issue now, I’ll have an update for you shortly.

Best,
RayanP

1 Like

Hey @Raj,

Thanks for hanging in there!

You could run the following query to get all customers associated with your 3PL Account:

{
  account {
    request_id
    complexity
    data {
      id
      legacy_id
      email
      username
      status
      dynamic_slotting
      is_multi_warehouse
      is_3pl
      cycle_count_enabled
      ship_backorders
      customers(first: 10) {
        edges {
          node {
            id
            legacy_id
            dynamic_slotting
          }
        }
      }
    }
  }
}

Please let me know if you have any questions or concerns.

Best,
RayanP

1 Like

Thank you @sh-agent , very helpful!

1 Like