openapi: 3.0.3
info:
  title: Sortly API
  version: 1.0.0
  description: >-
    Sortly API can be used to manage items and folders in your
    [Sortly](https://app.sortly.com/login) account.

    Our API is organized around REST. It returns JSON-encoded responses and uses
    standard HTTP response codes.

    This API is only available on **Sortly Enterprise Plan** subscription.


    NOTE:


    - This feature is currently under *beta*. Please expect minor updates in the
    near future.


    - Contact [dev-support@sortly.com](mailto:dev-support@sortly.com) for
    developer support.

    ## Authentication


    Authentication to the API is performed via OAuth 2.0. Under this, you must
    provide your secret key as the `Bearer` token in the Authorization header.

    All requests must be made over HTTPS.


    ##### Getting Started


    - Visit: https://app.sortly.com/public-api to obtain an API access key pair
    for your account.


    - Use the secret key as the `Bearer` token.


    ## Rate Limiting


    Sortly API calls are rate limited. You can make 1000 requests per API in a
    15-minute window. Rate limit information in available in the HTTP headers of
    the API response.


    |Header|Description|

    |---------|-------------|

    |`Sortly-Rate-Limit-Max`|Maximum number of requests allowed within the
    15-minute window |

    |`Sortly-Rate-Limit-Remaining`|Number of requests remaining in the current
    15-minute window   |

    |`Sortly-Rate-Limit-Reset`|The time at which the current rate limit window
    resets.(in seconds) |


    Once you go over the rate limit you will receive a HTTP 429 Too Many
    Requests error response.
servers:
  - url: https://api.sortly.co
paths:
  /api/v1/items:
    post:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      price:
                        type: number
                      quantity:
                        type: number
                      min_quantity:
                        type: number
                      notes:
                        type: string
                      type:
                        type: string
                      parent_id:
                        type: number
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      sid:
                        type: string
                      label_url:
                        type: string
                      label_url_type:
                        type: string
                      label_url_extra:
                        type: string
                      label_url_extra_type:
                        type: string
                      tag_names:
                        type: array
                        items:
                          type: string
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                          required:
                            - name
                      photos:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            name:
                              type: string
                            url:
                              type: string
                          required:
                            - id
                            - name
                            - url
                      custom_attribute_values:
                        type: array
                        items:
                          type: object
                          properties:
                            custom_attribute_id:
                              type: number
                            custom_attribute_name:
                              type: string
                            value:
                              type: string
                      measured_quantity:
                        type: object
                        properties:
                          value:
                            type: number
                          type:
                            type: string
                          name:
                            type: string
                          scale:
                            type: number
                      option_value_ids:
                        type: array
                        items:
                          type: string
                      item_group_id:
                        type: string
              examples:
                create-item:
                  value:
                    id: 2
                    name: itemName
                    price: 10
                    quantity: 1
                    min_quantity: 1
                    notes: newNotes
                    type: item
                    parent_id: 1
                    created_at: '2019-01-22T18:31:42'
                    updated_at: '2019-01-22T18:31:42'
                    sid: S01QSR0001
                    label_url: AB123AB45
                    label_url_type: org.iso.Code128
                    label_url_extra: '9780066620992'
                    label_url_extra_type: org.gs1.EAN-13
                    tag_names:
                      - T1
                      - T2
                    tags:
                      - name: T1
                      - name: T1
                    photos:
                      - id: 1
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                      - id: 2
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    custom_attribute_values:
                      - custom_attribute_id: 2
                        custom_attribute_name: Custom Field
                        value: newValue
                    measured_quantity:
                      value: 1
                      type: weight
                      name: lbs
                      scale: 4
                    option_value_ids:
                      - a03faad7-5689-4c6d-aee1-f282052fad8d
                      - b527720d-19ec-478c-8a06-ac11713f47a1
                    item_group_id: 309ec621-bcf1-4567-922f-f64a52900fff
                create-folder:
                  value:
                    id: 104105214
                    name: My New Folder
                    price: null
                    min_quantity: null
                    quantity: null
                    notes: null
                    parent_id: null
                    sid: SCZ29R0011
                    label_url: null
                    label_url_type: null
                    label_url_extra: null
                    label_url_extra_type: null
                    tag_names: []
                    type: folder
                    created_at: '2026-01-27T17:47:31.026Z'
                    updated_at: '2026-01-27T17:47:31.035Z'
                    custom_attribute_values:
                      - value: null
                        custom_attribute_id: 363882
                        custom_attribute_name: Expiry Date
                    photos: []
                    tags: []
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Create an Item
      operationId: Create an Item
      description: ''
      tags:
        - Items
      parameters:
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            examples:
              create-folder:
                summary: Create a folder
                description: Create a folder with the given attributes
                value:
                  name: My New Folder
                  type: folder
              create-item:
                summary: Create an Item
                description: Create an item with the given attributes
                value:
                  name: itemName
                  notes: newNotes
                  price: 10
                  quantity: 1
                  min_quantity: 1
                  type: folder
                  parent_id: 1
                  tag_names:
                    - Tag1
                    - Tag2
                  tags:
                    - name: Tag1
                    - name: Tag2
                  custom_attribute_values:
                    - custom_attribute_id: 2
                      value: newValue
                  photo_ids:
                    - 1
                  measured_quantity:
                    value: 1
                    type: weight
                    name: lbs
                    scale: 4
                  option_value_ids:
                    - a03faad7-5689-4c6d-aee1-f282052fad8d
                    - b527720d-19ec-478c-8a06-ac11713f47a1
                  item_group_id: 309ec621-bcf1-4567-922f-f64a52900fff
            schema:
              $ref: '#/components/schemas/Item'
    get:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        price:
                          type: number
                        quantity:
                          type: number
                        min_quantity:
                          type: number
                        notes:
                          type: string
                        type:
                          type: string
                        parent_id:
                          type: number
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        sid:
                          type: string
                        label_url:
                          type: string
                        label_url_type:
                          type: string
                        label_url_extra:
                          type: string
                        label_url_extra_type:
                          type: string
                        tag_names:
                          type: array
                          items:
                            type: string
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                            required:
                              - name
                        photos:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: number
                              name:
                                type: string
                              url:
                                type: string
                            required:
                              - id
                              - name
                              - url
                        custom_attribute_values:
                          type: array
                          items:
                            type: object
                            properties:
                              custom_attribute_id:
                                type: number
                              custom_attribute_name:
                                type: string
                              value:
                                type: string
                            required:
                              - custom_attribute_id
                              - custom_attribute_name
                              - value
                        measured_quantity:
                          type: object
                          properties:
                            value:
                              type: number
                            type:
                              type: string
                            name:
                              type: string
                            scale:
                              type: number
                        option_value_ids:
                          type: array
                          items:
                            type: string
                        item_group_id:
                          type: string
                      required:
                        - id
                        - name
                        - price
                        - quantity
                        - min_quantity
                        - notes
                        - type
                        - parent_id
                        - created_at
                        - updated_at
                        - sid
                        - label_url
                        - label_url_type
                        - label_url_extra
                        - label_url_extra_type
                        - tag_names
                        - tags
                        - photos
                        - custom_attribute_values
                        - option_value_ids
                        - item_group_id
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          page:
                            type: number
                          next_page_url:
                            type: string
                          total_pages:
                            type: number
                          total_count:
                            type: number
              example:
                data:
                  - id: 2
                    name: itemName
                    price: 10
                    quantity: 1
                    min_quantity: 1
                    notes: newNotes
                    type: folder
                    parent_id: 1
                    created_at: '2019-01-22T18:31:42'
                    updated_at: '2019-01-22T18:31:42'
                    sid: S01QSR0002
                    label_url: AB123AB45
                    label_url_type: org.iso.Code128
                    label_url_extra: '9780066620992'
                    label_url_extra_type: org.gs1.EAN-13
                    tag_names:
                      - T1
                      - T2
                    tags:
                      - name: T1
                      - name: T2
                    photos:
                      - id: 2
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                      - id: 3
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    custom_attribute_values:
                      - custom_attribute_id: 2
                        custom_attribute_name: Custom Field
                        value: newValue
                    measured_quantity:
                      value: 1
                      type: weight
                      name: lbs
                      scale: 4
                    option_value_ids:
                      - a03faad7-5689-4c6d-aee1-f282052fad8d
                      - b527720d-19ec-478c-8a06-ac11713f47a1
                    item_group_id: 309ec621-bcf1-4567-922f-f64a52900fff
                  - id: 3
                    name: anotherItemName
                    price: 10
                    quantity: 1
                    min_quantity: 1
                    notes: newNotes
                    type: item
                    parent_id: 1
                    created_at: '2019-01-22T18:31:42'
                    updated_at: '2019-01-23T18:31:42'
                    sid: S01QSR0003
                    label_url: AB123AB45
                    label_url_type: org.iso.Code128
                    label_url_extra: '9780066620992'
                    label_url_extra_type: org.gs1.EAN-13
                    tag_names:
                      - T1
                      - T4
                    tags:
                      - name: T1
                      - name: T4
                    photos:
                      - id: 2
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                      - id: 4
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    custom_attribute_values:
                      - custom_attribute_id: 3
                        custom_attribute_name: Custom Field
                        value: newValue
                    option_value_ids:
                      - a03faad7-5689-4c6d-aee1-f282052fad8d
                      - b527720d-19ec-478c-8a06-ac11713f47a1
                    item_group_id: 309ec621-bcf1-4567-922f-f64a52900fff
                meta:
                  pagination:
                    page: 2
                    next_page_url: >-
                      http://localhost:3000/api/public/v1/items?per_page=2&page=2&folder_id=1&include=custom_attributes%2Cphotos
                    total_pages: 3
                    total_count: 6
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: List Items
      operationId: List Items
      description: ''
      tags:
        - Items
      parameters:
        - name: per_page
          in: query
          description: Page size | Defaults to 10
          example: '2'
          schema:
            type: number
        - name: page
          in: query
          description: Page number | Defaults to 1
          example: '1'
          schema:
            type: number
        - name: folder_id
          in: query
          description: >-
            Filter by parent ID | The null value means root | If `folder id` not
            provided, filter will not apply
          example: '1'
          schema:
            type: string
        - name: include
          in: query
          description: Includes nested association
          example: custom_attributes,photos,options
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
  /api/v1/items/recent:
    get:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content: {}
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Recent Items List
      operationId: Recent Items List
      description: ''
      tags:
        - Items
      parameters:
        - name: per_page
          in: query
          description: Page size | Defaults to 10
          example: '2'
          schema:
            type: number
        - name: page
          in: query
          description: Page number | Defaults to 1
          example: '1'
          schema:
            type: number
        - name: updated_since
          in: query
          description: >-
            Filter by updated at | If `updated since` is not provided, the end
            point functions similar to list endpoint |  Number of seconds since
            the Epoch.
          example: '1559120004'
          schema:
            type: number
        - name: include
          in: query
          description: Includes nested association
          example: custom_attributes,photos,options
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
  /api/v1/items/{item_id}:
    delete:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example: {}
        '400':
          description: Bad Request
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
        '404':
          description: Not Found
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Found
      summary: Delete Item
      operationId: Delete Item
      description: ''
      tags:
        - Items
      parameters:
        - name: item_id
          in: path
          description: an item `ID` attribute
          required: true
          example: '3'
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
    get:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      price:
                        type: number
                      quantity:
                        type: number
                      min_quantity:
                        type: number
                      notes:
                        type: string
                      type:
                        type: string
                      parent_id:
                        type: number
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      sid:
                        type: string
                      label_url:
                        type: string
                      label_url_type:
                        type: string
                      label_url_extra:
                        type: string
                      label_url_extra_type:
                        type: string
                      tag_names:
                        type: array
                        items:
                          type: string
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                          required:
                            - name
                      photos:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            name:
                              type: string
                            url:
                              type: string
                          required:
                            - id
                            - name
                            - url
                      custom_attribute_values:
                        type: array
                        items:
                          type: object
                          properties:
                            custom_attribute_id:
                              type: number
                            custom_attribute_name:
                              type: string
                            value:
                              type: string
                      option_value_ids:
                        type: array
                        items:
                          type: string
                      item_group_id:
                        type: string
              example:
                data:
                  id: 1
                  name: itemName
                  price: 10
                  quantity: 1
                  min_quantity: 1
                  notes: newNotes
                  type: folder
                  parent_id: 1
                  created_at: '2019-01-22T18:31:42'
                  updated_at: '2019-01-22T18:31:42'
                  sid: S01QSR0001
                  label_url: AB123AB45
                  label_url_type: org.iso.Code128
                  label_url_extra: '9780066620992'
                  label_url_extra_type: org.gs1.EAN-13
                  tag_names:
                    - T1
                    - T2
                  tags:
                    - name: T1
                    - name: T2
                  photos:
                    - id: 1
                      name: shrine20041124-40883-1pwhzoq.gif
                      url: >-
                        https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    - id: 2
                      name: shrine20041124-40883-1pwhzoq.gif
                      url: >-
                        https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                  custom_attribute_values:
                    - custom_attribute_id: 2
                      custom_attribute_name: Custom Field
                      value: newValue
                  option_value_ids:
                    - a03faad7-5689-4c6d-aee1-f282052fad8d
                    - b527720d-19ec-478c-8a06-ac11713f47a1
                  item_group_id: 309ec621-bcf1-4567-922f-f64a52900fff
        '400':
          description: Bad Request
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
        '404':
          description: Not Found
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Found
      summary: Fetch Item
      operationId: Fetch Item
      description: ''
      tags:
        - Items
      parameters:
        - name: item_id
          in: path
          description: Item ID
          required: true
          example: '1'
          schema:
            type: string
        - name: include
          in: query
          description: includes nested association
          example: custom_attributes,photos,options
          schema:
            type: string
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
    put:
      responses:
        '204':
          description: No Content
          headers:
            Location:
              schema:
                type: string
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example: {}
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
        '404':
          description: Not Found
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Found
      summary: Update Item
      operationId: Update Item
      description: ''
      tags:
        - Items
      parameters:
        - name: item_id
          in: path
          description: Item ID
          required: true
          example: '1'
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              name: itemName
              notes: newNotes
              price: 10
              quantity: 1
              min_quantity: 1
              parent_id: 1
              label_url: AB123AB45
              label_url_type: org.iso.Code128
              label_url_extra: '9780066620992'
              label_url_extra_type: org.gs1.EAN-13
              tags:
                - name: Tag1
                - name: Tag2
              custom_attribute_values:
                - custom_attribute_id: 2
                  custom_attribute_name: Custom Field
                  value: newValue
              photo_ids:
                - 1
              option_value_ids:
                - a03faad7-5689-4c6d-aee1-f282052fad8d
                - b527720d-14rc-478c-8a06-ac11713f47a1
            schema:
              $ref: '#/components/schemas/Item'
  /api/v1/items/{item_id}/move:
    post:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      price:
                        type: number
                      quantity:
                        type: number
                      notes:
                        type: string
                      parent_id:
                        type: number
                      sid:
                        type: string
                      tag_names:
                        type: array
                        items:
                          type: string
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                          required:
                            - name
                      type:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
              example:
                data:
                  id: 1
                  name: with photo id2
                  price: 10
                  quantity: 2
                  notes: some notes
                  parent_id: 2
                  sid: S000XT3976
                  tag_names:
                    - T1
                    - T2
                  tags:
                    - name: T1
                    - name: T2
                  type: item
                  created_at: '2019-02-14T16:49:55.006Z'
                  updated_at: '2019-02-15T11:11:11.167Z'
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
        '404':
          description: Not Found
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content: {}
      summary: Move an Item
      operationId: Move an Item
      description: ''
      tags:
        - Items
      parameters:
        - name: item_id
          in: path
          description: Item ID
          required: true
          example: '2'
          schema:
            type: number
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              quantity: 2
              folder_id: 1
              leave_zero_quantity: false
            schema:
              type: object
              required:
                - quantity
              properties:
                quantity:
                  type: number
                  description: Move quantity of item
                folder_id:
                  type: number
                  description: Target folder ID. If not defined then will be moved to root
                leave_zero_quantity:
                  type: boolean
                  description: >-
                    Determines wether items with zero quantity are kept or not.
                    Default is false.
  /api/v1/items/{item_id}/copy:
    post:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                      name:
                        type: string
                      price:
                        type: number
                      quantity:
                        type: number
                      notes:
                        type: string
                      type:
                        type: string
                      parent_id:
                        type: number
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      sid:
                        type: string
                      tag_names:
                        type: array
                        items:
                          type: string
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                          required:
                            - name
                      photos:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            name:
                              type: string
                            url:
                              type: string
                          required:
                            - id
                            - name
                            - url
                      custom_attribute_values:
                        type: array
                        items:
                          type: object
                          properties:
                            custom_attribute_id:
                              type: number
                            custom_attribute_name:
                              type: string
                            value:
                              type: string
              example:
                data:
                  id: 3
                  name: itemName
                  price: 10
                  quantity: 1
                  notes: newNotes
                  type: folder
                  parent_id: 1
                  created_at: '2019-01-22T18:31:42'
                  updated_at: '2019-01-22T18:31:42'
                  sid: S01QSR0002
                  tag_names:
                    - T1
                    - T2
                  tags:
                    - name: T1
                    - name: T2
                  photos:
                    - id: 1
                      name: shrine20041124-40883-1pwhzoq.gif
                      url: >-
                        https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    - id: 2
                      name: shrine20041124-40883-1pwhzoq.gif
                      url: >-
                        https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                  custom_attribute_values:
                    - custom_attribute_id: 2
                      custom_attribute_name: Custom Field
                      value: newValue
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
        '404':
          description: Not Found
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Found
      summary: Clone an Item
      operationId: Clone an Item
      description: ''
      tags:
        - Items
      parameters:
        - name: item_id
          in: path
          description: Item ID
          required: true
          example: '2'
          schema:
            type: number
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              quantity: 2
              folder_id: 1
              include_subtree: true
              new_sid: true
            schema:
              type: object
              properties:
                quantity:
                  type: number
                  description: Copy item and set this quantity
                folder_id:
                  type: number
                  description: Target folder ID. If not defined then will be moved to root
                include_subtree:
                  type: boolean
                  description: Copy with nested items or not
                new_sid:
                  type: boolean
                  description: Copy with new SID generation or not
  /api/v1/items/search:
    post:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        price:
                          type: number
                        quantity:
                          type: number
                        min_quantity:
                          type: number
                        notes:
                          type: string
                        type:
                          type: string
                        parent_id:
                          type: number
                        created_at:
                          type: string
                        updated_at:
                          type: string
                        sid:
                          type: string
                        label_url:
                          type: string
                        label_url_type:
                          type: string
                        label_url_extra:
                          type: string
                        label_url_extra_type:
                          type: string
                        tag_names:
                          type: array
                          items:
                            type: string
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                            required:
                              - name
                        photos:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: number
                              name:
                                type: string
                              url:
                                type: string
                            required:
                              - id
                              - name
                              - url
                        custom_attribute_values:
                          type: array
                          items:
                            type: object
                            properties:
                              custom_attribute_id:
                                type: number
                              custom_attribute_name:
                                type: string
                              value:
                                type: string
                            required:
                              - custom_attribute_id
                              - custom_attribute_name
                              - value
                        option_value_ids:
                          type: array
                          items:
                            type: string
                        item_group_id:
                          type: string
                      required:
                        - id
                        - name
                        - price
                        - quantity
                        - min_quantity
                        - notes
                        - type
                        - parent_id
                        - created_at
                        - updated_at
                        - sid
                        - label_url
                        - label_url_type
                        - label_url_extra
                        - label_url_extra_type
                        - tag_names
                        - tags
                        - photos
                        - custom_attribute_values
                        - option_value_ids
                        - item_group_id
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          page:
                            type: number
                          next_page_url:
                            type: string
                          total_pages:
                            type: number
                          total_count:
                            type: number
              example:
                data:
                  - id: 2
                    name: itemName
                    price: 10
                    quantity: 1
                    min_quantity: 1
                    notes: newNotes
                    type: folder
                    parent_id: 1
                    created_at: '2019-01-22T18:31:42'
                    updated_at: '2019-01-22T18:31:42'
                    sid: S01QSR0002
                    label_url: AB123AB45
                    label_url_type: org.iso.Code128
                    label_url_extra: '9780066620992'
                    label_url_extra_type: org.gs1.EAN-13
                    tag_names:
                      - T1
                      - T2
                    tags:
                      - name: T1
                      - name: T2
                    photos:
                      - id: 2
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                      - id: 3
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    custom_attribute_values:
                      - custom_attribute_id: 2
                        custom_attribute_name: Custom Field
                        value: newValue
                    option_value_ids:
                      - a03faad7-5689-4c6d-aee1-f282052fad8d
                      - b527720d-19ec-478c-8a06-ac11713f47a1
                    item_group_id: 309ec621-bcf1-4567-922f-f64a52900fff
                  - id: 3
                    name: anotherItemName
                    price: 10
                    quantity: 1
                    min_quantity: 1
                    notes: newNotes
                    type: item
                    parent_id: 1
                    created_at: '2019-01-22T18:31:42'
                    updated_at: '2019-01-23T18:31:42'
                    sid: S01QSR0003
                    label_url: AB123AB45
                    label_url_type: org.iso.Code128
                    label_url_extra: '9780066620992'
                    label_url_extra_type: org.gs1.EAN-13
                    tag_names:
                      - T1
                      - T4
                    tags:
                      - name: T1
                      - name: T4
                    photos:
                      - id: 2
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                      - id: 4
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    custom_attribute_values:
                      - custom_attribute_id: 3
                        custom_attribute_name: Custom Field
                        value: newValue
                    option_value_ids:
                      - a03faad7-5689-4c6d-aee1-f282052fad8d
                      - b527720d-19ec-478c-8a06-ac11713f47a1
                    item_group_id: 309ec621-bcf1-4567-922f-f64a52900fff
                meta:
                  pagination:
                    page: 2
                    next_page_url: >-
                      http://localhost:3000/api/public/v1/items/search?per_page=2&page=2&include=custom_attributes%2Cphotos
                    total_pages: 3
                    total_count: 6
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Search Items
      operationId: Search Items
      description: ''
      tags:
        - Items
      parameters:
        - name: name
          in: query
          description: The name of the thing to search for (can be up 190 characters long)
          schema:
            type: string
        - name: type
          in: query
          description: >-
            The type of thing to search for. Allowed values are "all", "item",
            and "folder" with "all" being the default
          schema:
            type: string
        - name: item_group_id
          in: query
          description: >-
            ID of related Item Group. See [Item
            Groups](reference/0/item-variants-groups)
          schema:
            type: string
        - name: folder_ids
          in: query
          description: Array of comma-separated numeric folder ids in which to search
          example: '[1234, 5678]'
          schema:
            type: array
        - name: sort
          in: query
          description: >-
            Array of objects with the key being the field to sort by (only name
            is currently supported) and the value being the direction.
            Acceptable sort directions are "asc" and "desc". Multiple sort
            objects are allowed.
          example: '[{ "name": "asc" }]'
          schema:
            type: array
        - name: per_page
          in: query
          description: Page size | Defaults to 100
          example: '2'
          schema:
            type: number
        - name: page
          in: query
          description: >-
            Page number | Defaults to 1 (the same body should be passed to the
            next page url for pagination)
          example: '1'
          schema:
            type: number
        - name: include
          in: query
          description: Includes nested association
          example: custom_attributes,photos,options
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              name: itemName
              folder_ids:
                - 123456
                - 7890123
              sort:
                - name: asc
  /api/v1/item_groups:
    post:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  sid:
                    type: string
                  label_url:
                    type: string
                  label_url_type:
                    type: string
                  label_url_extra:
                    nullable: true
                  label_url_extra_type:
                    nullable: true
                  photos:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        url:
                          type: string
                      required:
                        - id
                        - name
                        - url
                  attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        order:
                          type: number
                        options:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              order:
                                type: number
                            required:
                              - id
                              - name
                              - order
                      required:
                        - id
                        - name
                        - order
                        - options
              example:
                id: 82b8c7c9-d7a0-49a8-830e-8f01ed58a5dc
                name: T-shirt
                sid: S01UOG0005
                label_url: sy://BARCODE/m_barcode_us/S01UOG0005
                label_url_type: com.sortly.sortlyLabel
                label_url_extra: null
                label_url_extra_type: null
                photos:
                  - id: 154
                    name: shrine20041124-40883-1pwhzoq.gif
                    url: >-
                      https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                  - id: 648
                    name: shrine20041124-40883-1pwhzoq.gif
                    url: >-
                      https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                attributes:
                  - id: 13360e26-5d0a-4450-b6c5-5ff209123ea3
                    name: Color
                    order: 0
                    options:
                      - id: 4e3a75d6-31b5-49f6-ad9b-58d97c08ee19
                        name: Yellow
                        order: 0
                      - id: d0c650ed-c180-4d4c-9884-f483c59bb97d
                        name: Black
                        order: 1
                      - id: 64d76318-1721-4c67-bb97-fc4f93d0bff1
                        name: Red
                        order: 2
                  - id: 0bb90eca-869a-4be0-90c7-eebb8b1d25b3
                    name: Size
                    order: 1
                    options:
                      - id: 45c6672c-c3a7-4db3-9d04-f255876b46b3
                        name: XL
                        order: 0
                      - id: eda8b7f0-0384-4144-b6e4-6b116577c03b
                        name: L
                        order: 1
                      - id: c9edd56f-cc18-4bf4-a46b-80081fc181ab
                        name: M
                        order: 2
                      - id: 8d12e556-ad25-4b67-900e-5e66451c2c36
                        name: S
                        order: 3
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Create Item Group
      operationId: Create Item Group
      description: ''
      tags:
        - Item Groups
      parameters:
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              item_group:
                name: T-shirt
                photo_ids:
                  - 154
                  - 648
                attributes:
                  - name: Color
                    order: 0
                    options:
                      - name: Yellow
                        order: 0
                      - name: Black
                        order: 1
                      - name: Red
                        order: 2
                  - name: Size
                    order: 1
                    options:
                      - name: XL
                        order: 0
                      - name: L
                        order: 1
                      - name: M
                        order: 2
                      - name: S
                        order: 3
            schema:
              $ref: '#/components/schemas/ItemGroup'
    get:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  item_groups:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        sid:
                          type: string
                        label_url:
                          type: string
                        label_url_type:
                          type: string
                        label_url_extra:
                          nullable: true
                        label_url_extra_type:
                          nullable: true
                        photos:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: number
                              name:
                                type: string
                              url:
                                type: string
                            required:
                              - id
                              - name
                              - url
                        attributes:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              order:
                                type: number
                              options:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    name:
                                      type: string
                                    order:
                                      type: number
                                  required:
                                    - id
                                    - name
                                    - order
                            required:
                              - id
                              - name
                              - order
                              - options
                        variants:
                          type: array
                          items:
                            type: object
                            properties:
                              option_value_ids:
                                type: array
                                items:
                                  type: string
                              item_attributes:
                                type: object
                                properties:
                                  id:
                                    type: number
                                  parent_id:
                                    nullable: true
                                  name:
                                    type: string
                                  quantity_attributes:
                                    type: object
                                    properties:
                                      quantity:
                                        type: string
                                      unit_type:
                                        type: string
                                      unit_name:
                                        type: string
                                  min_quantity_attributes:
                                    type: object
                                    properties:
                                      quantity:
                                        type: string
                                      unit_type:
                                        type: string
                                      unit_name:
                                        type: string
                                  price:
                                    type: string
              example:
                item_groups:
                  - id: 82b8c7c9-d7a0-49a8-830e-8f01ed58a5dc
                    name: T-shirt
                    sid: S01UOG0005
                    label_url: sy://BARCODE/m_barcode_us/S01UOG0005
                    label_url_type: com.sortly.sortlyLabel
                    label_url_extra: null
                    label_url_extra_type: null
                    photos:
                      - id: 154
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                      - id: 648
                        name: shrine20041124-40883-1pwhzoq.gif
                        url: >-
                          https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                    attributes:
                      - id: 13360e26-5d0a-4450-b6c5-5ff209123ea3
                        name: Color
                        order: 0
                        options:
                          - id: 4e3a75d6-31b5-49f6-ad9b-58d97c08ee19
                            name: Yellow
                            order: 0
                          - id: d0c650ed-c180-4d4c-9884-f483c59bb97d
                            name: Black
                            order: 1
                          - id: 64d76318-1721-4c67-bb97-fc4f93d0bff1
                            name: Red
                            order: 2
                      - id: 0bb90eca-869a-4be0-90c7-eebb8b1d25b3
                        name: Size
                        order: 1
                        options:
                          - id: 45c6672c-c3a7-4db3-9d04-f255876b46b3
                            name: XL
                            order: 0
                          - id: eda8b7f0-0384-4144-b6e4-6b116577c03b
                            name: L
                            order: 1
                          - id: c9edd56f-cc18-4bf4-a46b-80081fc181ab
                            name: M
                            order: 2
                          - id: 8d12e556-ad25-4b67-900e-5e66451c2c36
                            name: S
                            order: 3
                    variants:
                      - option_value_ids:
                          - d0c650ed-c180-4d4c-9884-f483c59bb97d
                          - 45c6672c-c3a7-4db3-9d04-f255876b46b3
                        item_attributes:
                          id: 5122
                          parent_id: null
                          name: Black • XL
                          quantity_attributes:
                            quantity: '11'
                            unit_type: count
                            unit_name: units
                          min_quantity_attributes:
                            quantity: '5'
                            unit_type: count
                            unit_name: units
                          price: '14'
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: List of Item Groups
      operationId: List of Item Groups
      description: ''
      tags:
        - Item Groups
      parameters:
        - name: per_page
          in: query
          description: Page size | Defaults to 10
          example: '2'
          schema:
            type: number
        - name: page
          in: query
          description: Page number | Defaults to 1
          example: '1'
          schema:
            type: number
        - name: include
          in: query
          description: Includes item variants of each group
          example: variants,photos
          schema:
            type: string
        - name: updated_since
          in: query
          description: >-
            Filter by updated at | If `updated since` is not provided, the end
            point functions similar to list endpoint |  Number of seconds since
            the Epoch.
          example: '1559120004'
          schema:
            type: number
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
  /api/v1/item_groups/{item_group_id}:
    get:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  sid:
                    type: string
                  label_url:
                    type: string
                  label_url_type:
                    type: string
                  label_url_extra:
                    nullable: true
                  label_url_extra_type:
                    nullable: true
                  photos:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        url:
                          type: string
                      required:
                        - id
                        - name
                        - url
                  attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        order:
                          type: number
                        options:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              order:
                                type: number
                            required:
                              - id
                              - name
                              - order
                      required:
                        - id
                        - name
                        - order
                        - options
                  variants:
                    type: array
                    items:
                      type: object
                      properties:
                        option_value_ids:
                          type: array
                          items:
                            type: string
                        item_attributes:
                          type: object
                          properties:
                            id:
                              type: number
                            parent_id:
                              nullable: true
                            name:
                              type: string
                            quantity_attributes:
                              type: object
                              properties:
                                quantity:
                                  type: string
                                unit_type:
                                  type: string
                                unit_name:
                                  type: string
                            min_quantity_attributes:
                              type: object
                              properties:
                                quantity:
                                  type: string
                                unit_type:
                                  type: string
                                unit_name:
                                  type: string
                            price:
                              type: string
              example:
                id: 82b8c7c9-d7a0-49a8-830e-8f01ed58a5dc
                name: T-shirt
                sid: S01UOG0005
                label_url: sy://BARCODE/m_barcode_us/S01UOG0005
                label_url_type: com.sortly.sortlyLabel
                label_url_extra: null
                label_url_extra_type: null
                photos:
                  - id: 154
                    name: shrine20041124-40883-1pwhzoq.gif
                    url: >-
                      https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                  - id: 648
                    name: shrine20041124-40883-1pwhzoq.gif
                    url: >-
                      https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                attributes:
                  - id: 13360e26-5d0a-4450-b6c5-5ff209123ea3
                    name: Color
                    order: 0
                    options:
                      - id: 4e3a75d6-31b5-49f6-ad9b-58d97c08ee19
                        name: Yellow
                        order: 0
                      - id: d0c650ed-c180-4d4c-9884-f483c59bb97d
                        name: Black
                        order: 1
                      - id: 64d76318-1721-4c67-bb97-fc4f93d0bff1
                        name: Red
                        order: 2
                  - id: 0bb90eca-869a-4be0-90c7-eebb8b1d25b3
                    name: Size
                    order: 1
                    options:
                      - id: 45c6672c-c3a7-4db3-9d04-f255876b46b3
                        name: XL
                        order: 0
                      - id: eda8b7f0-0384-4144-b6e4-6b116577c03b
                        name: L
                        order: 1
                      - id: c9edd56f-cc18-4bf4-a46b-80081fc181ab
                        name: M
                        order: 2
                      - id: 8d12e556-ad25-4b67-900e-5e66451c2c36
                        name: S
                        order: 3
                variants:
                  - option_value_ids:
                      - d0c650ed-c180-4d4c-9884-f483c59bb97d
                      - 45c6672c-c3a7-4db3-9d04-f255876b46b3
                    item_attributes:
                      id: 5122
                      parent_id: null
                      name: Black • XL
                      quantity_attributes:
                        quantity: '11'
                        unit_type: count
                        unit_name: units
                      min_quantity_attributes:
                        quantity: '5'
                        unit_type: count
                        unit_name: units
                      price: '14'
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Fetch Item Group
      operationId: Fetch Item Group
      description: ''
      tags:
        - Item Groups
      parameters:
        - name: item_group_id
          in: path
          description: ID of Item Group
          required: true
          example: 82b8c7c9-d7a0-49a8-830e-8f01ed58a5dc
          schema:
            type: string
        - name: include
          in: query
          description: Includes item variants of each group
          example: variants,photos
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
    put:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  sid:
                    type: string
                  label_url:
                    type: string
                  label_url_type:
                    type: string
                  label_url_extra:
                    nullable: true
                  label_url_extra_type:
                    nullable: true
                  photos:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        url:
                          type: string
                      required:
                        - id
                        - name
                        - url
                  attributes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        order:
                          type: number
                        options:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              order:
                                type: number
                            required:
                              - id
                              - name
                              - order
                      required:
                        - id
                        - name
                        - order
                        - options
              example:
                id: 82b8c7c9-d7a0-49a8-830e-8f01ed58a5dc
                name: T-shirt
                sid: S01UOG0005
                label_url: sy://BARCODE/m_barcode_us/S01UOG0005
                label_url_type: com.sortly.sortlyLabel
                label_url_extra: null
                label_url_extra_type: null
                photos:
                  - id: 154
                    name: shrine20041124-40883-1pwhzoq.gif
                    url: >-
                      https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                  - id: 648
                    name: shrine20041124-40883-1pwhzoq.gif
                    url: >-
                      https://f19a116f9340bf8132633bba.com/photos/467020303d75c097b7b147349e67f2e229c639a8.small.gif
                attributes:
                  - id: 13360e26-5d0a-4450-b6c5-5ff209123ea3
                    name: Color
                    order: 0
                    options:
                      - id: 4e3a75d6-31b5-49f6-ad9b-58d97c08ee19
                        name: Yellow
                        order: 0
                      - id: d0c650ed-c180-4d4c-9884-f483c59bb97d
                        name: Dark
                        order: 1
                      - id: 64d76318-1721-4c67-bb97-fc4f93d0bff1
                        name: Red
                        order: 2
                      - id: 5964dc3c-7cb0-4a73-823f-4058ba1c5600
                        name: White
                        order: 3
                  - id: 0bb90eca-869a-4be0-90c7-eebb8b1d25b3
                    name: Size
                    order: 1
                    options:
                      - id: 45c6672c-c3a7-4db3-9d04-f255876b46b3
                        name: XL
                        order: 0
                      - id: eda8b7f0-0384-4144-b6e4-6b116577c03b
                        name: L
                        order: 1
                      - id: c9edd56f-cc18-4bf4-a46b-80081fc181ab
                        name: M
                        order: 2
                      - id: 8d12e556-ad25-4b67-900e-5e66451c2c36
                        name: S
                        order: 3
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Update an Item Group
      operationId: Update an Item Group
      description: ''
      tags:
        - Item Groups
      parameters:
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              name: Shirt
              attributes:
                - id: 13360e26-5d0a-4450-b6c5-5ff209123ea3
                  name: Color
                  order: 0
                  options:
                    - id: 4e3a75d6-31b5-49f6-ad9b-58d97c08ee19
                      name: Yellow
                      order: 0
                    - id: d0c650ed-c180-4d4c-9884-f483c59bb97d
                      name: Dark
                      order: 1
                    - id: 64d76318-1721-4c67-bb97-fc4f93d0bff1
                      name: Red
                      order: 2
                    - name: White
                      order: 3
                - id: 0bb90eca-869a-4be0-90c7-eebb8b1d25b3
                  name: Size
                  order: 1
                  options:
                    - id: 45c6672c-c3a7-4db3-9d04-f255876b46b3
                      name: XL
                      order: 0
                    - id: eda8b7f0-0384-4144-b6e4-6b116577c03b
                      name: L
                      order: 1
                    - id: c9edd56f-cc18-4bf4-a46b-80081fc181ab
                      name: M
                      order: 2
                    - id: 8d12e556-ad25-4b67-900e-5e66451c2c36
                      name: S
                      order: 3
            schema:
              $ref: '#/components/schemas/ItemGroup'
    delete:
      responses:
        '204':
          description: No Content
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example: {}
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Delete Item Group
      operationId: Delete Item Group
      description: ''
      tags:
        - Item Groups
      parameters:
        - name: item_group_id
          in: path
          description: ID of Item Group
          required: true
          example: 82b8c7c9-d7a0-49a8-830e-8f01ed58a5dc
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
  /api/v1/units:
    get:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content: {}
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: List of Units
      operationId: List of Units
      description: ''
      tags:
        - Units of Measure
      parameters:
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
  /api/v1/custom_fields:
    get:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        name:
                          type: string
                        type:
                          type: string
                        applies_to:
                          type: string
                        created_at:
                          type: string
                        updated_at:
                          type: string
                      required:
                        - id
                        - name
                        - type
                        - applies_to
                        - created_at
                        - updated_at
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          page:
                            type: number
                          next_page_url:
                            type: string
                          total_pages:
                            type: number
                          total_count:
                            type: number
              example:
                data:
                  - id: 3
                    name: Custom Field
                    type: text
                    applies_to: item
                    created_at: '2019-01-22T18:31:42'
                    updated_at: '2019-01-22T18:31:42'
                  - id: 4
                    name: Another Custom Field
                    type: datetime
                    applies_to: folder
                    created_at: '2019-01-22T18:31:42'
                    updated_at: '2019-01-22T18:31:42'
                meta:
                  pagination:
                    page: 2
                    next_page_url: >-
                      http://localhost:3000/api/public/v1/custom_fields?par_page=2&page=2
                    total_pages: 3
                    total_count: 6
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: List Custom Fields
      operationId: List Custom Fields
      description: ''
      tags:
        - Custom Fields
      parameters:
        - name: per_page
          in: query
          description: Page size | Defaults to 10
          example: '2'
          schema:
            type: number
        - name: page
          in: query
          description: Page number | Defaults to 1
          example: '1'
          schema:
            type: number
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
  /api/v1/alerts:
    get:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content: {}
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: List Alerts
      operationId: List Alerts
      description: ''
      tags:
        - Alerts
      parameters:
        - name: per_page
          in: query
          description: Page size | Defaults to 10
          example: '2'
          schema:
            type: number
        - name: page
          in: query
          description: Page number | Defaults to 1
          example: '1'
          schema:
            type: number
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
    post:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      item_id:
                        type: number
                      custom_attribute_id:
                        nullable: true
                      threshold_method:
                        type: string
                      threshold_value:
                        type: number
                      threshold_interval:
                        nullable: true
                      is_fired:
                        nullable: true
                      type:
                        type: string
                      is_deleted:
                        type: boolean
                      recipient_groups:
                        type: array
                        items:
                          type: string
              example:
                data:
                  item_id: 55
                  custom_attribute_id: null
                  threshold_method: quantity_less_than
                  threshold_value: 5
                  threshold_interval: null
                  is_fired: null
                  type: Quantity
                  is_deleted: false
                  recipient_groups:
                    - owners
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Create an Alert
      operationId: Create an Alert
      description: ''
      tags:
        - Alerts
      parameters:
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              threshold_method: quantity_less_than
              threshold_value: 5
              threshold_interval: 0
              is_fired: true
              triggerable_type: Node
              triggerable_id: 356
              type: Quantity
              is_deleted: false
              recipient_groups:
                - owners
            schema:
              $ref: '#/components/schemas/Alert'
  /api/v1/alerts/{alert_id}:
    put:
      responses:
        '200':
          description: OK
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: number
                      threshold_method:
                        type: string
                      threshold_value:
                        type: number
                      threshold_interval:
                        type: string
                      is_fired:
                        nullable: true
                      triggerable_type:
                        type: string
                      triggerable_id:
                        type: number
                      type:
                        type: string
                      is_deleted:
                        type: boolean
                      recipient_groups:
                        type: array
                        items:
                          type: string
              example:
                data:
                  id: 1234
                  threshold_method: before
                  threshold_value: 5
                  threshold_interval: days
                  is_fired: null
                  triggerable_type: CustomAttributeValue
                  triggerable_id: 374
                  type: DateReminder
                  is_deleted: false
                  recipient_groups:
                    - owners
        '400':
          description: Bad Request
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers:
            Sortly-Rate-Limit-Max:
              schema:
                type: string
            Sortly-Rate-Limit-Remaining:
              schema:
                type: string
            Sortly-Rate-Limit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
      summary: Update an Alert
      operationId: Update an Alert
      description: ''
      tags:
        - Alerts
      parameters:
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
      requestBody:
        content:
          application/json:
            example:
              item_id: 55
              custom_attribute_id: 22
              threshold_method: before
              threshold_value: 5
              threshold_interval: days
              is_fired: null
              type: DateReminder
              is_deleted: false
              recipient_groups:
                - owners
            schema:
              $ref: '#/components/schemas/Alert'
    delete:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example: {}
        '400':
          description: Bad Request
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Bad Request
        '401':
          description: Unauthorized
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Authorized
        '404':
          description: Not Found
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Not Found
      summary: Delete Alert
      operationId: Delete Alert
      description: ''
      tags:
        - Alerts
      parameters:
        - name: alert_id
          in: path
          description: an alert `ID` attribute
          required: true
          example: '3'
          schema:
            type: string
        - name: Accept
          in: header
          description: e.g. application/json
          required: false
          schema:
            type: string
          example: application/json
        - name: Authorization
          in: header
          description: e.g. Bearer <Enter Secret Key Here>
          required: false
          schema:
            type: string
          example: Bearer <Enter Secret Key Here>
components:
  schemas:
    Item:
      type: object
      required:
        - name
        - type
      properties:
        id:
          type: number
          description: ID of the instance
        name:
          type: string
          description: Name of item
        price:
          type: number
          description: Price of an item
        quantity:
          type: number
          description: Quantity of an item
        min_quantity:
          type: number
          description: Minimal quantity of an item
        notes:
          type: string
          description: Item notes
        parent_id:
          type: string
          description: ID of parent folder
        type:
          type: string
          description: Type of item ( folder | item )
        sid:
          type: string
          description: Sortly system ID of the item
        label_url:
          type: string
          description: QR url OR barcode value
        label_url_type:
          type: string
          description: |-
            QR OR barcode type.

            Allowed values:
            [
                org.gs1.UPC-E,
                org.iso.Code39,
                org.iso.Code39Mod43,
                org.gs1.EAN-13,
                org.gs1.EAN-8,
                com.intermec.Code93,
                org.iso.Code128,
                org.iso.PDF417,
                org.iso.Aztec,
                org.iso.QRCode,
                org.ansi.Interleaved2of5,
                org.iso.DataMatrix,
                com.sortly.textEntry
            ]
        label_url_extra:
          type: string
          description: QR url OR barcode value
        label_url_extra_type:
          type: string
          description: |-
            QR OR barcode type.

            Allowed values:
            [
                org.gs1.UPC-E,
                org.iso.Code39,
                org.iso.Code39Mod43,
                org.gs1.EAN-13,
                org.gs1.EAN-8,
                com.intermec.Code93,
                org.iso.Code128,
                org.iso.PDF417,
                org.iso.Aztec,
                org.iso.QRCode,
                org.ansi.Interleaved2of5,
                org.iso.DataMatrix,
                com.sortly.textEntry
            ]
        tags:
          type: array
          items: {}
          description: List of Item tags' names
        custom_attribute_values:
          type: array
          items: {}
          description: List of Custom Fields
        photo_ids:
          type: array
          items: {}
          description: List of photo ids
        photos:
          type: array
          items: {}
          description: 'Could be one of:'
        measured_quantity:
          $ref: '#/components/schemas/MeasuredQuantity'
        option_value_ids:
          type: array
          items: {}
          description: >-
            ID of option of attribute in Item Variant Group for Item. Required
            if populated *item_group_id*. See [Item
            Groups](reference/0/item-variants-groups)
        item_group_id:
          type: string
          description: >-
            ID Item Variant Group for Item. Required if populated
            *option_value_ids*. See [Item
            Groups](reference/0/item-variants-groups)
    ItemGroup:
      type: object
      required:
        - name
        - group_attributes
      properties:
        id:
          type: number
          description: ID of the instance
        name:
          type: string
          description: Name of item variant group
        sid:
          type: string
          description: Sortly system ID of the item variant group
        photo_ids:
          type: array
          items: {}
          description: List of photo ids
        photos:
          type: array
          items: {}
          description: 'Could be one of:'
        label_url:
          type: string
          description: QR url OR barcode value
        label_url_type:
          type: string
          description: |-
            QR OR barcode type.

            Allowed values:
            [
                org.gs1.UPC-E,
                org.iso.Code39,
                org.iso.Code39Mod43,
                org.gs1.EAN-13,
                org.gs1.EAN-8,
                com.intermec.Code93,
                org.iso.Code128,
                org.iso.PDF417,
                org.iso.Aztec,
                org.iso.QRCode,
                org.ansi.Interleaved2of5,
                org.iso.DataMatrix,
                com.sortly.textEntry
            ]
        label_url_extra:
          type: string
          description: QR url OR barcode value
        label_url_extra_type:
          type: string
          description: |-
            QR OR barcode type.

            Allowed values:
            [
                org.gs1.UPC-E,
                org.iso.Code39,
                org.iso.Code39Mod43,
                org.gs1.EAN-13,
                org.gs1.EAN-8,
                com.intermec.Code93,
                org.iso.Code128,
                org.iso.PDF417,
                org.iso.Aztec,
                org.iso.QRCode,
                org.ansi.Interleaved2of5,
                org.iso.DataMatrix,
                com.sortly.textEntry
            ]
        group_attributes:
          type: array
          items: {}
    GroupAttributeObject:
      type: object
      required:
        - name
        - order
        - options
      properties:
        id:
          type: string
          description: ID of object
        name:
          type: string
          description: Name of attribute
        order:
          type: number
          description: Order of attribute to show
        options:
          type: array
          items: {}
    OptionObject:
      type: object
      required:
        - name
        - order
      properties:
        id:
          type: string
          description: ID of object
        name:
          type: string
          description: Name of option
        order:
          type: number
          description: Order of option to show
    MeasuredQuantity:
      type: object
      properties:
        value:
          type: number
          description: Value of items measure
        type:
          type: string
          description: |-
            Type of units of measure.

            Allowed values:
            [
                weight
                length
                volume
                count
            ]
        name:
          type: string
          description: |-
            Name of units of measure.

            Allowed values for:

            - *weight*: [lbs g kg oz];

            - *length*: [yd cm ft in m];

            - *volume*: [gal ml l ft3 in3 ft2 in2];

            - *count*: [units].
        scale:
          type: number
          description: Scale of value (up to 4)
    Tag:
      type: object
      properties:
        name:
          type: string
          description: Name of tag
    CustomFieldValue:
      type: object
      properties:
        value:
          type: string
          description: Value of Custom Field.
        attribute_value:
          type: string
          description: the same as `value` attribute
        custom_attribute_id:
          type: string
          description: Custom Field ID
        scanner_code_type:
          type: string
          description: >-
            QR OR barcode type. Is required only for custom fields with scanner
            type.


            Allowed values:

            [
                org.gs1.UPC-E,
                org.iso.Code39,
                org.iso.Code39Mod43,
                org.gs1.EAN-13,
                org.gs1.EAN-8,
                com.intermec.Code93,
                org.iso.Code128,
                org.iso.PDF417,
                org.iso.Aztec,
                org.iso.QRCode,
                org.ansi.Interleaved2of5,
                org.iso.DataMatrix
            ]
    Alert:
      type: object
      properties:
        id:
          type: number
          description: ID of the instance
        type:
          type: string
          description: could be 'Quantity' or 'DateReminder'
        threshold_method:
          type: string
          description: |-
            Allowed values for Quantity type:
            [
                'less_than_or_equal_to_min_quantity',
                'quantity_greater_than',
                'quantity_less_than',
                'quantity_less_than_equal_to',
                'quantity_greater_than_equal_to'
            ];
            Allowed values for DateReminder type:
            [
                'before',
                'after',
                'same_day'
            ]
        threshold_value:
          type: number
        threshold_interval:
          type: string
          description: >-
            should be specified for DateReminder alerts. Could be one of
            ["days", "weeks", "months", "years"]
        recipient_groups:
          type: array
          items: {}
          description: >-
            describes the group which will be notified when alert triggers. If
            not specified 'owners' is added by default.


            Allowed values:

            [
                'owners',
                'admins',
                'members
            ]
        triggerable_type:
          type: string
          description: >-
            specifies a resource it should applied to. Could be either 'Node'
            for 'Quantity' type or 'CustomAttributeValue' for 'DateReminder'
            type. The CustomField should be of datetime field.
        triggerable_id:
          type: number
          description: specifies the ID of the resource either Item or CustomField
        is_deleted:
          type: boolean
          description: specifies whether the alert is deleted or not.
        is_fired:
          type: boolean
          description: >-
            specifies if the notification was sent to the recipient group or
            not.
tags: []
