Inventory

Inventory Products

An InventoryProduct represents stock in inventory.

The InventoryProduct object

Attributes

  • iduuidrequired

    The ID of the inventory product.

  • namestringrequired

    The name of the inventory product.

  • descriptionstringrequirednullable

    A description of the inventory product.

  • skustringrequirednullable

    A stock keeping unit (SKU) for the inventory product.

  • barcodestringrequirednullable

    A barcode for the inventory product.

  • average_costintegerrequired

    The average cost of the inventory product in the lowest denomination for this product's currency.

  • currencystringrequired

    The currency of the inventory product.

  • reorder_levelintegerrequirednullable

    The quantity of this inventory product which should be reordered.

  • stock_levelnumberrequired

    The quantity of this stock at the site.

  • stock_valueintegerrequired

    The total value of this stock at the site in the lowest denomination for this product's currency.

  • brand_iduuidrequirednullable

    The ID of the brand this inventory product belongs to.

  • brandoptionalnullable
  • category_iduuidrequirednullable

    The ID of the category this inventory product belongs to.

  • categoryoptionalnullable
  • site_iduuidrequired

    The ID of the site this inventory product belongs to.

  • organisation_iduuidrequired

    The ID of the organisation this inventory product belongs to.

{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Blissful Body Butter",
  "description": "A rich, creamy body butter which deeply nourishes the skin, with essential oils.",
  "sku": "BB-001",
  "barcode": 123456789,
  "average_cost": 1000,
  "currency": "gbp",
  "reorder_level": 10,
  "stock_level": 50.5,
  "stock_value": 5000,
  "brand_id": "00000000-0000-0000-0000-000000000000",
  "brand": "string",
  "category_id": "00000000-0000-0000-0000-000000000000",
  "category": "string",
  "site_id": "00000000-0000-0000-0000-000000000000",
  "organisation_id": "00000000-0000-0000-0000-000000000000"
}
get/inventory/products

List Inventory Products

listInventoryProducts

This endpoint retrieves a list of all the inventory products for the given site.

Query parameters

  • site_iduuidrequired

    Filter inventory products by site.

  • supplier_idsuuidoptional

    A comma-separated list of supplier IDs to retrieve inventory products for.

  • category_idsuuidoptional

    A comma-separated list of category IDs to retrieve inventory products for.

  • brand_idsuuidoptional

    A comma-separated list of brand IDs to retrieve inventory products for.

  • querystringoptional

    A search query to filter inventory products by. This will search the product name.

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    The inventory products were successfully retrieved

  • 401

    The user is unauthenticated

post/inventory/products

Create an Inventory Product

createInventoryProduct

This endpoint creates an inventory product for the given site.

Request body

  • namestringrequired

    Display name of the inventory product, shown to staff in the stock admin UI and on purchase orders, stocktake sheets, and reports. Trimmed; 1-120 characters and must not contain HTML.

  • brand_iduuidrequirednullable

    Identifier of the inventory brand this product is sold under. Used for filtering and reporting. Pass null if the product is unbranded; the brand must belong to the same site as site_id.

  • category_iduuidrequirednullable

    Identifier of the inventory category this product is classified under. Used for filtering, reporting, and report grouping. Pass null for uncategorised products; the category must belong to the same site as site_id.

  • site_iduuidrequired

    Identifier of the site that owns this inventory product. Stock levels, suppliers, and adjustments are all scoped per site; the caller's API key must have access to it.

Responses

  • 201

    The inventory product was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 422

    The request didn't pass validation

get/inventory/products/{productId}

Show an Inventory Product

getInventoryProduct

This endpoint retrieves an inventory product for the given site.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Responses

  • 200

    The inventory product was successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

put/inventory/products/{productId}

Update an Inventory Product

updateInventoryProduct

This endpoint updates an inventory product for the given site.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Request body

  • namestringoptional

    Display name of the inventory product, shown to staff in the stock admin UI and on purchase orders, stocktake sheets, and reports. Trimmed; 1-120 characters and must not contain HTML.

  • descriptionstringoptionalnullable

    Long-form description of the inventory product, shown on the product detail screen. Plain text; line breaks are preserved. Pass null to clear an existing description.

  • skustringoptionalnullable

    The stock keeping unit (SKU) for the inventory product.

  • barcodestringoptionalnullable

    The barcode for the inventory product.

  • reorder_levelintegeroptionalnullable

    The quantity of this inventory product which should be reordered.

  • brand_iduuidoptionalnullable

    Identifier of the inventory brand this product is sold under. Used for filtering and reporting. Pass null if the product is unbranded; the brand must belong to the same site as the product.

  • category_iduuidoptionalnullable

    Identifier of the inventory category this product is classified under. Used for filtering, reporting, and report grouping. Pass null for uncategorised products; the category must belong to the same site as the product.

