Businesses
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| PUT | /api/business/{businessId} | Update business |
| POST | /api/business | Create business |
| GET | /api/business/my-business | Get business |
| GET | /api/business/default-configuration | Get metadata for business |
| GET | /api/business/{businessId}/children | Get business children |
Update business
PUT/api/business/{businessId}
Access. Send a bearer token or an API key. The caller needs the Settings modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
businessId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateBusinessCommand.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | No | |
multipleBranches | boolean | No | |
registeredName | string | Yes | Limits: maximum 100 characters. |
displayName | string | Yes | Limits: maximum 50 characters. |
phoneNumber | string (tel) | Yes | |
website | string | No | Limits: maximum 100 characters. |
email | string (email) | Yes | |
requiresOrderIntegration | boolean | No | |
requiresOrderFulfillment | boolean | No | |
requiresAccountingIntegration | boolean | No | |
requiresDispatchBuilder | boolean | No | |
billingAddress | UpdateAddressRequest | Yes | |
shippingAddress | UpdateAddressRequest | No |
Response
200. Returns a SingleResult envelope. The data field is BusinessResponse.
curl -X PUT "https://api.miridia.io/api/business/{businessId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"multipleBranches": true,
"registeredName": "string",
"displayName": "string",
"phoneNumber": "string",
"website": "string",
"email": "name@example.com",
"requiresOrderIntegration": true,
"requiresOrderFulfillment": true,
"requiresAccountingIntegration": true,
"requiresDispatchBuilder": true,
"billingAddress": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"placeId": "string",
"name": "string",
"website": "https://example.com",
"fullAddress": "string",
"street": "string",
"suburb": "string",
"city": "string",
"country": "string",
"postcode": "string",
"unit": "string",
"number": "string",
"province": "string",
"latitude": 0,
"longitude": 0
},
"shippingAddress": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"placeId": "string",
"name": "string",
"website": "https://example.com",
"fullAddress": "string",
"street": "string",
"suburb": "string",
"city": "string",
"country": "string",
"postcode": "string",
"unit": "string",
"number": "string",
"province": "string",
"latitude": 0,
"longitude": 0
}
}'Create business
POST/api/business
Creates an additional business within the authenticated caller's organization. Unlike organization registration (anonymous tenant onboarding. See !:OrganizationController), this operates inside an already-provisioned org schema and is permission-gated.
Access. Send a bearer token or an API key. The caller needs the Settings modify permission.
Request body
Send JSON with the shape CreateBusinessRequest.
| Field | Type | Required | Description |
|---|---|---|---|
registeredName | string | No | Limits: maximum 100 characters. |
displayName | string | Yes | Limits: maximum 50 characters. |
phoneNumber | string (tel) | Yes | |
website | string | No | Limits: maximum 100 characters. |
email | string (email) | Yes | |
registrationNumber | string | No | Limits: maximum 30 characters. |
requiresOrderIntegration | boolean | No | |
requiresOrderFulfillment | boolean | No | |
requiresAccountingIntegration | boolean | No | |
requiresDispatchBuilder | boolean | No | |
multipleBranches | boolean | No | |
address | CreateAddressRequest | Yes | |
businessType | enum BusinessType | No | One of: Unknown, Simple, Logistics, Forwarder, OnlineMerchant, Retailer, Supplier, Distributor, Exporting, Warehouse. |
Response
200. Returns a SingleResult envelope. The data field is BusinessResponse.
curl -X POST "https://api.miridia.io/api/business" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"registeredName": "string",
"displayName": "string",
"phoneNumber": "string",
"website": "string",
"email": "name@example.com",
"registrationNumber": "string",
"requiresOrderIntegration": true,
"requiresOrderFulfillment": true,
"requiresAccountingIntegration": true,
"requiresDispatchBuilder": true,
"multipleBranches": true,
"address": {
"placeId": "string",
"name": "string",
"website": "https://example.com",
"fullAddress": "string",
"street": "string",
"suburb": "string",
"city": "string",
"country": "string",
"postcode": "string",
"unit": "string",
"number": "string",
"province": "string",
"latitude": 0,
"longitude": 0
},
"businessType": "Simple"
}'Get business
GET/api/business/my-business
returns current context for the logged in user.
Access. Send a bearer token or an API key. The caller needs the Settings view permission.
Response
200. Returns a SingleResult envelope. The data field is BusinessResponse.
curl -X GET "https://api.miridia.io/api/business/my-business" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Get metadata for business
GET/api/business/default-configuration
Access. Send a bearer token or an API key. Any signed-in member can call this operation.
Response
200. Returns a SingleResult envelope. The data field is BusinessDefaultSettings.
curl -X GET "https://api.miridia.io/api/business/default-configuration" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"geometryConfiguration": {
"weightType": "Kilogram",
"weightAlias": "string",
"lengthType": "Centimeter",
"lengthAlias": "string"
},
"billingConfiguration": {
"currencyCode": "Eur",
"currencyAlias": "string",
"countryCode": "Global",
"countryPhoneExtension": "string",
"taxType": "Sales",
"taxRate": 0
}
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Get business children
GET/api/business/{businessId}/children
Access. Send a bearer token or an API key. The caller needs the Settings view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
businessId | path | string (uuid) | Yes |
Response
200. Returns a PagedResult envelope. Each item in data is BusinessResponse.
curl -X GET "https://api.miridia.io/api/business/{businessId}/children" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"count": 0,
"totalCount": 0,
"page": 0,
"finalPage": 0,
"pageSize": 0,
"hasMore": true,
"statusCode": "OK",
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"registeredName": "string",
"registrationNumber": "string",
"displayName": "string",
"phoneNumber": "string",
"website": "string",
"email": "string",
"requiresOrderIntegration": true,
"requiresOrderFulfillment": true,
"requiresAccountingIntegration": true,
"requiresDispatchBuilder": true,
"billingAddress": {},
"shippingAddress": {},
"currentUser": {}
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Models
The operations on this page use these object types. Select a type to see its fields.
AddressResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
placeId | string | |
name | string | |
website | string | |
fullAddress | string | |
street | string | |
suburb | string | |
city | string | |
country | string | |
postcode | string | |
unit | string | |
number | string | |
province | string | |
latitude | number (double) | |
longitude | number (double) |
BillingDefaultSettings
| Field | Type | Description |
|---|---|---|
currencyCode | enum CurrencyCode | One of: Invalid, Eur, Usd, Gbp, Zar, Zmw. |
currencyAlias | string | |
countryCode | enum CountryCode | One of: Invalid, Global, FallbackZa, Be, De, Lu, Nl, Za, Zw, Gb, Us, Zm. |
countryPhoneExtension | string | |
taxType | enum TaxType | One of: None, Sales, Vat, Gst, Pst, Hst, Qst, Ist, Ust, Cst. |
taxRate | number (double) |
BusinessDefaultSettings
| Field | Type | Description |
|---|---|---|
geometryConfiguration | GeometryDefaultSettings | |
billingConfiguration | BillingDefaultSettings |
BusinessResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
registeredName | string | |
registrationNumber | string | |
displayName | string | |
phoneNumber | string | |
website | string | |
email | string | |
requiresOrderIntegration | boolean | |
requiresOrderFulfillment | boolean | |
requiresAccountingIntegration | boolean | |
requiresDispatchBuilder | boolean | |
billingAddress | AddressResponse | |
shippingAddress | AddressResponse | |
currentUser | PrimitiveUserResponse |
CreateAddressRequest
| Field | Type | Description |
|---|---|---|
placeId | string (string) | Limits: maximum 100 characters. |
name | string (string) | Limits: maximum 50 characters. |
website | string (uri) | Limits: maximum 100 characters. |
fullAddress | string | Limits: maximum 500 characters. |
street | string (string) | Limits: maximum 80 characters. |
suburb | string (string) | Limits: maximum 80 characters. |
city | string | Limits: maximum 80 characters. |
country | string | Limits: maximum 80 characters. |
postcode | string (postal-code) | Limits: maximum 15 characters. |
unit | string | Limits: maximum 10 characters. |
number | string (postal-code) | Limits: maximum 20 characters. |
province | string (string) | Limits: maximum 80 characters. |
latitude | number (double) | Limits: minimum -90, maximum 90. |
longitude | number (double) | Limits: minimum -180, maximum 180. |
GeometryDefaultSettings
| Field | Type | Description |
|---|---|---|
weightType | enum WeightType | One of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram. |
weightAlias | string | |
lengthType | enum LengthType | One of: Unknown, Centimeter, Meter, Inch, Foot. |
lengthAlias | string |
PrimitiveUserResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
displayName | string | |
firstName | string | |
lastName | string | |
email | string | |
phoneNumber | string |
UpdateAddressRequest
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
placeId | string (string) | Limits: maximum 100 characters. |
name | string (string) | Limits: maximum 50 characters. |
website | string (uri) | Limits: maximum 100 characters. |
fullAddress | string | Limits: maximum 500 characters. |
street | string (string) | Limits: maximum 80 characters. |
suburb | string (string) | Limits: maximum 80 characters. |
city | string | Limits: maximum 80 characters. |
country | string | Limits: maximum 80 characters. |
postcode | string (postal-code) | Limits: maximum 15 characters. |
unit | string | Limits: maximum 10 characters. |
number | string (postal-code) | Limits: maximum 20 characters. |
province | string (string) | Limits: maximum 80 characters. |
latitude | number (double) | Limits: minimum -90, maximum 90. |
longitude | number (double) | Limits: minimum -180, maximum 180. |