# Inventory API

- Human documentation: https://www.myrepairapp.com/api-docs/inventory-item
- OpenAPI: https://www.myrepairapp.com/openapi.json
- Last updated: 2026-07-30T23:33:08.424Z

## The Inventory Item Model

The Inventory Item object represents an item in the inventory system. Below is an example of an Inventory Item object with all possible fields.

```json
{
    "sku": "AP-REPL-BATT-18",
    "manufacturer": "Apple",
    "category": "Part",
    "type": "Part - Computer",
    "name": "Replacement Battery Compatible For iPhone 11 Pro (AmpSentrix Pro)",
    "inventoried": true,
    "serialized": false,
    "cost": 20.85,
    "instock": 5,
    "condition": "New",
    "price": 20.85,
    "isRebate": false,
    "taxFree": false,
    "serialNum": "72839591ABS"
  }
```

Allowed Inventory Item Categories

* Accessory

* Device

* Part

* Repair

* Service

* Tool

* Prepaid

Allowed Inventory Item Conditions

* New

* Used

* Refurbished

* Damaged

## Inventory Item Resources

### Create an inventory item

This endpoint creates a new inventory item.

**HTTP Request**

```http
POST https://www.myrepairapp.com/api/v2/inventory
```

**Request Body**

| Field          | Type                     | Required | Description                                                                                                                        |
| -------------- | ------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `sku`          | `string`                 | Yes      | The unique stock keeping unit for the item.                                                                                        |
| `manufacturer` | `string`                 | Yes      | The manufacturer of the item.                                                                                                      |
| `category`     | `InventoryItemCategory`  | Yes      | The category classification of the item. Allowed values are listed below this table.                                               |
| `type`         | `string`                 | Yes      | The type of item.                                                                                                                  |
| `name`         | `string`                 | Yes      | The name of the item.                                                                                                              |
| `cost`         | `number`                 | Yes      | The cost of the item.                                                                                                              |
| `inventoried`  | `boolean`                | Yes      | Indicates whether the item is tracked in inventory.                                                                                |
| `serialized`   | `boolean`                | Yes      | Indicates if the item has a serial number.                                                                                         |
| `isRebate`     | `boolean`                | Yes      | Indicates if the item qualifies for a rebate.                                                                                      |
| `taxFree`      | `boolean`                | Yes      | Indicates if the item is tax-free.                                                                                                 |
| `instock`      | `number`                 | Yes      | The number of items currently in stock.                                                                                            |
| `condition`    | `InventoryItemCondition` | Yes      | The condition of the item (e.g., New, Used).                                                                                       |
| `supplierId`   | `string`                 | No       | The ID of the supplier for the item. If present on a request, it must match an existing supplier in the system (see supplier API). |
| `serialNum`    | `string`                 | No       | The serial number of the item, if applicable.                                                                                      |
| `price`        | `number`                 | Yes      | The selling price of the item.                                                                                                     |
| `bin`          | `string`                 | No       | The bin location of the item in the warehouse. Used only on update.                                                                |
| `note`         | `string`                 | No       | Additional notes about the item. Used only on update.                                                                              |

**Response**

If successful, the response will include the updated inventory item's details.

***

### Update an inventory item

This endpoint updates an inventory item's information.

**HTTP Request**

```http
PATCH https://www.myrepairapp.com/api/v2/inventory/
```

**Request Body**

| Field        | Type                     | Required | Notes                                                                                                                                                                                                           |
| ------------ | ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| category     | `InventoryItemCategory`  | No       |                                                                                                                                                                                                                 |
| type         | string                   | No       |                                                                                                                                                                                                                 |
| sku          | string                   | No       |                                                                                                                                                                                                                 |
| manufacturer | string                   | No       |                                                                                                                                                                                                                 |
| name         | string                   | No       |                                                                                                                                                                                                                 |
| instock      | number                   | No       | Items with non empty serial numbers cannot have `instock` greater than 1, so if an `instock` amount larger than 1 is set on such an item a new item will be created with the serial number and a quantity of 1. |
| condition    | `InventoryItemCondition` | No       |                                                                                                                                                                                                                 |
| bin          | string                   | No       |                                                                                                                                                                                                                 |
| supplierId   | string                   | No       | Can be `null`                                                                                                                                                                                                   |
| price        | number                   | No       |                                                                                                                                                                                                                 |
| cost         | number                   | No       |                                                                                                                                                                                                                 |
| isRebate     | boolean                  | No       |                                                                                                                                                                                                                 |
| taxFree      | boolean                  | No       |                                                                                                                                                                                                                 |
| note         | string                   | No       |                                                                                                                                                                                                                 |
| serialNum    | string                   | No       | Can be `null`. Items with non empty serial numbers cannot have `instock` greater than 1, so if a serialNumber is set on such an item a new item will be created with the serial number and a quantity of 1.     |

**Response**

If successful, the response will include the updated inventory item's details.