Responses

  • 200

    The inventory product was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/inventory/products/{productId}

Delete an Inventory Product

deleteInventoryProduct

This endpoint deletes an inventory product for the given site.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Responses

  • 204

    The inventory product was successfully deleted.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/inventory/products/{productId}/copy

Copy an Inventory Product

actionInventoryProduct

This endpoint copies an existing inventory product by ID.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Request body

  • namestringrequired

    Name to give the duplicated inventory product. Typically the source product's name with a "(copy)" suffix. Trimmed; 1-120 characters and must not contain HTML.

Responses

  • 200

    The inventory product was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/inventory/products/{productId}/adjustments

List adjustments for an Inventory Product

listInventoryProductAdjustments

This endpoint retrieves a list of all the adjustments for the given inventory product.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Query parameters

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    The adjustments for the inventory product were successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

post/inventory/products/{productId}/adjustments

Create an Inventory Product Adjustment

createInventoryProductAdjustment

This endpoint creates an adjustment for the given inventory product.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Request body

  • quantitynumberrequired

    The amount of the adjustment, which may be positive or negative.

  • reason_codestringrequired

    The preset reason code for the adjustment.

  • reason_descriptionstringrequirednullable

    A free-text description of the reason for the adjustment.

  • location_iduuidrequirednullable

    Identifier of the stock location the adjustment is recorded against. For positive adjustments stock is added at this location; for negative adjustments stock is removed from it. Pass null if the site uses a single, default location.

Responses

  • 201

    The inventory product adjustment was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/inventory/products/{productId}/supplier

Show an Inventory Product Supplier

getInventoryProductSupplier

This endpoint retrieves a supplier for an inventory product.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Responses

  • 200

    The inventory product supplier was successfully retrieved

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

post/inventory/products/{productId}/supplier

Add a supplier to an Inventory Product

createInventoryProductSupplier

This endpoint adds a supplier to the given inventory product.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Request body

  • order_quantityintegeroptionalnullable

    The default quantity of the inventory product to be ordered from this supplier.

  • unit_priceintegeroptional

    The unit price of the inventory product in the lowest denomination for this product's currency.

Responses

  • 201

    The inventory product supplier was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

put/inventory/products/{productId}/supplier

Update an Inventory Product Supplier

updateInventoryProductSupplier

This endpoint updates the details of a supplier for an inventory product.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Request body

  • order_quantityintegerrequirednullable

    The default quantity of the inventory product to be ordered from this supplier.

  • unit_priceintegerrequired

    The unit price of the inventory product in the lowest denomination for this product's currency.

Responses

  • 200

    The inventory product supplier was successfully retrieved

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/inventory/products/{productId}/supplier

Remove a supplier from an Inventory Product

deleteInventoryProductSupplier

This endpoint removes a supplier from an inventory product.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Responses

  • 204

    The supplier was successfully removed from the inventory product.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

get/inventory/products/{productId}/suppliers

List suppliers of an Inventory Product

listInventoryProductSuppliers

Returns the paginated list of suppliers associated with a single inventory product. Each entry describes the supplier-side ID (e.g. their SKU), the default order quantity, and the unit price.

Path parameters

  • productIduuidrequired

    The ID of the InventoryProduct

Query parameters

  • per_pageintegeroptional

    The number of results to return per page

  • pageintegeroptional

    The page to retrieve results from

Responses

  • 200

    Product suppliers were successfully retrieved.

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found

get/inventory/queued-jobs/{queuedJobId}

Get the details of an inventory queued job

getInventoryQueuedJob

Returns the status and output of an inventory background job that was previously kicked off via a queue-issuing endpoint (e.g. stock-on-hand or stock-adjustment exports, stock-take posting). Poll this endpoint until status transitions to complete or failed; output then contains the per-job result envelope.

Path parameters

Responses

  • 200

    The job was successfully queued

  • 401

    The user is unauthenticated

  • 404

    The resource couldn't be found