Typescript SDK Type Docs
    Preparing search index...

    Class ByProjectKeyInventoryRequestBuilder

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    args: {
        baseUri?: string;
        executeRequest: executeRequest;
        pathArgs: { projectKey: string };
    }

    Methods

    • Parameters

      • OptionalmethodArgs: {
            headers?: { [key: string]: string | string[] };
            queryArgs?: {
                expand?: string | string[];
                limit?: number;
                offset?: number;
                sort?: string | string[];
                where?: string | string[];
                withTotal?: boolean;
                [key: string]: QueryParam;
            };
        }

      Returns ApiRequest<InventoryPagedQueryResponse>

    • Checks if one or more InventoryEntries exist for the provided query predicate. Returns a 200 status if any Inventory Entries match the Query Predicate, or a 404 status otherwise.

      Parameters

      • OptionalmethodArgs: {
            headers?: { [key: string]: string | string[] };
            queryArgs?: { where?: string | string[]; [key: string]: QueryParam };
        }

      Returns ApiRequest<void>

    post

    • post(
          methodArgs: {
              body: InventoryEntryDraft;
              headers?: { [key: string]: string | string[] };
              queryArgs?: { expand?: string | string[]; [key: string]: QueryParam };
          },
      ): ApiRequest<InventoryEntry>

      Creates an InventoryEntry in the Project.

      If quantity limits are provided, existing Line Items that reference a Product Variant with an SKU that matches the Inventory Entry can be affected. For more information, see [Quantity limits](/../api/carts-orders-overview#quantity-limits).
      
      Produces the [InventoryEntryCreated](ctp:api:type:InventoryEntryCreatedMessage) Message.
      

      Parameters

      • methodArgs: {
            body: InventoryEntryDraft;
            headers?: { [key: string]: string | string[] };
            queryArgs?: { expand?: string | string[]; [key: string]: QueryParam };
        }

      Returns ApiRequest<InventoryEntry>