x

https://connect.squareup.com/v2/catalog/batch-upsert

I am using API to batch insert products, problem it add products over and over again and also when I do batch inventory change it does not work

 

{
  "idempotency_key": "12c89fc4-6098-4e50-9718-7e0cf5033c49",
  "batches": [
    {
      "objects": [
        {
          "type": "ITEM",
          "id": "#bass-sport-headset-wireless-bluetooth-earphone-stereo-earpiece-earbuds-up-to-12hr-battery-life-green",
          "present_at_all_locations": true,
          "item_data": {
            "name": "Bass Sport Headset Wireless Bluetooth Earphone Stereo Earpiece Earbuds (Up To 12Hr Battery Life) - GREEN",
            "description": null,
            "category_id": "#ear-phone",
            "variations": [
              {
                "type": "ITEM_VARIATION",
                "id": "#bass-sport-headset-wireless-bluetooth-earphone-stereo-earpiece-earbuds-up-to-12hr-battery-life-green-variant",
                "present_at_all_locations": true,
                "item_variation_data": {
                  "item_id": "#bass-sport-headset-wireless-bluetooth-earphone-stereo-earpiece-earbuds-up-to-12hr-battery-life-green",
                  "name": "Regular",
                  "pricing_type": "FIXED_PRICING",
                  "price_money": {
                    "amount": 900,
                    "currency": "USD"
                  },
                  "sku": "PWR3-12HR-GRN"
                }
              }
            ]
          }
        },
        {
          "type": "CATEGORY",
          "id": "#ear-phone",
          "present_at_all_locations": true,
          "category_data": {
            "name": "Ear Phone"
          }
        }
      ]
    }
  ]
}

 

And inventory change

 

{
  "idempotency_key": "8fc6a5b0-9fe8-4b47-b46b-2ef95793abbe",
  "changes": [
    {
      "type": "PHYSICAL_COUNT",
      "physical_count": {
        "reference_id": "1536bfbf-efed-48bf-b17d-a197141b2a92",
        "catalog_object_id": "RVZJFGEZGOZ3TYMGLKLFHYCT",
        "state": "IN_STOCK",
        "location_id": "########",
        "quantity": "53",
        "employee_id": "########",
        "occurred_at": "2019-09-28T22:25:24.878Z"
      }
    }
  ],
  "ignore_unchanged_counts": false
}
574 Views
Message 1 of 2
Report
1 REPLY 1
Admin

@znsstudio

 

You aren’t able to see open tickets via the API. You can create an order via the API, send the order to your POS, and update the order if you need. For info on sending an order to the POS app you can check out this developer link: https://developer.squareup.com/docs/orders-api/how-it-works#fulfillments

 

As for the Zapier integration, unfortunately, we don't have control over that integration. It is made and managed by Zapier.

kellyj
Technical Program Manager: AI
Square Inc
530 Views
Message 2 of 2
Report