openapi: 3.0.3
info:
  title: Inventory Manager
  version: 0.0.0
paths:
  /inventory/adjustment-reasons:
    get:
      description: >-
        Lists the reasons for inventory adjustments.


        **Related methods:**


        - [Create adjustment

        reason](/newstore-cloud/inventory/inventory_manager_api_api.html#operation/createAdjustmentReason)
      operationId: listAdjustmentReasons
      parameters:
        - description: Can display all adjustment reasons, including inactive ones.
          in: query
          name: should_include_inactive
          required: false
          schema:
            default: false
            description: Can display all adjustment reasons, including inactive ones.
            title: Should Include Inactive
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAdjustmentReasonsResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Adjustment Reasons
      tags:
        - Adjusting
  /v0/i/configuration:
    get:
      description: Retrieves the complete inventory configuration for the retailer.
      operationId: get_configuration_v0_i_configuration_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryManagerConfiguration'
          description: Successful Response
      summary: Get Configuration
      tags:
        - Configuration
    patch:
      description: Update the inventory configuration set up for the retailer.
      operationId: patch_configuration_v0_i_configuration_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InventoryManagerConfiguration'
        required: true
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Patch Configuration
      tags:
        - Configuration
    put:
      description: Replace the inventory configuration set up for the retailer.
      operationId: put_configuration_v0_i_configuration_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InventoryManagerConfiguration'
        required: true
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Put Configuration
      tags:
        - Configuration
  /v0/i/inventory/adjustment_reasons:
    post:
      description: >-
        Creates an adjustment reason, which can be used across all stores
        configured for your business.


        Use the `type` and `subtype` properties to define the adjustment type
        and reason for users to select on NewStore

        Associate App, when adjusting inventory in the store.


        Note: you need to pass at least one of: `origin_stock_location`,
        `destination_stock_location` and they need to

        be created beforehand.


        Related methods:

        - [List adjustment
        reasons](#tag/Adjusting/operation/listAdjustmentReasons)
      operationId: createAdjustmentReason
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAdjustmentReasonBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Adjustment Reason
      tags:
        - Adjusting
  /v0/i/inventory/adjustment_reasons/{reason_id}:
    patch:
      description: >-
        Use this method to update
        [adjustment](/docs/glossary.html#term-adjustment) reasons in your
        business.


        When you create adjustment reasons for your business, they are activated
        by default. However, if you do not want associates to

        use a specific adjustment reason to adjust inventory in the store using
        NewStore Associate App, deactivate it using this method.


        **Note**: Deactivating an adjustment reason does not delete it from the
        platform.


        If associates have used the adjustment reason before you deactivated it,
        the reason will still be displayed in the list of inventory

        adjustments or transactions that are associated with it.
      operationId: handle_v0_i_inventory_adjustment_reasons__reason_id__patch
      parameters:
        - description: Unique identifier of the adjustment reason
          in: path
          name: reason_id
          required: true
          schema:
            description: Unique identifier of the adjustment reason
            format: uuid
            title: Reason Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdjustmentReasonChanges'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Adjustment Reason
      tags:
        - Adjusting
  /v0/i/inventory/asns:
    get:
      description: List ASNs.
      operationId: listAsns
      parameters:
        - description: Page offset
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: Page offset
            title: Offset
            type: integer
        - description: Page length
          in: query
          name: count
          required: false
          schema:
            default: 10
            description: Page length
            title: Count
            type: integer
        - description: Search terms
          in: query
          name: search
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search terms
            title: Search
        - description: Earliest shipping date limit
          in: query
          name: start_shipment_date
          required: false
          schema:
            anyOf:
              - format: date
                type: string
              - type: 'null'
            description: Earliest shipping date limit
            title: Start Shipment Date
        - description: Latest shipping date limit
          in: query
          name: end_shipment_date
          required: false
          schema:
            anyOf:
              - format: date
                type: string
              - type: 'null'
            description: Latest shipping date limit
            title: End Shipment Date
        - description: ASN statuses
          in: query
          name: status
          required: false
          schema:
            description: ASN statuses
            items:
              $ref: '#/components/schemas/AsnStatus'
            title: Status
            type: array
        - description: ASN origin location identifiers
          in: query
          name: origin_id
          required: false
          schema:
            description: ASN origin location identifiers
            items:
              type: string
            title: Origin Id
            type: array
        - description: ASN destination location identifiers
          in: query
          name: destination_id
          required: false
          schema:
            description: ASN destination location identifiers
            items:
              type: string
            title: Destination Id
            type: array
        - description: Sort the resulting list.
          in: query
          name: sort
          required: false
          schema:
            anyOf:
              - pattern: ^-?(created_at|updated_at)$
                type: string
              - type: 'null'
            description: Sort the resulting list.
            title: Sort
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List ASNs
      tags:
        - Receiving
    post:
      description: >-
        Creates an ASN against which items can be received into the store's
        stock on hand.
      operationId: createAsn
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAsnRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: ASN successfully created.
          headers:
            Location:
              description: The identifier of the created ASN.
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAsnError'
          description: Location or product cannot be found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAsnError'
          description: The provided shipment reference is not unique.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create ASN
      tags:
        - Receiving
  /v0/i/inventory/asns/{asn_id}:
    get:
      description: >-
        Note that received items that are the same (because they were repeated
        on ASN creation) will get

        merged when. This means that their expected and received quantities get
        summed up when getting the ASN. Being the same

        means having the same product id. and carton id.; if the same product
        exists in multiple cartons or if it exists in a

        carton and without a carton, it won't be merged (unless it had a carton
        but it was received without a carton).
      operationId: getAsn
      parameters:
        - description: |2-

                    The unique identifier of the ASN. Use the
                    [List ASNs](/newstore-cloud/inventory/inventory_manager_api_api.html#operation/listASNs)
                    method to retrieve the ID.
                    
          in: path
          name: asn_id
          required: true
          schema:
            description: |2-

                      The unique identifier of the ASN. Use the
                      [List ASNs](/newstore-cloud/inventory/inventory_manager_api_api.html#operation/listASNs)
                      method to retrieve the ID.
                      
            format: uuid
            title: Asn Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsnResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get ASN
      tags:
        - Receiving
  /v0/i/inventory/stores/{fulfillment_node_id}/stock_locations/{stock_location}/stock_import:
    post:
      description: >-
        Imports stock quantities for products in the specified stock location,
        in the specified

        store configured for your business. The uploaded file is processed
        asynchronously.


        **Important:** Use this method to start importing stock quantities only
        when NewStore is inventory master in the store.


        To import stock quantities, upload a CSV file with the quantities to
        import for products in this stock location. See

        [this example CSV
        file](https://pub-b97923717dc242e893f329de9e610502.r2.dev/import_stock_example.csv)
        for reference.
      operationId: importStock
      parameters:
        - description: Fulfillment node of the import
          in: path
          name: fulfillment_node_id
          required: true
          schema:
            description: Fulfillment node of the import
            title: Fulfillment Node Id
            type: string
        - description: |2-

                The name of the stock location. To retrieve the name of the stock location,
                use the [List stock locations](/newstore-cloud/inventory/stock_locations.html#operation/listStockLocations) method.
                
          in: path
          name: stock_location
          required: true
          schema:
            description: |2-

                  The name of the stock location. To retrieve the name of the stock location,
                  use the [List stock locations](/newstore-cloud/inventory/stock_locations.html#operation/listStockLocations) method.
                  
            title: Stock Location
            type: string
      requestBody:
        content:
          multipart/form-data:
            encoding:
              file:
                contentType: text/csv
            schema:
              properties:
                count_type:
                  description: An enumeration.
                  enum:
                    - cycle_count
                    - full_count
                  type: string
                external_id:
                  description: A name to distinguish the import from the other ones.
                  type: string
                file:
                  description: >-
                    The CSV file containing the stock quantities that you want
                    to import.
                  format: binary
                  type: string
              required:
                - file
                - count_type
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: Transfer Order successfully created.
          headers:
            Location:
              description: The identifier of the created stock import job.
              schema:
                type: string
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Import stock quantities
      tags:
        - counting
  /v0/i/inventory/stores/{store_id}/count_tasks:
    post:
      description: |-
        Creates a count task for the specified store.

        If you use NewStore as [inventory
        master](/docs/glossary.html#term-inventory-master) for your business,
        use this method to create a count task to count the items in a specific
        [stock location](/docs/glossary.html#term-stock-location).

        For more information on:
         - Using NewStore as inventory master in the store, see
           [Enabling a location as inventory master](/newstore-cloud/order_management/location.html#operation/enable-location-as-inventory-master).
         - Managing stock locations in your business, see [Stock locations](/newstore-cloud/inventory/stock_locations.html).
      operationId: handle_v0_i_inventory_stores__store_id__count_tasks_post
      parameters:
        - description: >-
            The store identifier. Use the [List stores
            method](/newstore-cloud/store_operations/store.html#operation/listStores)
            to get the ID.
          in: path
          name: store_id
          required: true
          schema:
            description: >-
              The store identifier. Use the [List stores
              method](/newstore-cloud/store_operations/store.html#operation/listStores)
              to get the ID.
            title: Store Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCountTaskRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: Count task successfully created.
          headers:
            Location:
              description: The identifier of the created count task.
              schema:
                type: string
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCountTaskError'
          description: Store or stock location cannot be found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCountTaskError'
          description: A count task with the provided external identifier already exists.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Count Task
      tags:
        - counting
  /v0/i/inventory/transfer_orders:
    post:
      description: >-
        Creates a transfer order that contains a list of items to be transferred
        from one store to another.


        If you use NewStore as [inventory
        master](https://docs.newstore.net/docs/glossary.html#term-inventory-master)
        for
         your business, use this method to create a transfer order to transfer items from a specific stock location to the
         `main` or default [stock location](https://docs.newstore.net/docs/glossary.html#term-stock-location) of another
         store or DC.

        For more information on:

        - Using NewStore as inventory master in the store, see Enabling a
        location as [inventory
        master](https://docs.newstore.net/newstore-cloud/order_management/location.html#operation/list-locations).

        - Managing stock locations in your business, see [Stock
        locations](https://docs.newstore.net/newstore-cloud/inventory/stock_locations.html).
      operationId: handle_v0_i_inventory_transfer_orders_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_handle_v0_i_inventory_transfer_orders_post
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '201':
          description: Transfer order successfully created.
          headers:
            Location:
              description: The identifier of the created transfer order.
              schema:
                type: string
        '400':
          description: >-
            The origin or destination location does not exist or products do not
            exist.
        '409':
          description: The order with external identifier `external_ref` already exists.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Transfer Order
      tags:
        - transferring
  /v0/i/inventory/transfer_orders/{transfer_order_id}/transfer_transactions:
    post:
      description: Create and start a transfer.
      operationId: createAndStartTransferTransaction
      parameters:
        - description: >-
            The identifier of the open transfer order to create a transaction
            in.
          in: path
          name: transfer_order_id
          required: true
          schema:
            description: >-
              The identifier of the open transfer order to create a transaction
              in.
            format: uuid
            title: Transfer Order Id
            type: string
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: The transaction was successfully created.
          headers:
            Location:
              description: The identifier of the created transaction.
              schema:
                type: string
        '404':
          description: The transfer order does not exist.
        '409':
          description: The transfer order is already closed.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Transfer
      tags:
        - transferring
  /v0/i/inventory/transfer_shipping_config:
    get:
      description: |-
        Retrieves the transfer shipping configuration set up for your business.
        The response includes the transfer shipping configuration with a list of
        shipping routes and the service levels configured for each route.
      operationId: getTransferShippingConfig
      responses:
        '200':
          content:
            application/json:
              example:
                transfer_shipping_configuration:
                  - from_location_id: ST01
                    id: aea51f83-97ef-4334-acd3-4314a6e6a2c2
                    service_level_ids:
                      - GROUND
                      - IN_STORE_PICKUP_US01
                      - 2_DAY
                      - SAME_DAY_DELIVERY
                    to_location_ids:
                      - ST02
                      - ST03
                      - ST04
                      - ST05
                      - ST06
                  - from_location_id: ST02
                    id: b09c2af7-dc71-42a2-bcc8-db454615edce
                    service_level_ids:
                      - GROUND
                      - IN_STORE_PICKUP_US01
                      - 2_DAY
                      - SAME_DAY_DELIVERY
                    to_location_ids:
                      - '*'
              schema: {}
          description: Successful response.
      summary: Get Transfer Shipping Configuration
      tags:
        - transferring
    post:
      description: >-
        Creates or updates a transfer shipping configuration, used for shipping

        transfer orders. A transfer order is used to send inventory from a store
        to another

        location (DC or store).

        When you update the configuration using this method, the response body

        contains the revision of the configuration.


        The values of the `from_location_id` and `to_location_ids` properties in

        the schema are set during the first [stock
        import](/newstore-cloud/catalog/import-api.html#operation/stock).


        The transfer configuration is related to the [fulfillment
        configuration](#fulfillment-configuration). The

        service levels (`service_level_ids`) you use in the transfer
        configuration:

        - Must be present in your fulfillment configuration.

        - Have the **same** service level priority as in the fulfillment

        configuration.


        For a complete example, see


        [Tutorial: Setting up a transfer

        configuration](/docs/development/tutorials/transfer-config.html).
      operationId: postTransferShippingConfig
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTransferShippingConfigurationBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                transfer_shipping_configuration:
                  - from_location_id: ST01
                    id: aea51f83-97ef-4334-acd3-4314a6e6a2c2
                    service_level_ids:
                      - GROUND
                      - IN_STORE_PICKUP_US01
                      - 2_DAY
                      - SAME_DAY_DELIVERY
                    to_location_ids:
                      - ST02
                      - ST03
                      - ST04
                      - ST05
                      - ST06
                  - from_location_id: ST02
                    id: b09c2af7-dc71-42a2-bcc8-db454615edce
                    service_level_ids:
                      - GROUND
                      - IN_STORE_PICKUP_US01
                      - 2_DAY
                      - SAME_DAY_DELIVERY
                    to_location_ids:
                      - '*'
              schema: {}
          description: The transfer shipping configuration was updated successfully.
        '400':
          content:
            application/json:
              example:
                error_code: invalid_data
                message: 'missing fields: [''transfer_shipping_configuration'']'
          description: An internal error occurred.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create or Update Transfer Shipping Configuration
      tags:
        - transferring
  /v0/i/inventory/transfer_transactions/{transfer_id}:
    get:
      description: Get the details of a Transfer.
      operationId: getTransferTransaction
      parameters:
        - description: Transfer Transaction identifier.
          in: path
          name: transfer_id
          required: true
          schema:
            description: Transfer Transaction identifier.
            format: uuid
            title: Transfer Id
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                result:
                  associate:
                    first_name: Josh
                    id: some_user_id
                    last_name: Doe
                  id: d2940ca1-ee14-438a-9e43-4868d843bda2
                  line_items:
                    - ordered_quantity: 1
                      picked_quantity: 0
                      product:
                        external_identifiers: {}
                        images:
                          - is_main: true
                            url: ''
                        product_id: prod123
                        title: product title
                        variation_color_value: some color
                        variation_size_value: some size
                      product_id: prod123
                      quantity: 0
                      remaining_quantity: 1
                  shipment_requested: true
                  status: printing
                  transfer_order:
                    external_ref: order_external_ref
                    from_location_id: from_id
                    id: 53822228-3f8d-4b6b-949c-83efe2efed56
                    origin_stock_location: main
                    to_location_id: to_id
              schema: {}
          description: The transfer was successfully returned.
        '404':
          description: The transfer does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Transfer
      tags:
        - transferring
  /v1/inventory/adjustments:
    post:
      description: Creates an adjustment
      operationId: createAdjustment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAdjustmentBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Adjustment
      tags:
        - Adjusting
  /v1/inventory/receiving/asns/{asn_id}/actions:
    post:
      description: Executes actions on an ASN.
      operationId: createAsnAction
      parameters:
        - description: The ASN identifier
          in: path
          name: asn_id
          required: true
          schema:
            description: The ASN identifier
            format: uuid
            title: Asn Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Action'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Execute ASN action
      tags:
        - Receiving
components:
  schemas:
    ListAdjustmentReasonsResponse:
      properties:
        reasons:
          items:
            $ref: '#/components/schemas/AdjustmentReason'
          title: Reasons
          type: array
      required:
        - reasons
      title: ListAdjustmentReasonsResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    InventoryManagerConfiguration:
      example:
        allow_asn_overreceiving: false
        create_cycle_count_after_mispack: false
        create_cycle_count_after_mispick: false
        full_count_products_counted_before_trading: false
      properties:
        allow_asn_overreceiving:
          default: true
          description: >-
            If it is true, allow to receive more items than specified in ASN.
            Default is true.
          title: Allow Asn Overreceiving
          type: boolean
        create_cycle_count_after_mispack:
          default: false
          description: >-
            If it is true, create cycle count transaction after mispacked
            fulfillment logistic order.
          title: Create Cycle Count After Mispack
          type: boolean
        create_cycle_count_after_mispick:
          default: false
          description: >-
            If it is true, create cycle count transaction after mispicked
            fulfillment logistic order.
          title: Create Cycle Count After Mispick
          type: boolean
        full_count_products_counted_before_trading:
          default: false
          description: >-
            If it is true, this means the store is counting the inventory first
            and then allowing trade before submission.

            if false, this means the store counts the products after the
            customers leave.

            NewStore advises against trading during a full count. However, if a
            retailer chooses to continue selling during the count, this
            configuration ensures the platform will compare the counted
            quantities with either the initial expected on-hand or the updated
            expected on-hand.
          title: Full Count Products Counted Before Trading
          type: boolean
      title: InventoryManagerConfiguration
      type: object
    CreateAdjustmentReasonBody:
      properties:
        destination_stock_location:
          anyOf:
            - type: string
            - type: 'null'
          title: Destination Stock Location
        origin_stock_location:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin Stock Location
        subtype:
          title: Subtype
          type: string
        type:
          title: Type
          type: string
      required:
        - type
        - subtype
      title: CreateAdjustmentReasonBody
      type: object
    AdjustmentReasonChanges:
      properties:
        is_activated:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Activated
        subtype:
          anyOf:
            - type: string
            - type: 'null'
          title: Subtype
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
      title: AdjustmentReasonChanges
      type: object
    AsnStatus:
      enum:
        - open
        - partially_completed
        - closed
      title: AsnStatus
      type: string
    CreateAsnRequest:
      example:
        from_location: testlocation
        fulfillment_node_id: 7809c25e-630c-42d1-aa5d-f61388b97d74
        items:
          - carton_id: c51d3c1e-8286-4df3-803b-c69394811d77
            product_id: 7809c25e-630c-42d1-aa5d-f61388b97d74
            quantity: 10
          - carton_id: c51d3c1e-8286-4df3-803b-c69394811d77
            product_id: d7c3ed5b-0ca8-4669-9f7b-1f5b60ad8be1
            quantity: 15
        references:
          po_number: some-po-ref
          shipment_ref: some-shipment-ref
        shipment_date: '2019-03-25T22:00:00Z'
      properties:
        from_location:
          description: The identifier of the location ASN was shipped from.
          title: From Location
          type: string
        fulfillment_node_id:
          description: The identifier of the fulfillment_node ASN was created for.
          title: Fulfillment Node Id
          type: string
        items:
          description: >-
            The expected line items to receive. The number of products (SKU) in
            a carton is recommended not to exceed 6000 SKUs.
          items:
            $ref: '#/components/schemas/NewAsnLineItem'
          minItems: 1
          title: Items
          type: array
        references:
          $ref: '#/components/schemas/AsnReferences-Input'
          description: >-
            Represents the ASN reference that specifies the inventory line items
            being received.
        shipment_date:
          description: The shipping date for the ASN in ISO 8601 format.
          format: date-time
          title: Shipment Date
          type: string
      required:
        - fulfillment_node_id
        - from_location
        - references
        - shipment_date
        - items
      title: CreateAsnRequest
      type: object
    CreateAsnError:
      properties:
        detail:
          title: Detail
          type: string
        error_code:
          title: Error Code
          type: string
      required:
        - error_code
        - detail
      title: CreateAsnError
      type: object
    AsnResponse:
      properties:
        completion_date:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Completion Date
        force_closed_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Force Closed By
        from_location:
          description: The identifier of the location ASN was shipped from.
          title: From Location
          type: string
        fulfillment_node_id:
          description: The identifier of the fulfillment_node ASN was created for.
          title: Fulfillment Node Id
          type: string
        id:
          description: Unique identifier of the ASN in the platform.
          title: Id
          type: string
        item_total:
          title: Item Total
          type: integer
        line_items:
          items:
            $ref: '#/components/schemas/AsnResponseLineItem'
          title: Line Items
          type: array
        received_item_total:
          title: Received Item Total
          type: integer
        received_product_total:
          title: Received Product Total
          type: integer
        references:
          $ref: '#/components/schemas/AsnReferences-Output'
          description: >-
            Represents the ASN reference that specifies the inventory line items
            being received.
        revision:
          title: Revision
          type: integer
        shipment_date:
          description: The shipping date for the ASN in ISO 8601 format.
          format: date-time
          title: Shipment Date
          type: string
        status:
          $ref: '#/components/schemas/AsnStatus'
          description: Current state of the ASN.
        to_location_label:
          anyOf:
            - type: string
            - type: 'null'
          title: To Location Label
        updated_at:
          description: Last time entity was changed in the system.
          format: date-time
          title: Updated At
          type: string
      required:
        - id
        - status
        - revision
        - updated_at
        - fulfillment_node_id
        - from_location
        - references
        - shipment_date
        - line_items
        - to_location_label
        - item_total
        - received_item_total
        - received_product_total
        - completion_date
        - force_closed_by
      title: AsnResponse
      type: object
    CreateCountTaskRequest:
      example:
        due_date: '2022-10-10'
        external_id: cycle-count-x
        product_ids:
          - product-1
          - product-2
          - product-3
        stock_location: main
      properties:
        count_type:
          anyOf:
            - type: string
            - type: 'null'
          default: cycle_count
          description: 'cycle_count or full_count, default value '
          title: Count Type
        due_date:
          description: The date the count transaction is scheduled for in ISO 8601 format.
          format: date
          title: Due Date
          type: string
        external_id:
          description: Unique external identifier for the count task.
          title: External Id
          type: string
        product_ids:
          anyOf:
            - items:
                minLength: 1
                type: string
              minItems: 1
              type: array
            - type: 'null'
          description: The array of product identifiers to be counted.
          title: Product Ids
        stock_location:
          anyOf:
            - type: string
            - type: 'null'
          description: |2-

                    The stock location name in which the cycle count should be done.
                    If no value is provided, or NewStore is not the inventory master for
                    your business, the cycle count task is created for the default stock
                    location in the store.
          title: Stock Location
      required:
        - external_id
        - due_date
      title: CreateCountTaskRequest
      type: object
    CreateCountTaskError:
      properties:
        detail:
          title: Detail
          type: string
        error_code:
          title: Error Code
          type: string
      required:
        - error_code
        - detail
      title: CreateCountTaskError
      type: object
    Body_handle_v0_i_inventory_transfer_orders_post:
      properties:
        due_date:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Represents the date when the transfer order is due.
          title: Due Date
        external_ref:
          description: >-
            Represents the external reference by which external system can refer
            to this item.
          title: External Ref
          type: string
        from_location_id:
          description: >-
            The fulfillment node identifier of the location from where the
            transfer order is sent.
          title: From Location Id
          type: string
        from_stock_location:
          anyOf:
            - type: string
            - type: 'null'
          description: The stock location from which the items are being transferred.
          title: From Stock Location
        items:
          description: Ordered product identifier with its quantity.
          items:
            $ref: '#/components/schemas/TransferOrderLineItem'
          minItems: 1
          title: Items
          type: array
        order_date:
          description: Represents the date when the transfer order was created.
          format: date-time
          title: Order Date
          type: string
        to_location_id:
          description: >-
            The fulfillment node identifier of the location to where the
            transfer order is sent.
          title: To Location Id
          type: string
      required:
        - from_location_id
        - to_location_id
        - items
        - external_ref
        - order_date
      title: Body_handle_v0_i_inventory_transfer_orders_post
      type: object
    CreateTransferShippingConfigurationBody:
      properties:
        transfer_shipping_configuration:
          items:
            $ref: '#/components/schemas/CreateTransferShippingConfiguration'
          title: Transfer Shipping Configuration
          type: array
      required:
        - transfer_shipping_configuration
      title: CreateTransferShippingConfigurationBody
      type: object
    CreateAdjustmentBody:
      properties:
        external_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: External Ref
        line_items:
          items:
            $ref: '#/components/schemas/AdjustmentItemBody'
          title: Line Items
          type: array
        location_id:
          title: Location Id
          type: string
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        reason_id:
          format: uuid
          title: Reason Id
          type: string
      required:
        - location_id
        - reason_id
        - line_items
      title: CreateAdjustmentBody
      type: object
    Action:
      properties:
        type:
          $ref: '#/components/schemas/Type'
      required:
        - type
      title: Action
      type: object
    AdjustmentReason:
      properties:
        destination:
          anyOf:
            - type: string
            - type: 'null'
          title: Destination
        id:
          format: uuid
          title: Id
          type: string
        is_activated:
          anyOf:
            - type: boolean
            - type: 'null'
          default: true
          title: Is Activated
        origin:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin
        subtype:
          anyOf:
            - type: string
            - type: 'null'
          title: Subtype
        type:
          title: Type
          type: string
      required:
        - id
        - type
      title: AdjustmentReason
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    NewAsnLineItem:
      properties:
        carton_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Used to group items by carton.
          title: Carton Id
        expected_quantity:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          description: Amount of items expected. Use this instead of "quantity" field.
          title: Expected Quantity
        product_id:
          description: >-
            Product identifier in NewStore's catalog. Product has to exist
            before being used in ASNs.
          minLength: 1
          title: Product Id
          type: string
        quantity:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          deprecated: true
          title: Quantity
      required:
        - product_id
      title: NewAsnLineItem
      type: object
    AsnReferences-Input:
      properties:
        po_number:
          anyOf:
            - maxLength: 256
              type: string
            - type: 'null'
          description: >-
            Optional identifier or the Purchase Order. Used for display purposes
            only.
          title: Po Number
        shipment_ref:
          anyOf:
            - maxLength: 256
              pattern: \S+
              type: string
            - type: 'null'
          description: Unique shipment reference of this ASN.
          title: Shipment Ref
      title: AsnReferences
      type: object
    AsnResponseLineItem:
      properties:
        carton_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Unique ID that represents a carton to be received.
          title: Carton Id
        expected_quantity:
          anyOf:
            - type: integer
            - type: 'null'
          description: Amount of items expected. Use this instead of "quantity" field.
          title: Expected Quantity
        product:
          additionalProperties: true
          description: Full product information, as returned by catalog
          title: Product
          type: object
        product_id:
          description: >-
            Product identifier in NewStore's catalog. Product has to exist
            before being used in ASNs.
          title: Product Id
          type: string
        quantity:
          anyOf:
            - type: integer
            - type: 'null'
          deprecated: true
          title: Quantity
        received_quantity:
          description: Quantity already received.
          title: Received Quantity
          type: integer
      required:
        - product_id
        - product
        - received_quantity
      title: AsnResponseLineItem
      type: object
    AsnReferences-Output:
      properties:
        po_number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Optional identifier or the Purchase Order. Used for display purposes
            only.
          title: Po Number
        shipment_ref:
          anyOf:
            - type: string
            - type: 'null'
          description: Unique shipment reference of this ASN.
          title: Shipment Ref
      required:
        - shipment_ref
      title: AsnReferences
      type: object
    TransferOrderLineItem:
      properties:
        ordered_quantity:
          description: The number of items ordered for the product SKU.
          minimum: 1
          title: Ordered Quantity
          type: integer
        product_id:
          description: >-
            The unique identifier for the product. This ID is created in
            NewStore when the product is imported into NewStore.
          title: Product Id
          type: string
      required:
        - product_id
        - ordered_quantity
      title: TransferOrderLineItem
      type: object
    CreateTransferShippingConfiguration:
      properties:
        from_location_id:
          title: From Location Id
          type: string
        service_level_ids:
          items:
            type: string
          title: Service Level Ids
          type: array
        to_location_ids:
          items:
            type: string
          title: To Location Ids
          type: array
      required:
        - from_location_id
        - to_location_ids
        - service_level_ids
      title: CreateTransferShippingConfiguration
      type: object
    AdjustmentItemBody:
      properties:
        product_id:
          title: Product Id
          type: string
        quantity:
          title: Quantity
          type: integer
      required:
        - product_id
        - quantity
      title: AdjustmentItemBody
      type: object
    Type:
      enum:
        - CLOSE
      title: Type
      type: string
security: []
