Order Lookup

You can use this query to retrieve order details. Once a customer has placed an order with the merchant we recommend storing the orderId used throughout their application process as you will need the orderId to later initiate funding. It can also be helpful to use this query to retrieve important order details that don't need to be stored in your system.

You can adapt this query to only retrieve the information you need to retrieve but an example query might look something like:

query order($id: ID!) {
        order(id: $id) {
          id
          application{
            
              loan {
                  id
                  status
                  options{
                      lineAmount
                      productID
                  }
                  cartValidationDetails
              }
              lease {
                  id
                  status
                  amount
                  options {
                      approvedAmount
                  }
                  cartValidationDetails
              }
          }
          details {
            customer {
              firstName
              lastName
              emailAddress
              cellPhone
              billingAddress {
                line1
                line2
                city
                state
                zip
              }
              shippingAddress {
                line1
                line2
                city
                state
                zip
              }
            }
            items {
              displayName
              quantity
              sku
              price
              itemUrl
              itemImageUrl
              isLeaseable
            }
            shippingAmnt
            taxAmnt
          }
        }
      }

The above query would return information on the customer, their Koalafi application and the items on their order.

An example input for this mutation looks like:

{
    "id": "your-order-id>"
}