In specific scenarios it's possible the response contains also "createdInventoryItem" and "deletedInventoryItem" keys. This is done to enforce a restriction where items with serial numbers can only have 1 of it in stock (they're supposed to be unique), the item essentially splits the item line into two, one with stock greater than 1 and one with the serial number.

It will happen if you either:

* Edit an item with a serial number changing its `instock` quantity to a value greater than 1

* Add a serial number to an item that has `instock` greater than 1

```json
{
    "updatedInventoryItem": {
      "id": "019adb7a-a367-7c23-b51e-6b953b25d7a5",
      "storeId": "42eb713e-1aa3-4b9f-a6e8-3f9e246b5466",
      "groupingId": null,
      "sku": "AP-REPL-BATT-19",
      "manufacturer": "Apple",
      "category": "Part",
      "type": "Part - Computer",
      "name": "Replacement Battery Compatible For iPhone 11 Pro (AmpSentrix Pro)",
      "cost": 20.85,
      "inventoried": true,
      "serialized": false,
      "instock": 4,
      "condition": "New",
      "bin": "",
      "supplierId": null,
      "price": 20.85,
      "createdAt": "2025-12-01T19:53:58.888Z",
      "updatedAt": "2025-12-04T10:33:48.062Z",
      "note": "",
      "active": true,
      "serialNum": null,
      "isRebate": false,
      "taxFree": false,
      "repairProvider": null,
      "tradeinDevice": false,
      "storage": null,
      "color": null,
      "carrier": null,
      "tradeInCondition": null,
      "tradeInStatus": null,
      "additionalInfo": null,
      "isMotorolaSku": false,
      "supplier": null
    },
    "createdInventoryItem": {
      "id": "019ae8ec-d9ee-7802-bfe5-ca29d1da172f",
      "storeId": "42eb713e-1aa3-4b9f-a6e8-3f9e246b5466",
      "groupingId": null,
      "sku": "AP-REPL-BATT-19",
      "manufacturer": "Apple",
      "category": "Part",
      "type": "Part - Computer",
      "name": "Replacement Battery Compatible For iPhone 11 Pro (AmpSentrix Pro)",
      "cost": 20.85,
      "inventoried": true,
      "serialized": false,
      "instock": 1,
      "condition": "New",
      "bin": "",
      "supplierId": null,
      "price": 20.85,
      "createdAt": "2025-12-01T19:53:58.888Z",
      "updatedAt": "2025-12-04T10:33:10.688Z",
      "note": "",
      "active": true,
      "serialNum": "093822321",
      "isRebate": false,
      "taxFree": false,
      "repairProvider": null,
      "tradeinDevice": false,
      "storage": null,
      "color": null,
      "carrier": null,
      "tradeInCondition": null,
      "tradeInStatus": null,
      "additionalInfo": null,
      "isMotorolaSku": false
    },
    "deletedInventoryItem": null
  }
```

***

### Delete an inventory item

This endpoint deletes an inventory item.

**HTTP Request**

```http
DELETE https://www.myrepairapp.com/api/v2/inventory/
```

**Response**

If successful, the response will include a success message.

***

### Search inventory items

If a query parameter is provided, a search for inventory items will run based on various criteria. The search algorithm will match any items satisfying the following conditions:

1. Exact name matches (highest relevance)

2. Case-insensitive exact matches

3. Names that start with the query

4. Names that contain the full query

5. Partial matches (lowest relevance)

Additionally, items in stock are displayed before out-of-stock items in the results.

If one wants to search for items with a query but wants them sorted by update date instead of the above algorithm, the `relevanceSort` parameter must be passed as false.

**HTTP Request**

```http
GET https://www.myrepairapp.com/api/v2/inventory/search
```

**Query Parameters**

| Parameter       | Type     | Required | Description                                                                                                                                     |
| --------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`         | `string` | No       | Search term to filter inventory items (can be sku, part of item name, etc).                                                                     |
| `relevanceSort` | `false`  | No       | If provided as false, will sort query match results based on item update date rather than the algorithm. Defaults to true if query is provided. |
| `storeIds`      | `string` | No       | Comma-separated list of store IDs to filter by.                                                                                                 |
| `categories`    | `string` | No       | Comma-separated list of categories to filter by.                                                                                                |
| `types`         | `string` | No       | Comma-separated list of types to filter by.                                                                                                     |
| `catalogOnly`   | `string` | No       | If present, returns only catalog items.                                                                                                         |
| `inventoryOnly` | `string` | No       | If present, returns only inventory items.                                                                                                       |
| `instockOnly`   | `string` | No       | If present, returns only items that are in stock.                                                                                               |
| `page`          | `number` | No       | Pagination page.                                                                                                                                |
| `pageSize`      | `string` | No       | Pagination page size. When not provided defaults to 50 IF page parameter was provided, doesn't limit results otherwise.                         |

**Response**

If successful, the response will include an array of inventory items matching the search criteria.
