[Home](./index.md) > [bitburner](./bitburner.md) > [WarehouseAPI](./bitburner.warehouseapi.md) > [buyMaterial](./bitburner.warehouseapi.buymaterial.md) ## WarehouseAPI.buyMaterial() method Set material buy data Signature: ```typescript buyMaterial(divisionName: string, city: CityName | `${CityName}`, materialName: string, amt: number): void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | divisionName | string | Name of the division | | city | [CityName](./bitburner.cityname.md) \| \`${[CityName](./bitburner.cityname.md)}\` | Name of the city | | materialName | string | Name of the material | | amt | number | Amount of material to buy | Returns: void