v2
Documentation for the Mila External API
Create a Service Call
POST https://api.mila.cloud/v2/service-calls
Create a new service call directly from you booking platform by doing a call to this endpoint with an array of the following as payload.
Headers
x-api-key
string
Authentication key (provided by us)
Request Body
servicePackageOfferingIds
array
Array containing the id(s) of service packages requested by the customer (provided by us)
string
Customer email
communicationLanguage
string
Customer communication language ("en", "de", "fr", "it")
address
object
Customer address
invoiceAddress
object
Customer invoice address (if different from address)
description
string
Optional description visible to the technician
businessModel
string
Either DEFAULT or PREPAID_INVOICED_TO_ENTERPRISE_PARTNER
legalRegionId
string
Unique identifier of the customer country (see below)
termsAndConditionsId
string
Unique identifier of the T&C (see below)
orderId
string
Internal Order Id
voucherCodes
array
Voucher codes
{
"status": "RECEIVED",
"customer": {
"address": {
"firstName": "Phillip",
"lastName": "Holzapfel",
"street": "Warschauer Strasse",
"streetNumber": "5",
"postalCode": "10243",
"city": "Berlin",
"country": "DE",
"phoneNumber": "+4949204229917"
},
"email": "[email protected]"
},
"orderId": "87645318231343",
"servicePackageOfferingIds": [
"d9573205-4d7e-45fa-9d28-05e3b6a35764"
]
} {
"status": "FAILED",
"customer": {
"address": {
"firstName": "Anthony",
"lastName": "Kim",
"street": "Warschauer Strasse",
"streetNumber": "12",
"postalCode": "10243",
"city": "Berlin",
"country": "DE",
"phoneNumber": ""
},
"email": "robert57"
},
"orderId": "876453182313412",
"servicePackageOfferingIds": [
"d8fd33de-56dc-4ec6-9c9a-b0162b0404de"
],
"error": "PHONE_NUMBER_OR_EMAIL_IS_REQUIRED"
},{
"message": "Forbidden"
}The payload has to be an array, even if the request is only one [{ ... }]
The address and invoiceAddress objects contain the following fields (the required ones are denoted with a * )
{
* "firstName": string,
* "lastName": string,
* "street": string,
* "streetNumber": string,
* "postalCode": string,
* "city": string,
* "country": string,
"phoneNumber": string,
"additionalAddressInformation": string,
"company": string
}Legal Region and Terms&Conditions for each country
Country
legalRegionId
Switzerland
67efd22d-36ed-46aa-b5ad-b2e4847aef83
Germany
2e0eb199-5e96-4642-aeaa-0fec252eaab9
UK
a77e7a0c-dd6c-4aac-9631-ff9afc2133f5
France
9cbe6728-d2d4-46e2-9b66-bc0221866a84
Austria
3b79db01-fc11-4fca-8f8b-5146564fd865
Country
termsAndConditionsId
Switzerland
54485daf-29db-4121-ac5b-c2ead08116d6
Germany
defac5d0-bc83-490f-8268-969bfcfe4417
Austria
a4ab4736-0ec6-4e8d-a95e-5005b7b7adb5
Example
Below one can find an example of a payload composed by three requests, two of whom sharing the same orderId, meaning that they would be merged in a single one before being sent to our system.
[
{
"servicePackageOfferingIds": [
"d8fd33de-56dc-4ec6-9c9a-b0162b0404de"
],
"email": "[email protected]",
"address": {
"firstName": "Anthony",
"lastName": "Kim",
"street": "Warschauer Strasse",
"streetNumber": "12",
"postalCode": "10243",
"city": "Berlin",
"country": "DE",
"phoneNumber": "+4949675858360"
},
"communicationLanguage": "de",
"legalRegionId": "2e0eb199-5e96-4642-aeaa-0fec252eaab9",
"businessModel": "PREPAID_INVOICED_TO_ENTERPRISE_PARTNER",
"orderId": "87645318231342"
},
{
"servicePackageOfferingIds": [
"5a593075-c922-4d55-a57b-78175afb61ba"
],
"email": "[email protected]",
"address": {
"firstName": "Harm",
"lastName": "Ortmann-Textor",
"street": "Warschauer Strasse",
"streetNumber": "33",
"postalCode": "10243",
"city": "Berlin",
"country": "DE",
"phoneNumber": "+4974376293582"
},
"communicationLanguage": "de",
"legalRegionId": "2e0eb199-5e96-4642-aeaa-0fec252eaab9",
"businessModel": "PREPAID_INVOICED_TO_ENTERPRISE_PARTNER",
"orderId": "87645318231342"
},
{
"servicePackageOfferingIds": [
"d9573205-4d7e-45fa-9d28-05e3b6a35764"
],
"email": "[email protected]",
"address": {
"firstName": "Phillip",
"lastName": "Holzapfel",
"street": "Warschauer Strasse",
"streetNumber": "5",
"postalCode": "10243",
"city": "Berlin",
"country": "DE",
"phoneNumber": "+4949204229917"
},
"communicationLanguage": "de",
"legalRegionId": "2e0eb199-5e96-4642-aeaa-0fec252eaab9",
"businessModel": "PREPAID_INVOICED_TO_ENTERPRISE_PARTNER",
"orderId": "87645318231343"
}
][
{
"status": "RECEIVED",
"customer": {
"address": {
"firstName": "Anthony",
"lastName": "Kim",
"street": "Warschauer Strasse",
"streetNumber": "12",
"postalCode": "10243",
"city": "Berlin",
"country": "DE",
"phoneNumber": "+4949675858360"
},
"email": "[email protected]"
},
"orderId": "87645318231342",
"servicePackageOfferingIds": [
"d8fd33de-56dc-4ec6-9c9a-b0162b0404de",
"5a593075-c922-4d55-a57b-78175afb61ba"
]
},
{
"status": "RECEIVED",
"customer": {
"address": {
"firstName": "Phillip",
"lastName": "Holzapfel",
"street": "Warschauer Strasse",
"streetNumber": "5",
"postalCode": "10243",
"city": "Berlin",
"country": "DE",
"phoneNumber": "+4949204229917"
},
"email": "[email protected]"
},
"orderId": "87645318231343",
"servicePackageOfferingIds": [
"d9573205-4d7e-45fa-9d28-05e3b6a35764"
]
}
]Testing
In order to test the connection, https://api-stage.mila.cloud/v2/service-calls could be used. In this case, the IDs that needs to be used will be different:
Country
legalRegionId
Switzerland
0aa7725a-f5d6-4101-a1d1-e428da56470c
Germany
79c3ea6d-6a45-405b-9971-25f47359ef4e
UK
1b5cd24b-05b6-4ea7-afbb-c779f3b23b78
France