Ton'ya (問屋), called toiya outside of Edo, were trade brokers in Japan, primarily wholesalers, warehouse managers, and shipment managers; the term applies equally to the traders themselves and to their shops or warehouses. First appearing as early as the 12th century, ton'ya came to serve a crucial role in the economy of the Edo period (1603–1867).