Errors

Code Description
401 The provided token is invalid
404 Record not found
422 Could not process parameters

Examples

// valid token and params
PUT /api/shopify/inventory_batches/4025
inventory_batch[quantity]=56&inventory_batch[location_id]=1000&inventory_batch[variant_id]=2000
200
{
  "id": 4025,
  "quantity": 56,
  "expired_at": null,
  "expiry_date": "2023-07-13 05:48:05 UTC",
  "received_date": "2023-07-03 05:48:05 UTC",
  "metadata": {
    "batch_name": "Inventory Batch"
  },
  "created_at": "2023-07-03 05:48:05 UTC",
  "updated_at": "2023-07-03 05:48:05 UTC",
  "notified_at": null,
  "discounted": false,
  "location_id": 1000,
  "variant_id": 2000
}
// invalid params
PUT /api/shopify/inventory_batches/4026
inventory_batch[quantity]=56
422
Location must exist and Variant must exist
// invalid id
PUT /api/shopify/inventory_batches/100
inventory_batch[quantity]=56&inventory_batch[location_id]=1000&inventory_batch[variant_id]=2000
404
Record not found
// invalid token
PUT /api/shopify/inventory_batches/4028
inventory_batch[location_id]=1000&inventory_batch[variant_id]=2000&inventory_batch[quantity]=56&inventory_batch[batch_name]=batch_name&inventory_batch[batch_number]=batch_number&inventory_batch[barcode]=barcode&inventory_batch[invoice_number]=invoice_number&inventory_batch[description]=description&inventory_batch[received_date]=2023-07-03
401
HTTP Token: Access denied.

Params

Param name Description
enable_shopify_sync
optional

Should enable Shopify sync?

Validations:

  • Must be one of: true, false, 1, 0.

inventory_batch
optional

Validations:

  • Must be a Hash

inventory_batch[location_id]
required

Shopify location ID

Validations:

  • Must be a Integer

inventory_batch[variant_id]
required

Shopify variant ID

Validations:

  • Must be a Integer

inventory_batch[quantity]
required

Inventory batch quantity

Validations:

  • Must be a Integer

inventory_batch[batch_name]
optional

Inventory batch name

Validations:

  • Must be a String

inventory_batch[batch_number]
optional

Inventory batch number

Validations:

  • Must be a String

inventory_batch[barcode]
optional

Inventory batch barcode

Validations:

  • Must be a String

inventory_batch[invoice_number]
optional

Inventory batch invoice number

Validations:

  • Must be a String

inventory_batch[description]
optional

Inventory batch description

Validations:

  • Must be a String

inventory_batch[received_date]
optional

Inventory batch received date

Validations:

  • Must be a String

Headers

Header name Description
Authorization
required
Bearer token