x

Square API - Object Update for Multiple Locations Issue

I'm trying to updates objects using the endpoint BatchRetrieveCatalogObjects (POST /v2/catalog/batch-upsert).

When I post the request, I get the error

[type] => bad_request
[message] => Multi-location support is unavailable for this endpoint. Parameter `merchant_id` must correspond to a single-location account, not a business account

How can I update objects if there are multiple locations and if items have location overrides?

 

Is there another endpoint that I can use?

 

UpsertCatalogObject (POST /v2/catalog/object) does not work either. Same error.

 

Below is a sample request payload:

Array
(
    [idempotency_key] => 1122334455667788
    [batches] => Array
        (
            [type] => ITEM
            [id] => 5BLFIPNYBTDD5ARZYQU4K7SV
            [item_data] => Array
                (
                    [name] =>  Honey Mead
                    [description] => Mead is an adult beverage brewed exclusively with honey. 
                    [category_id] => OIMGQF7DCO7W6SEXEMKGIJK5
                )

            [variations] => Array
                (
                    [type] => ITEM_VARIATION
                    [id] => BEQZ6FXAJACGW55RRZBMXDEI
                    [item_variation_data] => Array
                        (
                            [item_id] => 5BLFIPNYBTDD5ARZYQU4K7SV
                            [name] => Case (24 bottles)
                            [pricing_type] => FIXED_PRICING
                            [ordinal] => 4
                            [price_money] => Array
                                (
                                    [amount] => 11900
                                )

                            [location_overrides] => Array
                                (
                                    [0] => Array
                                        (
                                            [location_id] => 81J6E4K21KGC9
                                            [price_money] => Array
                                                (
                                                    [amount] => 11900
                                                )

                                            [pricing_type] => FIXED_PRICING
                                            [track_inventory] => 1
                                            [inventory_alert_type] => LOW_QUANTITY
                                            [inventory_alert_threshold] => 15
                                        )

                                )

                        )

                )

        )

)
1,003 Views
Message 1 of 4
Report
3 REPLIES 3

Hello @WetLiquid

 

I reached out to our API Support Team and it looks like they were able to help you on StackOverFlow🙂

973 Views
Message 2 of 4
Report

Someone contacted me on StackOverflow, but the issue is not resolved.

965 Views
Message 3 of 4
Report
Admin

@WetLiquid If you posted in StackOverflow the API team will keep helping you there until this is resolved. Really appreciate your patience in the meantime.

️ Helen
Seller Community Manager

Did you find help in the Seller Community? Mark a Best Answer to help others.
960 Views
Message 4 of 4
Report