user

Fetch user records matching the supplied arguments.

Arguments

ArgumentTypeRequiredDefaultDescription
idStringNo

Filter by ID; pass the public API ID unless the field name says legacy ID.

customer_account_idStringNo

Use this when you are a 3PL acting on behalf of one of your customers.

emailStringNo

Lookup by email within the selected account context.

account_pinStringNo

Lookup by account pin within the selected account context.

analyzeBooleanNo

If true, the query will only be analyzed (cost estimated) without executing it.

Return Type

UserQueryResult

Query

query user(
  $id: String,
  $customer_account_id: String,
  $email: String,
  $account_pin: String,
  $analyze: Boolean
) {
  user(
    id: $id,
    customer_account_id: $customer_account_id,
    email: $email,
    account_pin: $account_pin,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...UserFragment
    }
  }
}

Variables

{
  "id": "UmVjb3JkOjEyMzQ=",
  "customer_account_id": "QWNjb3VudDoxMjM0",
  "email": "customer@example.com",
  "account_pin": "2",
  "analyze": true
}

Response

{
  "data": {
    "user": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": {id: "VXNlcjoxMjM0"}
    }
  }
}