Maintenance

Create a part inventory location

Creates per-part, per-location inventory metadata for the organization. Upserts by part and place — a second create at the same pair updates the existing record instead of duplicating it.

<b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select Write Parts under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

post/maintenance/parts/inventory-location

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

partSamsaraIdstring

Unique identifier for the part definition these inventory levels are tracked for.

placeIdstring

Unique identifier for the place linked to the maintenance site holding this inventory. The internal location identifier is never exposed.

Request body

aislestring

Aisle within the location where the part is stored.

binstring

Bin within the location where the part is stored.

currentQuantitynumber double

Total physical quantity on hand at this location, equal to the available quantity plus the reserved quantity. Settable only when creating the record, to seed initial stock; thereafter it changes only via stock movements.

isCostTrackedboolean

Whether costing is tracked at this location. Defaults to false; once enabled it cannot be turned back off.

maxStockLevelnumber double

Maximum quantity to keep in stock at this location.

minStockLevelnumber double

Minimum quantity to keep in stock at this location.

reorderQuantitynumber double

Quantity to reorder when stock reaches the reorder threshold.

reorderThresholdnumber double

Available quantity at or below which the part should be reordered at this location.

rowstring

Row within the location where the part is stored.

Example request

{
  "aisle": "12345",
  "bin": "12345",
  "currentQuantity": 123.45,
  "isCostTracked": true,
  "maxStockLevel": 123.45,
  "minStockLevel": 123.45,
  "reorderQuantity": 123.45,
  "reorderThreshold": 123.45,
  "row": "12345",
  "unitCost": {
    "amount": "12345",
    "currency": "12345"
  }
}

Response

Created response.

Example response

{
  "data": {
    "aisle": "12345",
    "availableQuantity": 123.45,
    "bin": "12345",
    "createdAtTime": "2019-06-13T19:08:25Z",
    "currentQuantity": 123.45,
    "id": "12345",
    "isCostTracked": true,
    "isLowStock": true,
    "isNonStock": true,
    "maxStockLevel": 123.45,
    "minStockLevel": 123.45,
    "partSamsara": {
      "id": "281474976710656"
    },
    "place": {
      "id": "281474976710656"
    },
    "reorderQuantity": 123.45,
    "reorderThreshold": 123.45,
    "reservedQuantity": 123.45,
    "row": "12345",
    "unitCost": {
      "amount": "12345",
      "currency": "12345"
    },
    "unitOfMeasureType": "Unknown",
    "updatedAtTime": "2019-06-13T19:08:25Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.