Interface WarehouseAPI

Corporation Warehouse API

Remarks

Requires the Warehouse API upgrade from your corporation.

interface WarehouseAPI {
    bulkPurchase(divisionName, city, materialName, amt): void;
    buyMaterial(divisionName, city, materialName, amt): void;
    cancelExportMaterial(sourceDivision, sourceCity, targetDivision, targetCity, materialName): void;
    discontinueProduct(divisionName, productName): void;
    exportMaterial(sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt): void;
    getMaterial(divisionName, city, materialName): Material;
    getProduct(divisionName, cityName, productName): Product;
    getUpgradeWarehouseCost(divisionName, city, amt?): number;
    getWarehouse(divisionName, city): Warehouse;
    hasWarehouse(divisionName, city): boolean;
    limitMaterialProduction(divisionName, city, materialName, qty): void;
    limitProductProduction(divisionName, city, productName, qty): void;
    makeProduct(divisionName, city, productName, designInvest, marketingInvest): void;
    purchaseWarehouse(divisionName, city): void;
    sellMaterial(divisionName, city, materialName, amt, price): void;
    sellProduct(divisionName, city, productName, amt, price, all): void;
    setMaterialMarketTA1(divisionName, city, materialName, on): void;
    setMaterialMarketTA2(divisionName, city, materialName, on): void;
    setProductMarketTA1(divisionName, productName, on): void;
    setProductMarketTA2(divisionName, productName, on): void;
    setSmartSupply(divisionName, city, enabled): void;
    setSmartSupplyOption(divisionName, city, materialName, option): void;
    upgradeWarehouse(divisionName, city, amt?): void;
}

Hierarchy (view full)

Methods

  • Set material to bulk buy

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • materialName: string

      Name of the material

    • amt: number

      Amount of material to buy

    Returns void

  • Set material buy data

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • materialName: string

      Name of the material

    • amt: number

      Amount of material to buy

    Returns void

  • Cancel material export

    Parameters

    • sourceDivision: string

      Source division

    • sourceCity: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Source city

    • targetDivision: string

      Target division

    • targetCity: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Target city

    • materialName: string

      Name of the material

    Returns void

  • Discontinue a product.

    Parameters

    • divisionName: string

      Name of the division

    • productName: string

      Name of the product

    Returns void

  • Set material export data

    Parameters

    • sourceDivision: string

      Source division

    • sourceCity: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Source city

    • targetDivision: string

      Target division

    • targetCity: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Target city

    • materialName: string

      Name of the material

    • amt: string | number

      Amount of material to export.

    Returns void

  • Get material data

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • materialName: string

      Name of the material

    Returns Material

    material data

  • Get product data

    Parameters

    • divisionName: string

      Name of the division

    • cityName: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • productName: string

      Name of the product

    Returns Product

    product data

  • Gets the cost to upgrade a warehouse to the next level

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • Optional amt: number

      amount of upgrades. Optional, defaults to 1

    Returns number

    cost to upgrade

  • Get warehouse data

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    Returns Warehouse

    warehouse data

  • Check if you have a warehouse in city

    Parameters

    • divisionName: string
    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

    Returns boolean

    true if warehouse is present, false if not

  • Limit Material Production.

    Parameters

    • divisionName: string

      Name of the division.

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city.

    • materialName: string

      Name of the material.

    • qty: number

      Amount to limit to. Pass a negative value to remove the limit instead.

    Returns void

  • Limit Product Production.

    Parameters

    • divisionName: string

      Name of the division.

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city.

    • productName: string

      Name of the product.

    • qty: number

      Amount to limit to. Pass a negative value to remove the limit instead.

    Returns void

  • Create a new product

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • productName: string

      Name of the product

    • designInvest: number

      Amount to invest for the design of the product.

    • marketingInvest: number

      Amount to invest for the marketing of the product.

    Returns void

  • Purchase warehouse for a new city

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    Returns void

  • Set material sell data.

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • materialName: string

      Name of the material

    • amt: string

      Amount to sell, can be "MAX"

    • price: string

      Price to sell, can be "MP"

    Returns void

  • Set product sell data.

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • productName: string

      Name of the product

    • amt: string

      Amount to sell, can be "MAX"

    • price: string

      Price to sell, can be "MP"

    • all: boolean

      Set sell amount and price in all cities

    Returns void

  • Set market TA 1 for a material.

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • materialName: string

      Name of the material

    • on: boolean

      market ta enabled

    Returns void

  • Set market TA 2 for a material.

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • materialName: string

      Name of the material

    • on: boolean

      market ta enabled

    Returns void

  • Set market TA 1 for a product.

    Parameters

    • divisionName: string

      Name of the division

    • productName: string

      Name of the product

    • on: boolean

      market ta enabled

    Returns void

  • Set market TA 2 for a product.

    Parameters

    • divisionName: string

      Name of the division

    • productName: string

      Name of the product

    • on: boolean

      market ta enabled

    Returns void

  • Set smart supply

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • enabled: boolean

      smart supply enabled

    Returns void

  • Set whether smart supply uses leftovers before buying

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • materialName: string

      Name of the material

    • option: CorpSmartSupplyOption

      smart supply option, "leftovers" to use leftovers, "imports" to use only imported materials, "none" to not use materials from store

    Returns void

  • Upgrade warehouse

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • Optional amt: number

      amount of upgrades defaults to 1

    Returns void