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

Name
Type
Description

x-api-key

string

Authentication key (provided by us)

Request Body

Name
Type
Description

servicePackageOfferingIds

array

Array containing the id(s) of service packages requested by the customer (provided by us)

email

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"
    ]
  }

The address and invoiceAddress objects contain the following fields (the required ones are denoted with a * )

address - invoiceAddress
{
*  "firstName": string,
*  "lastName": string,
*  "street": string,
*  "streetNumber": string,
*  "postalCode": string,
*  "city": string,
*  "country": string,
   "phoneNumber": string,
   "additionalAddressInformation": string,
   "company": string
}

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"
	}
]

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

0f2d7267-87c7-4f07-929e-95062e1e63da

Austria

31ea14fc-89f5-4396-b1e3-60078ca2f928

Country

termsAndConditionsId

Switzerland

ac5d25c6-86ac-431c-a051-588b24f73c41

Germany

8a75f74a-bd91-4463-9441-8c3693b2fb3d

Austria

08813fc3-ec98-4d0f-bc27-cae96b90edb0

Last updated