/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/inventory/adjustments/absolute": { readonly parameters: { readonly query?: never; readonly header: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Absolute Adjustment * @description Override the existing inventory levels for an inventory item at a location. Use absolute adjustments as the default method for updating inventory. This endpoint batches requests, making them more resource friendly than the [Catalog API](/docs/rest-catalog/products#update-products-batch). Absolute adjustments have lower complexity than [relative adjustments](/docs/rest-management/inventory/adjustments#relative-adjustment), which synchronize with orders. * * **Limits** * * For maximum inventory levels, see [Inventory adjustments](/docs/store-operations/catalog/inventory-adjustments#inventory-adjustments). * * Limit of 2000 items for payload length, see [Optimizing performance](/docs/store-operations/catalog/inventory-adjustments#optimizing-performance) for more information. * */ readonly put: operations["put-absolute-adjustment"]; }; readonly "/inventory/adjustments/relative": { readonly parameters: { readonly query?: never; readonly header: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Relative Adjustment * @description Add or subtract inventory for an inventory item at a location. Use this endpoint only when you do not know absolute quantities. For example, making order-related inventory changes through a third-party may require relative adjustments. Otherwise, use the [Absolute adjustment](/docs/rest-management/inventory/adjustments#absolute-adjustment) endpoint for updating inventory. * * **Limits** * * For maximum inventory levels, see [Inventory adjustments](/docs/store-operations/catalog/inventory-adjustments#inventory-adjustments). * * Limit of 2000 items for payload length, see [Optimizing performance](/docs/store-operations/catalog/inventory-adjustments#optimizing-performance) for more information. * */ readonly post: operations["post-relative-adjustment"]; }; readonly "/inventory/items": { readonly parameters: { readonly query?: never; readonly header: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Get Inventory at Locations * @description Return a list of inventory and inventory settings for all items in all locations. * * **Limits** * * Limit of 1000 items for payload length. * */ readonly get: operations["get-inventory-items"]; }; readonly "/inventory/locations/{location_id}/items": { readonly parameters: { readonly query?: never; readonly header: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Get Inventory at a Location * @description Return a list of inventory and inventory settings for all items in a location. * * **Limits** * * Limit of 1000 items for payload length. * */ readonly get: operations["get-location-inventory-items"]; /** * Update Inventory Settings for a Location * @description * Update inventory settings for items at a location. * * **Limits** * * Limit of 2000 items for payload length. * */ readonly put: operations["put-location-inventory-items"]; }; } export type webhooks = Record; export interface components { schemas: { readonly ErrorResponse: { /** @description The HTTP status code generated by the origin server for this occurrence of the problem. */ readonly status?: number; /** @description Human readable error message. */ readonly title?: string; /** @description URL identifying the error type. Dereferencing the URL leads to documentation about the error type. * */ readonly type?: string; /** @description Detailed summary describing the particular error. */ readonly errors?: { readonly [key: string]: unknown; }; }; readonly Meta: { readonly pagination?: { /** * @description Total number of items in the result set. * @example 246 */ readonly total?: number; /** * @description The total number of items in the collection on current page. * @example 5 */ readonly count?: number; /** * @description The number of items returned in the collection per page, controlled by the limit parameter. * @example 5 */ readonly per_page?: number; /** * @description The page you are currently on within the collection. * @example 1 */ readonly current_page?: number; /** * @description The total number of pages in the collection. * @example 50 */ readonly total_pages?: number; /** @description Pagination links for the previous and next parts of the whole collection. */ readonly links?: { /** * @description A link to the previous page is returned in the response. * @example ?limit=5&page=2 */ readonly previous?: string; /** * @description A link to the current page is returned in the response. * @example ?limit=5&page=3 */ readonly current?: string; /** * @description Link to the next page returned in the response. * @example ?limit=5&page=4 */ readonly next?: string; }; }; }; readonly AdjustmentsRelativeRequest: { /** * @description Reason for the adjustment operation. * @example Monthly arrival delivered. */ readonly reason?: string; /** @description One of the `sku`, `product_id`, or `variant_id` is required to identify the item. */ readonly items: readonly ({ /** * @description ID of location. This is empty in the case of the default allotment. * @example 1 */ readonly location_id: number; /** * @description "Stock keeping unit" identifier of an item. * @example RE-130 */ readonly sku: string; /** * @description Amount of items that will be moved. * @example -2 */ readonly quantity: number; } | { /** * @description ID of location. This is empty in the case of the default allotment. * @example 1 */ readonly location_id: number; /** * @description ID of variant. * @example 78 */ readonly variant_id: number; /** * @description Amount of items that will be moved. * @example -2 */ readonly quantity: number; } | { /** * @description ID of location. This is empty in the case of the default allotment. * @example 1 */ readonly location_id: number; /** * @description ID of product. * @example 130 */ readonly product_id: number; /** * @description Amount of items that will be moved. * @example -2 */ readonly quantity: number; })[]; }; readonly AdjustmentsAbsoluteRequest: { /** * @description Reason for the adjustment operation. * @example Monthly arrival delivered. */ readonly reason?: string; /** @description One of the `sku`, `product_id`, or `variant_id` is required to identify the item. */ readonly items: readonly ({ /** * @description ID of location. This is empty in the case of the default allotment. * @example 1 */ readonly location_id: number; /** * @description "Stock keeping unit" identifier of an item. * @example RE-130 */ readonly sku: string; /** * @description Amount of items that will be moved. * @example 10 */ readonly quantity: number; } | { /** * @description ID of location. This is empty in the case of the default allotment. * @example 1 */ readonly location_id: number; /** * @description variant_id identifier of item. * @example 78 */ readonly variant_id: number; /** * @description Amount of items that will be moved. * @example 10 */ readonly quantity: number; } | { /** * @description ID of location. This is empty in the case of the default allotment. * @example 1 */ readonly location_id: number; /** * @description product_id identifier of item. * @example 120 */ readonly product_id: number; /** * @description Amount of items that will be moved. * @example 10 */ readonly quantity: number; })[]; }; readonly LocationItemsSettingsRequest: { readonly settings: readonly { /** @description One of the `sku`, `product_id`, or `variant_id` is required to identify the item. */ readonly identity?: { /** * @description "Stock keeping unit" identifier of an item. * @example RE-130 */ readonly sku?: string; } | { /** * @description ID of variant. * @example 79 */ readonly variant_id?: number; } | { /** * @description ID of product. * @example 120 */ readonly product_id?: number; }; /** * @description Safety stock. Decreases the amount available for selling items at that amount. If missing, the value will remain the same. * * @example 5 */ readonly safety_stock?: number; /** @description Shows whether an item is available for purchase independent of quantity. If missing, the value will remain the same. * */ readonly is_in_stock?: boolean; /** * @description Inventory warning level for the product. The store owner will be informed when the product's inventory level drops below the warning level. If missing, the value will remain the same. * * @example 10 */ readonly warning_level?: number; /** * @description Warehouse location identifier; bin picking number for the item. * * @example 1 */ readonly bin_picking_number?: string; }[]; }; readonly LocationItemsResponse: { readonly identity?: { /** * @description "Stock keeping unit" identifier of item. * @example RE-130 */ readonly sku?: string; /** * @description ID of variant. * @example 78 */ readonly variant_id?: number; /** * @description ID of product. * @example 130 */ readonly product_id?: number; }; /** * @description Amount of available items. * @example 10 */ readonly available_to_sell?: number; /** * @description Amount of available items on hand minus `safety_stock`. * @example 12 */ readonly total_inventory_onhand?: number; readonly settings?: { /** * @description Safety stock. Decreases the amount available for selling an item. If missing, the value will remain the same. * * @default 0 * @example 2 */ readonly safety_stock: number; /** * @description Shows whether an item is available for purchase independent of quantity. * @default true */ readonly is_in_stock: boolean; /** * @description Inventory warning level for the product. The store owner will be informed when the product's inventory level drops below the warning level. If missing, the value will remain the same. * * @default 0 * @example 2 */ readonly warning_level: number; /** * @description Warehouse location identifier; bin picking number for the item. * * @example 1 */ readonly bin_picking_number?: string; }; }; readonly ItemResponse: { readonly identity?: { /** * @description "Stock keeping unit" identifier of an item. * @example RE-130 */ readonly sku?: string; /** * @description ID of variant. * @example 79 */ readonly variant_id?: number; /** * @description ID of product. * @example 120 */ readonly product_id?: number; /** @description Read-only reference to Catalog V2 API's SKU ID. `null` if the item is a base variant. */ readonly sku_id?: number; }; readonly locations?: readonly { /** * @description ID of location. * @example 1 */ readonly location_id?: number; /** * @description Code of location. * @example BC-LOCATION-1 */ readonly location_code?: string; /** * @description Name of location. * @example Default location */ readonly location_name?: string; /** * @description Available to sell. Total inventory on hand minus the safety stock. * @example 10 */ readonly available_to_sell?: number; /** * @description Total inventory on hand. * @example 11 */ readonly total_inventory_onhand?: number; /** @description Status of the location. Indicates whether a location is enabled. */ readonly location_enabled?: boolean; readonly settings?: { /** * @description Decreases the amount available for selling items at that amount. * @example 1 */ readonly safety_stock?: number; /** @description Shows whether an item is available for purchase independent of quantity. */ readonly is_in_stock?: boolean; /** * @description Inventory warning level for the product. The store owner will be informed when the product inventory level drops below the warning level. * @example 1 */ readonly warning_level?: number; /** * @description Warehouse location identifier; bin picking number for the item. * @example 1 */ readonly bin_picking_number?: string; }; }[]; }; readonly SimpleTransactionResponse: { /** @description Unique identifier of performed action. */ readonly transaction_id?: string; }; }; responses: never; parameters: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: string; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly ContentType: string; /** @description List of `sku` separated by comma. */ readonly SkuFilterParam: string; /** @description List of `variant_id` separated by comma. */ readonly VariantIdFilterParam: number; /** @description List of `product_id` separated by comma. */ readonly ProductIdFilterParam: number; /** @description Specifies the page number in a limited (paginated) list. */ readonly PageParam: number; /** @description Controls the number of items per page in a limited (paginated) list. */ readonly LimitParam: number; /** @description Unique identifier for a location. */ readonly LocationIdParam: number; /** @description Comma separated list of `location_id`. */ readonly LocationIdsParam: number; /** @description Comma separated list of `location_code`. */ readonly LocationCodeFilterParam: string; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly "put-absolute-adjustment": { readonly parameters: { readonly query?: never; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "application/json": components["schemas"]["AdjustmentsAbsoluteRequest"]; }; }; readonly responses: { /** @description Request has been successfully processed. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SimpleTransactionResponse"]; }; }; /** @description Incorrect entity. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ErrorResponse"]; }; }; }; }; readonly "post-relative-adjustment": { readonly parameters: { readonly query?: never; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "application/json": components["schemas"]["AdjustmentsRelativeRequest"]; }; }; readonly responses: { /** @description Request has been successfully processed. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SimpleTransactionResponse"]; }; }; /** @description Incorrect entity. The adjustment was not valid. This is the result of missing required fields or invalid data. See the response for more details. * */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ErrorResponse"]; }; }; }; }; readonly "get-inventory-items": { readonly parameters: { readonly query?: { /** @description List of `sku` separated by comma. */ readonly "sku:in"?: components["parameters"]["SkuFilterParam"]; /** @description List of `variant_id` separated by comma. */ readonly "variant_id:in"?: components["parameters"]["VariantIdFilterParam"]; /** @description List of `product_id` separated by comma. */ readonly "product_id:in"?: components["parameters"]["ProductIdFilterParam"]; /** @description Comma separated list of `location_id`. */ readonly "location_id:in"?: components["parameters"]["LocationIdsParam"]; /** @description Comma separated list of `location_code`. */ readonly "location_code:in"?: components["parameters"]["LocationCodeFilterParam"]; /** @description Specifies the page number in a limited (paginated) list. */ readonly page?: components["parameters"]["PageParam"]; /** @description Controls the number of items per page in a limited (paginated) list. */ readonly limit?: components["parameters"]["LimitParam"]; }; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Request has been successfully processed. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["ItemResponse"][]; readonly meta?: components["schemas"]["Meta"]; }; }; }; }; }; readonly "get-location-inventory-items": { readonly parameters: { readonly query?: { /** @description List of `variant_id` separated by comma. */ readonly "variant_id:in"?: components["parameters"]["VariantIdFilterParam"]; /** @description List of `product_id` separated by comma. */ readonly "product_id:in"?: components["parameters"]["ProductIdFilterParam"]; /** @description List of `sku` separated by comma. */ readonly "sku:in"?: components["parameters"]["SkuFilterParam"]; /** @description Specifies the page number in a limited (paginated) list. */ readonly page?: components["parameters"]["PageParam"]; /** @description Controls the number of items per page in a limited (paginated) list. */ readonly limit?: components["parameters"]["LimitParam"]; }; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; }; readonly path: { /** @description Unique identifier for a location. */ readonly location_id: components["parameters"]["LocationIdParam"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Request has been successfully processed. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["LocationItemsResponse"][]; readonly meta?: components["schemas"]["Meta"]; }; }; }; /** @description Request has been rejected due to resource not being found. */ readonly 404: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ErrorResponse"]; }; }; }; }; readonly "put-location-inventory-items": { readonly parameters: { readonly query?: never; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; }; readonly path: { /** @description Unique identifier for a location. */ readonly location_id: components["parameters"]["LocationIdParam"]; }; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "application/json": components["schemas"]["LocationItemsSettingsRequest"]; }; }; readonly responses: { /** @description Request has been successfully processed. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SimpleTransactionResponse"]; }; }; /** @description Incorrect entity. Item was not valid due to missing required fields or invalid data. See the response for more details. * */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ErrorResponse"]; }; }; }; }; }