Creating a Delivery with Address Field Line1
v8
In the V8 API, it became possible to create deliveries where the address, instead of the fields city, street, house, building, is formed using the Line1 field.
Line1 is the part of the address that indicates how to find the object on the map during geocoding.
Example: London, Warsaw Highway, b.86, bld.2
To form the address, you need to enable in the restaurant settings
(Administration -> Business Settings -> General Settings) in the section “Delivery Address Format”
the item “Use new address format” and select the mode below: Fields "Where to deliver", "apartment", "floor"...
After that, you need to restart SyrveFront and Syrve Office to apply the address display settings.
Feature of request formation:
When creating a delivery, the address fields (AddressDto) StreetId and House must be filled in as follows:
StreetId = f8aaf1ec-8f46-907f-9357-e4c27bab5f78 - Id of an empty street in the database (the same for all databases).
House = "" - an empty string or string.Empty, but the absence of this field is not allowed.
Example of address formation:
var address = new AddressDto
{
Line1 = "London, Warsaw Highway,b.80,bld.2",
StreetId = Guid.Parse("f8aaf1ec-8f46-907f-9357-e4c27bab5f78"),
House = "",
Flat = "37",
Floor = "2",
AdditionalInfo = "Address details",
Doorphone = "37",
Entrance = "3"
};