Set Shipping Weight Via CatalogueBatchUpsert. Item or Item_var

Hi there.
I’ve been searching through the forums here about shipping rates and weights by item (or item variation) in the square API, But I’ve only found manual options or [functionality to be added]’s from years ago.

Is there currently a way to reach the item variation/s child object weight via the api? It seems like a valuable add to me, and I’m wondering why I can’t find more about it.

I’ll recreate my item catalog in any way that supports me being able to pass in a weight for every orderable item on my online square page. Or have my ‘Shipping rate by weight"‘ be mapped to a custom attribute that I call shipping_weight and set myself.

Please advise! Thank you.

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Build and Manage a Simple Inventory
Apply Catalog Taxes to Orders
Add a Catalog Item

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

This doesn’t solve my issue.

The following is an aged example of what I’m looking for, Field "weight" for products - #2 by Bryan-Square

Is that (using node as an example):
customAttributeValues: {
weight: { stringValue: slab.[MY_CALC’D_WEIGHT] },
}
?

As of the latest information available, the Square Catalog API does not natively support a specific field for item weight within the item variation or item objects. However, you can achieve your goal by using custom attributes to store and manage the weight of each item variation.

Here’s how you can proceed:

  1. Create a Custom Attribute Definition: Use the Catalog API to create a custom attribute definition for weight. This will allow you to store weight information for each item variation. You can define this attribute as a number type to store the weight value.

  2. Assign Custom Attributes to Item Variations: Once the custom attribute definition is created, you can assign a weight value to each item variation using the custom attribute. This will allow you to manage and retrieve the weight information programmatically.

  3. Use the Custom Attribute in Your Application: When calculating shipping rates, you can retrieve the weight custom attribute for each item variation in an order and use it to determine the shipping cost based on the total weight.

By using custom attributes, you can effectively manage and utilize item weights in your application, even though the Catalog API does not directly support a weight field. This approach provides flexibility and allows you to integrate weight-based shipping calculations into your workflow.

This answer was reviewed by @Bryan-Square.

Is that functionality available in square’s online site package?

Also…It doesn’t seem that #1 in your suggestion is possible according to: Custom Attributes

As catalog does not have a custom attributes call

@Bryan-Square halp pleae, I fear the dev AI is lying

Catalog has custom attributes that you can use for this use case. :slight_smile:

Thank you so much, Bryan! Your suggestion works to pass in a custom field I generate called Weight. Unfortunately it doesn’t solve my use case, as I’m looking to calculate shipping rates on my square store using weight per item variation.

It appears that custom variable’s aren’t able to be accessed by something like a shipping rate calculation on square’s online stores. The weight field under Item Library > Item > Edit Variation is the one I wish to populate dynamically. Are there any plans on the dev roadmap to add this functionality to the catalog API?

That is correct. At this time that isn’t currently available. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slight_smile:

1 Like

Thank you so much for your help! I hope it gets added relatively soon, but I know dev roadmaps can be tricky.

Thanks again!