Query

POST https://delivery.ucs.ru/orders/api/v1/orders

Content-Type: application/json

Query example

{ 
  "comment": "cook it with love", 
  "restaurantID": "76439fb3-c0c4-42ca-a269-64f031a6a33b",
  "persons": "1", 
  "dishList": [ 
    { 
      "ID": "76439fb3-c0c4-42ca-a269-64f031a6a33b", 
      "name": "caesar salad", 
      "price": "400", 
      "measure": {
          "value": "0.300", 
          "unit": "kg"
      }, 
      "quantity": "1", 
      "ingredients": [ 
        { 
         "ID": "76439fb3-c0c4-42ca-a269-64f031a6a33b",
         "name": "tomatos", 
         "price": "120", 
         "measure": { 
            "value": "0.100", 
            "unit": "kg" 
         }, 
        "quantity": "2" 
        } 
     ]
   }
 ], 
 "expeditionType": "delivery",
 "expectedAt":"2021-06-16T14:03:42.504+03:00",
 "paymentTypeID": "card",
 "changeFrom": "5000", 
 "guest": {
   "email": "eewd@dgf.com", 
   "phone": "79218724646",
   "firstName": "James"
 }, 
 "address": { 
   "postcode": "109443", 
   "cityID": "73439fb3-c0c4-42ca-a269-64f031a6a33b",
   "street": "Keningston High Street", 
   "comment": " the house is situated to the right of the school", 
   "lat": "55.700897", 
   "lon": "37.773808", 
   "cityName": "London", 
   "entrance": "1", 
   "houseNumber": "85", 
   "apartmentNumber": "6", 
   "subway": "High Street Kensington", 
   "fullAddress": "6, 1, 85, Keningston High Street, London, W8 5SA" 
  } 
}

You must specify the time zone when sending expectedAt parameter.

Response

Status code: 201

Parameter 
DescriptionExample
 orderID

stringorder ID
{
   "result": {
      "orderID": "765"
   }
}

Parameters

Mandatory fields depend on the selected type of delivery:

  • delivery — courier delivery 
  • pickup — client's take-out
Parameter
DescriptionMandatory for deliveryMandatory for pickup
commentstringorder comment

restaurantIDstringrestaurant ID
yes
personsintnumber of persons

dishListarraydish listyesyes

-ID

stringdish ID yesyes
-namestringdish name

-price

double

Only a full stop symbol «.» is used as a delimiter

price

-measure
measure

--valuedoubleserving size

--unitstringunit of measurement: kg, liter, pcs 

-quantity

double

Only a full stop symbol «.» is used as a delimiter

quantityyesyes
-ingredientsarrayingredients

expeditionTypestring

ID of order receiving type:

  • "delivery" - courier delivery 
  • "pickup" - client's take-out 
yesyes
expectedAtDateTimetime at which order is expectedyesyes
paymentTypeIDstring

payment type ID:

  • cash,
  • card,
  • online.
yesyes
changeFrom

double

Only a full stop symbol «.» is used as a delimiter

sum to get change from

guest
guestyes
-emailstringguest's email

-phonestringphone numberyes
-firstNamestringfirst name

-lastNamestringlast name 

address
delivery address

-postcodestringpostcode

-streetstringstreetyes
-commentstringcomment on address

-lat

double

Only a full stop symbol «.» is used as a delimiter

latitude

-lon

double

Only a full stop symbol «.» is used as a delimiter

longitude

-cityIDstringcity ID

-cityNamestringcity nameyes
-floorintfloor

-houseNumberstringhouse numberyes
-apartmentNumberstringapartment number

-entrancestringentrance

-subwaystringsubway

-fullAddressstringfull addressyes
  • No labels