New Vending Machine Reservation
POSThttps://api.lochting.com/public/v1/reservation/vendingMachine/create
This endpoint enables authorized users to create a new vending machine reservation by a given order id.
Request
Header Parameters
- application/json
Bodyrequired
The id of the order, prefixed with order-
and followed by a 36 characters long UUID.
order-c7d932c1-84e8-410c-a9b2-18bf739d6b8b
Email address of the customer
johndoe@lochting.com
Locale of the customer
Possible values: [nl_BE
, fr_BE
, en_BE
, de_BE
, fr_FR
, en_FR
, de_DE
, en_DE
, en_AU
, en_ES
, es_ES
, en_AT
, de_AT
, en_CZ
, cs_CZ
, en_SG
, en_PT
, pt_PT
]
nl_BE
Phone of customer
123456789
Additional remarks
Indicates if Lochting has to mute all communications (default true)
true
Set to true if all products are placed in a container in the robot (default false)
Responses
- 201
- 401
Created
- application/json
- Schema
- Example (auto)
Schema
The id of the reservation, prefixed with reservation-
and followed by a 36 characters long UUID.
reservation-c7d932c1-84e8-410c-a9b2-18bf739d6b8b
The generated code. Can be used by a customer on the matic.
XXX12345A
The over box EAN13 barcode.
1234567891234
{
"reservationId": "reservation-c7d932c1-84e8-410c-a9b2-18bf739d6b8b",
"reservationCode": "XXX12345A",
"overBoxBarCode": "1234567891234"
}
Unauthorized
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.lochting.com/public/v1/reservation/vendingMachine/create");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"orderId\": \"order-c7d932c1-84e8-410c-a9b2-18bf739d6b8b\",\n \"customerEmail\": \"johndoe@lochting.com\",\n \"customerLocale\": \"nl_BE\",\n \"customerPhone\": \"123456789\",\n \"remarks\": \"string\",\n \"muteAllNotifications\": true,\n \"isOverBoxReservation\": true\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());