Change customs value and description per order

Is it possible to change customs value and customs description on a per-order basis, or will it always default to the value and description set on the item in ShipHero?

Hello Adam!
Are you talking about the UI or using the public API?
Have a great day!
TomasFD

I’d like to edit these values for each specific order using the API.

Hello @aadam!

You can use the following query to update the line items’ custom’s value for an order:

mutation{
  order_update_line_items(data:{
    order_id: "string"
    line_items:[
      {id:"string",customs_value:"99.99"}
      {id:"string",customs_value:"99.99"}
    ]
  }){
    complexity
    request_id
  }    
}

To get the IDs for each line item, you can run the following query:

query{
  order(id: "string"){
    request_id
    complexity
    data{
      line_items(first:10){
        edges{
          node{
            id
            legacy_id
            product_name
            sku
            customs_value
          }
        }
      }
    }
  }
}
  • You can use id or legacy_id. I just added a few more fields that will help find out which id corresponds to which line item.
  • Where it reads first:10, you can use any number, but if you don’t type one in, it will default to 100 and consume that many credits.

Please let me know if this doesn’t help.

Have a great week!
TomasFD

Is it possible to do this upon order_create? Or can you only do this using order_update_line_items?

Hello @aadam!
Yes, you can. When creating an order, when you set the line items, you can also add the customs_value field to each of them.
Best,
TomasFD