Items API methods

As mentioned before each API call must be authorized by a valid access token. To get the valid authorization token you must authenticate user first.

Get Items List

This method is allowed for accounts with read_items scope granted.

Httpie:

$ http GET https://app.storeman.io/api/items \
  Authorization:"Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa"

cURL:

$ curl -XGET https://app.storeman.io/api/items \
  -H 'Authorization: Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa'

If the authorization token is valid you should get something similar to the following result:

HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Thu, 24 Jun 2021 11:32:44 GMT
ETag: W/"721a315d699014795fc6f7581671fcd7"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: 4bc9563c-2c2c-40fe-889d-33712c83b0a4
X-Runtime: 0.289424
X-XSS-Protection: 1; mode=block

[
  {
      "created_at": "2021-03-03T17:45:24.737Z",
      "id": "603fcb3489a6604115ffb40b",
      "name": "Metropolitan - pierścionek z różowego złota z diamentami",
      "properties": {
          "barcode": "123123123",
          "metal": "",
          "model": "9401R10",
          "size": "",
          "sku": "PZ09401-RB000-DIW000-D10konf",
          "stone": ""
      },
      "space": {
          "ancestor_parents": [
              "Szafa nr.1",
              "Poznań",
              "Dział logistyczno-magazynowy",
              "Poznań",
              "Ecomm",
              "YES Centrala"
          ],
          "capacity": null,
          "computed_capacity": 1,
          "controller": {
              "control_device": null,
              "indicator_range_from": 6,
              "indicator_range_to": 12
          },
          "created_at": "2021-03-03T17:30:42.927Z",
          "id": "603fc7c289a6604115ffb3f6",
          "name": "Półka 1.4",
          "parent": "Szafa nr.1",
          "updated_at": "2021-03-13T13:20:04.116Z"
      },
      "updated_at": "2021-03-03T17:45:24.737Z"
  },
  {
      "created_at": "2021-03-18T12:34:29.817Z",
      "id": "605348d589a66065c5308d50",
      "name": "8008698010402",
      "properties": null,
      "space": {
          "ancestor_parents": [
              "Półka 1.1",
              "Szafa nr.1",
              "Poznań",
              "Dział logistyczno-magazynowy",
              "Poznań",
              "Ecomm",
              "YES Centrala"
          ],
          "capacity": null,
          "computed_capacity": 1,
          "controller": {
              "control_device": {
                  "brigthness": 200,
                  "highlight_time": 30,
                  "host": "rpi6.cloudsailor.com",
                  "id": "603fc3d489a6604115ffb3d7",
                  "indicator_count": 356,
                  "type": "RPi"
              },
              "indicator_range_from": 22,
              "indicator_range_to": 25
          },
          "created_at": "2021-03-17T08:57:32.772Z",
          "id": "6051c47c89a66065c5308d49",
          "name": "Pojemnik 1.1.8",
          "parent": "Półka 1.1",
          "updated_at": "2021-03-18T12:34:30.255Z"
      },
      "updated_at": "2021-03-18T12:34:29.817Z"
  },
]

Get Item Templates List

This method is allowed for accounts with read_items scope granted.

Httpie:

# Get Item Template
$ http GET https://app.storeman.io/api/item_templates \
  Authorization:"Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa"

cURL:

$ curl -XGET https://app.storeman.io/api/item_templates \
  -H 'Authorization: Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa'

If the authorization token is valid you should get something similar to the following result:

    HTTP/1.1 200 OK
    Cache-Control: max-age=0, private, must-revalidate
    Connection: keep-alive
    Content-Type: application/json; charset=utf-8
    Date: Wed, 30 Jun 2021 10:02:29 GMT
    ETag: W/"614b94e05888733288e7d024b3a76dc3"
    Referrer-Policy: strict-origin-when-cross-origin
    Server: nginx/1.18.0 (Ubuntu)
    Transfer-Encoding: chunked
    X-Content-Type-Options: nosniff
    X-Download-Options: noopen
    X-Frame-Options: SAMEORIGIN
    X-Permitted-Cross-Domain-Policies: none
    X-Request-Id: de924c5d-e377-418e-a24a-36cf153f42f2
    X-Runtime: 0.228030
    X-XSS-Protection: 1; mode=block
    
    [
        {
            "id": "60da275c89a6600cfcb69191",
            "item_properties": [
                {
                    "custom_key": "sku",
                    "custom_name": "sku"
                },
                {
                    "custom_key": "barcode",
                    "custom_name": "barcode"
                }
            ],
            "name": "item_template_1"
        }
    ]

Get Item Template

This method is allowed for accounts with read_items scope granted.

Httpie:

$ http GET https://app.storeman.io/api/item_templates/{item_template_id} \
  Authorization:"Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa"

Replace {item_template_id} with valid id of item template. For example:

$ http GET https://app.storeman.io/api/item_templates/60da275c89a6600cfcb69191 \
  Authorization:"Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa"

cURL:

$ curl -XGET https://app.storeman.io/api/item_templates/60da275c89a6600cfcb69191 \
  -H 'Authorization: Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa'

If the authorization token is valid you should get something similar to the following result:

HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Sun, 27 Jun 2021 10:55:09 GMT
ETag: W/"b52bcb08aeb3473213fbf4fb4b240a25"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: 10c2bf08-9742-4348-b5e1-0bb0a5fadc72
X-Runtime: 0.235803
X-XSS-Protection: 1; mode=block

