DoorDash is suing New York City for a new law that forces delivery companies to share customers’ data with restaurants.

The latest lawsuit was filed Wednesday by the delivery companies against local governments. It is part of a series of legal disputes between delivery companies and local authorities, which reflect unease about the rapid growth of delivery and its effect on restaurants. DoorDash and Grubhub sued New York last week over a separate bill which caps fees that delivery companies can charge restaurants. DoorDash and Grubhub are also sueing San Francisco for imposing fee caps.

DoorDash claims that an ordinance passed in July by the New York City Council is unconstitutional. It also asserts that it violates customer privacy. The law requires delivery companies to share information about customers, including names, addresses and phone numbers, with any restaurant that requests it. Customers have the option to opt out of having their information kept private but this is only available on an order-by–order basis.

In a court filing, the San Francisco company stated that “In an age of heightened concerns over data privacy and identity theft,” this compelled disclosure was a shocking and intrusive intrusion on consumers’ privacy.” It was pointed out that only in-person diners would be asked to provide the same information as restaurants.

Many restaurants were fed up with the lack of transparency and delivery fees, and supported the bill. NYC Hospitality Alliance represents New York bars and restaurants. It says that the bill decreases the leverage delivery companies have over restaurants. They won’t lose their access to customers if they leave a delivery platform. They can also market directly to their customers.

As pandemic lockdowns shut down restaurants and people ate more at home, delivery companies enjoyed big sales gains in the past year. DoorDash saw record sales of 345 million orders during its last quarter and sales rose 83% to $1.24 Billion from the previous year.

Deliveries companies claim they connect restaurants to diners and handle complicated logistics. However, their commission fees can reach as high as 30% per order and have impacted the already slim margins of restaurant owners. According to the National Restaurant Association, 90,000 U.S. restaurant have been forced to close permanently or for long periods of time because of the pandemic.

As the pandemic progressed, local legislators began to scrutinize this relationship between delivery companies. Several cities have passed temporary fees caps. Grubhub was sued by Massachusetts in July for charging illegally high fees to restaurants during the pandemic. Chicago also sued DoorDash, Grubhub and Grubhub last month. They were accused of misleading business practices including delivering to restaurants without their consent. These claims were denied by both companies.