How check Allow partially order and get all tracking number

Hello @tomasw @Theresa @BrownMFG

Can you please help me for shiphero with partially order API?
how can i check simple order and partially order?
how can i get all tracking one order with API?

can you please give me solution with tracking number

Thanks again!
Bhavesh

Hello @bhavesh !
To toggle the allow partial between true or false, you can use the order_update mutation:

mutation{
  order_update(data: {
    	order_id:"123456789"
    	allow_partial:false
  }){
    request_id
    complexity
    order{
      legacy_id
      allow_partial 
  	}
  }
}

To get the tracking number of each and all shipments of a specific order, you can use the shipments → shipping labels connection:

query{
  shipments(order_id: "123456789"){
    request_id
    complexity
    data(first:5){
      edges{
        node{
          shipping_labels{
            tracking_number
          }
        }
      }
      pageInfo{
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
    }
  }
}
  • order_id works as explained above.

  • data(first:5) will return the first 5 shipments for the order. I suggest you leave it in a low value and paginate from there, as it will consume as many credits as the value, even if there are fewer results. If you don’t set that parameter, it will default to the first 100 values and expend 100 credits. Use the values returned in pageInfo{} to move through the pages of results in case the order has more than 5 shipments.

Please let me know if this helps.
Have a great day!
Tomas

1 Like

Hello @tomasfd @tomasw @Theresa @BrownMFG
Thanks! hope you are doing great as well!

Please give Solution of partially order i am not update to specific order.
only fatch the data allow_partial.
what is status of partialy order true or false?

Thanks again!
Bhavesh

Hello @bhavesh!
To fetch the data for a specific order, you can use the following query:

query{
  order(id: "123456789", analyze: false){
    request_id
    complexity
    data{
      allow_partial
    }
  }
}

If you want to check several orders at a time, you could use this query:

query {
  orders (analyze: false, "parameters separated by commas go here") {
    request_id
    complexity
    data(
      first: 10
    ) {
    	edges{
          node{
            legacy_id
            allow_partial
          }
        }
      	pageInfo{
          hasNextPage
          hasPreviousPage
          startCursor
          endCursor
        }
    }
  }
}
  • Again, I suggest you use first, last, after, before, and pageInfo to navigate through the pages to control how much credit you are spending.

  • You can filter orders using the following parameters:

    • shop_name: String
    • partner_order_id: String
    • order_number: String
    • warehouse_id: String
    • fulfillment_status: String
    • sku: String
    • email: String
    • updated_from: ISODateTime
    • updated_to: ISODateTime
    • order_date_from: ISODateTime
    • order_date_to: ISODateTime
    • customer_account_id: String => This is used when you are acting as the 3PL and want to check orders from a specific child account

If allow_partial returns false, this means the order is not allowed to partially ship. If it returns true, that order can be partially shipped.

Please let me know if this answers your question,
Best regards,
Tomas