{
  "id": "60da275c89a6600cfcb69191",
  "item_properties": [
    {
      "custom_key": "sku",
      "custom_name": "sku"
    },
    {
      "custom_key": "size",
      "custom_name": "size"
    },
    {
      "custom_key": "stone",
      "custom_name": "stone"
    },
    {
      "custom_key": "metal",
      "custom_name": "metal"
    },
    {
      "custom_key": "barcode",
      "custom_name": "barcode"
    },
    {
      "custom_key": "model",
      "custom_name": "model"
    }
  ],
  "name": "Rings"
}

Create new item

This methods are allowed for accounts with write_items scope granted.

Create new item without space

Httpie

$ http POST https://app.storeman.io/api/items \
  Authorization:"Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa" \
  name="The Lord of the Rings: The Return of the King"

cURL:

$ curl -XPOST https://app.storeman.io/api/items \
  -H 'Authorization: Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa' \
  -d name="The Lord of the Rings: The Return of the King"

If the authorization token is valid you should get something similar to the following result:

HTTP/1.1 201 Created
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Sun, 27 Jun 2021 09:43:11 GMT
ETag: W/"baada85f1195eb8654b311a92b9f901e"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: daa5826d-2768-4459-848a-0636559f2573
X-Runtime: 0.369563
X-XSS-Protection: 1; mode=block

{
  "created_at": "2021-06-27T09:43:11.540Z",
  "id": "60d8482f89a66047a6ba1760",
  "name": "The Lord of the Rings: The Return of the King",
  "properties": null,
  "space": null,
  "updated_at": "2021-06-27T09:43:11.540Z"
}

Create new item in space

To create new item you have to provide all related and existing in the system objects’ ids needed for the item. You may create item in either a space or not.

Httpie:

$ http POST https://app.storeman.io/api/items \
  Authorization:"Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa" \
  name="The Lord of the Rings: The Return of the King" \
  space_id=603fc44489a6604115ffb3df

cURL:

$ curl -XPOST https://app.storeman.io/api/items \
  -H 'Authorization: Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa' \
  -d name="The Lord of the Rings: The Return of the King" \
  -d space_id=603fc44489a6604115ffb3df

If the authorization token is valid you should get something similar to the following result:

HTTP/1.1 201 Created
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Sun, 27 Jun 2021 09:43:11 GMT
ETag: W/"baada85f1195eb8654b311a92b9f901e"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: daa5826d-2768-4459-848a-0636559f2573
X-Runtime: 0.369563
X-XSS-Protection: 1; mode=block

HTTP/1.1 201 Created
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Sun, 27 Jun 2021 09:46:34 GMT
ETag: W/"0cba9d5067a660f4e68f6d5324a529ad"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: ab9941de-35fc-4bdb-81e6-05c69c8d3fb5
X-Runtime: 1.320538
X-XSS-Protection: 1; mode=block

{
  "created_at": "2021-06-27T09:46:33.441Z",
  "id": "60d848f989a66047a6ba1761",
  "name": "The Lord of the Rings: The Return of the King",
  "properties": null,
  "space": {
    "ancestor_parents": [
      "Poznań",
      "Poznań"
    ],
    "capacity": null,
    "computed_capacity": 3,
    "controller": null,
    "created_at": "2021-03-03T17:15:48.214Z",
    "id": "603fc44489a6604115ffb3df",
    "name": "YES Centrala",
    "parent": "Poznań",
    "updated_at": "2021-03-19T14:13:14.225Z"
  },
  "updated_at": "2021-06-27T09:46:33.441Z"
}

Create new item with item properties

To create new item with item properties you have to provide related and existing in the system item properties and item template id.

Httpie:

$ http POST https://app.storeman.io/api/items \
  Authorization:"Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa" \
  name="The Lord of the Rings: The Return of the King" \
  item_template_id=60da275c89a6600cfcb69191 \
  properties:='{"barcode": "533331122345"}'

cURL:

$ curl -XPOST https://app.storeman.io/api/items \
  -H 'Authorization: Bearer dyGraWQiCiJQd1JubTVvcFY0OUFfSmkyUnAxNHh6NjF5SHlpdU82dWI5blN3WFF5cHc0IiwiYWxnIjoibm9uZSJ9.eyJpc3MiOiJTdG9yZW1hbiIsImlhdCI6MTYyNDU3MjQ0MCwianRpIjoiZWE4NTgwNDYtZTk3Yi00ZGFmLWEzZDQtZmM1MjV1YWI3YjI3IiwidXNlciI6jyJpZCI6eyIkb2lkIjoiNjAzZmMzOWQ4OWE2NjA0MTE1ZmZiM2NmIn0sImVtYWlsIjoiaGVscEBzdG9yZW1hbi5pbyJ9cRa' \
  -H "Content-Type: application/json" \   
  -H "Accept: application/json" \
  -d '{"name": "The Lord of the Rings: The Return of the King", "item_template_id": "60da275c89a6600cfcb69191", "properties": {"barcode": "533331122345"}}'

If the authorization token is valid you should get something similar to the following result:

HTTP/1.1 201 Created
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Wed, 30 Jun 2021 09:18:07 GMT
ETag: W/"220e0c5319732a2ce98b69ee9489fb8d"
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: c45308f9-06c8-4391-82fb-e3b32aa75ef4
X-Runtime: 0.396994
X-XSS-Protection: 1; mode=block

{
    "created_at": "2021-06-30T09:18:07.700Z",
    "id": "60dc36cf89a6600cfcb691b5",
    "name": "The Lord of the Rings: The Return of the King",
    "properties": {
        "barcode": "533331122345"
    },
    "space": null,
    "updated_at": "2021-06-30T09:18:07.700Z"
}