ordercloud-javascript-sdk
    Preparing search index...

    Class InventoryRecords

    Index
    • Returns this

      enables impersonation by calling the subsequent method with the stored impersonation token

      InventoryRecords.As().List() // lists InventoryRecords using the impersonated users' token
      
    • Delete an inventory record Check out the docs for more info

      Parameters

      • productID: string

        ID of the product.

      • inventoryRecordID: string

        ID of the inventory record.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete an inventory record assignment Check out the docs for more info

      Parameters

      • productID: string

        ID of the product.

      • inventoryRecordID: string

        ID of the inventory record.

      • listOptions: { buyerID?: string; userGroupID?: string; userID?: string } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

        • OptionaluserGroupID?: string

          ID of the user group.

        • OptionaluserID?: string

          ID of the user.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete a variant inventory record Check out the docs for more info

      Parameters

      • productID: string

        ID of the product.

      • variantID: string

        ID of the variant.

      • inventoryRecordID: string

        ID of the inventory record.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete an inventory record variant assignment Check out the docs for more info

      Parameters

      • productID: string

        ID of the product.

      • variantID: string

        ID of the variant.

      • inventoryRecordID: string

        ID of the inventory record.

      • listOptions: { buyerID?: string; userGroupID?: string; userID?: string } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

        • OptionaluserGroupID?: string

          ID of the user group.

        • OptionaluserID?: string

          ID of the user.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Get a single variant inventory record Check out the docs for more info

      Type Parameters

      Parameters

      • productID: string

        ID of the product.

      • variantID: string

        ID of the variant.

      • inventoryRecordID: string

        ID of the inventory record.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredDeep<TInventoryRecord>>

    • List inventory records Check out the docs for more info

      Type Parameters

      Parameters

      • productID: string

        ID of the product.

      • listOptions: {
            filters?: Filters;
            includeAddress?: boolean;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "AddressID")[];
            sortBy?: ("ID" | "AddressID" | "!ID" | "!AddressID")[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • OptionalincludeAddress?: boolean

          Include address of the inventory record.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: ("ID" | "AddressID")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: ("ID" | "AddressID" | "!ID" | "!AddressID")[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TInventoryRecord>>>

    • List inventory record assignments Check out the docs for more info

      Type Parameters

      Parameters

      • productID: string

        ID of the product.

      • listOptions: {
            buyerID?: string;
            inventoryRecordID?: string;
            level?: "Group" | "Company";
            page?: number;
            pageSize?: number;
            userGroupID?: string;
        } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

        • OptionalinventoryRecordID?: string

          ID of the inventory record.

        • Optionallevel?: "Group" | "Company"

          Level of the inventory record assignment. Possible values: Group, Company, BuyerGroup.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • OptionaluserGroupID?: string

          ID of the user group.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TInventoryRecordAssignment>>>

    • Get a list of variant inventory records Check out the docs for more info

      Type Parameters

      Parameters

      • productID: string

        ID of the product.

      • variantID: string

        ID of the variant.

      • listOptions: {
            filters?: Filters;
            includeAddress?: boolean;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "AddressID")[];
            sortBy?: ("ID" | "AddressID" | "!ID" | "!AddressID")[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • OptionalincludeAddress?: boolean

          Include address of the inventory record.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: ("ID" | "AddressID")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: ("ID" | "AddressID" | "!ID" | "!AddressID")[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TInventoryRecord>>>

    • List inventory record variant assignments Check out the docs for more info

      Type Parameters

      Parameters

      • productID: string

        ID of the product.

      • variantID: string

        ID of the variant.

      • listOptions: {
            buyerID?: string;
            inventoryRecordID?: string;
            level?: "Group" | "Company";
            page?: number;
            pageSize?: number;
            userGroupID?: string;
        } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

        • OptionalinventoryRecordID?: string

          ID of the inventory record.

        • Optionallevel?: "Group" | "Company"

          Level of the inventory record assignment. Possible values: Group, Company, BuyerGroup.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • OptionaluserGroupID?: string

          ID of the user group.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TInventoryRecordAssignment>>>

    • Create or update an inventory record assignment Check out the docs for more info

      Parameters

      • productID: string

        ID of the product.

      • inventoryRecordAssignment: InventoryRecordAssignment

        Required fields: InventoryRecordID, BuyerID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Create or update an inventory record variant assignment Check out the docs for more info

      Parameters

      • productID: string

        ID of the product.

      • variantID: string

        ID of the variant.

      • inventoryRecordAssignment: InventoryRecordAssignment

        Required fields: InventoryRecordID, BuyerID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>