Line Item $ in API

Is there a reference to selling unit cost and selling unit price $ on shipping, order, and/or return lines in the API? All I see are order $ totals and quantities on the others.

1 Like

Hi @campbell.yamane ! Welcome!

You can access the price through the line item on an order. Is this what you are looking for?

query {
  orders(order_number: "105349") {
    data {
      edges {
        node {
          line_items {
            edges {
              node {
                price
              }
            }
          }
        }
      }
    }
  }
}

Hi Theresa,

Yes, this is perfect. Is there a cost field as well?

Best,

Campbell

1 Like

You will need to make sure you limit the results, but you can get the price and value through the warehouse_products query:

query {
  warehouse_products(warehouse_id: "<warehouse id here>", sku: "<sku here>") {
    request_id
    complexity
    data(first: 1) {
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      edges {
        node {
          id
          legacy_id
          account_id
          sku
          warehouse_identifier
          price
          value
          value_currency
          on_hand
          inventory_bin
          inventory_overstock_bin
          reserve_inventory
          replenishment_level
          reorder_amount
          reorder_level
          backorder
          allocated
          available
          non_sellable_quantity
          custom
          customs_value
          created_at
          updated_at
          sell_ahead
          active
        }
        cursor
      }
    }
  }
}

value is equal to cost*