Carriers
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| GET | /api/carriers | Get carriers |
| GET | /api/carriers/lookups | Get carrier lookups |
| POST | /api/carriers/configure | Configure carrier |
| GET | /api/carriers/{carrierId} | Get fulfillment provider |
| PATCH | /api/carriers/{carrierId} | Update carrier |
| DELETE | /api/carriers/{carrierId} | Delete configured carrier |
| GET | /api/carriers/contacts | Get fulfillment contacts |
| POST | /api/carriers/contacts | Add fulfillment contact |
| PUT | /api/carriers/contacts/{contactId} | Update fulfillment contact |
| DELETE | /api/carriers/contacts/{contactId} | Delete fulfillment contact |
Get carriers
GET/api/carriers
Returns the fulfillment provider catalog. Pass ?configured=true to return only the providers already configured for the current business instead of the full catalog.
Access. Send a bearer token or an API key. The caller needs the Integrations view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
configured | query | boolean | No | Default: false. |
Response
200. Returns a PagedResult envelope. Each item in data is FulfillmentProviderResponse.
curl -X GET "https://api.miridia.io/api/carriers" \
-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": 0,
"title": "string",
"description": "string",
"logoUrl": "string",
"infoUrl": "string",
"requiresUserAccount": true,
"isThirdPartyProvider": true,
"autoConfigure": true,
"fulfillmentTypes": [
"string"
],
"configuredProvider": {},
"integrationType": "OneClick",
"actionLink": "string",
"fields": [
{}
],
"requiredFields": {
"key": "string"
},
"configuredValues": {
"key": "string"
},
"deliveryTypes": [
{}
],
"serviceTypes": [
{}
],
"requirementTypes": [
{}
],
"serviceLevels": [
{}
],
"subTypes": [
{}
],
"types": [
{}
]
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Get carrier lookups
GET/api/carriers/lookups
Access. Send a bearer token or an API key. The caller needs the Integrations view permission.
Response
200. Returns a SingleResult envelope. The data field is FulfillmentProviderLookupWrapperResponse.
curl -X GET "https://api.miridia.io/api/carriers/lookups" \
-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": {
"deliveryTypes": [
{}
],
"serviceTypes": [
{}
],
"requirementTypes": [
{}
],
"serviceLevels": [
{}
],
"subTypes": [
{}
],
"types": [
{}
]
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Configure carrier
POST/api/carriers/configure
Access. Send a bearer token or an API key. The caller needs the Integrations modify permission.
Request body
Send JSON with the shape FulfillmentProviderConfigureRequest.
| Field | Type | Required | Description |
|---|---|---|---|
carrierId | integer (int32) | Yes | |
contactId | string (uuid) | Yes | |
defaultOption | boolean | No | |
configuredValues | map<string, string> | No |
Response
200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.
curl -X POST "https://api.miridia.io/api/carriers/configure" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"carrierId": 0,
"contactId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"defaultOption": true,
"configuredValues": {
"key": "string"
}
}'Get fulfillment provider
GET/api/carriers/{carrierId}
Access. Send a bearer token or an API key. The caller needs the Integrations view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
carrierId | path | integer (int32) | Yes |
Response
200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.
curl -X GET "https://api.miridia.io/api/carriers/{carrierId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Update carrier
PATCH/api/carriers/{carrierId}
Access. Send a bearer token or an API key. The caller needs the Integrations modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
carrierId | path | integer (int32) | Yes |
Request body
Send JSON with the shape UpdateFulfillmentProviderRequest.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer (int32) | No | |
deliveryTypes | FulfillmentDeliveryTypeModel[] | No | |
serviceTypes | FulfillmentProviderServiceTypeModel[] | No | |
requirementTypes | FulfillmentRequirementTypeModel[] | No | |
serviceLevels | FulfillmentServiceLevelModel[] | No | |
subTypes | FulfillmentSubTypeModel[] | No | |
types | FulfillmentTypeModel[] | No |
Response
200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.
curl -X PATCH "https://api.miridia.io/api/carriers/{carrierId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"id": 0,
"deliveryTypes": [
{
"id": 0,
"value": "string"
}
],
"serviceTypes": [
{
"id": 0,
"value": "string"
}
],
"requirementTypes": [
{
"id": 0,
"value": "string"
}
],
"serviceLevels": [
{
"id": 0,
"value": "string",
"description": "string"
}
],
"subTypes": [
{
"id": 0,
"fulfillmentTypeId": 0,
"value": "string"
}
],
"types": [
{
"id": 0,
"value": "string"
}
]
}'Delete configured carrier
DELETE/api/carriers/{carrierId}
Access. Send a bearer token or an API key. The caller needs the Integrations modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
carrierId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.
curl -X DELETE "https://api.miridia.io/api/carriers/{carrierId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"Get fulfillment contacts
GET/api/carriers/contacts
Access. Send a bearer token or an API key. The caller needs the Integrations view permission.
Response
200. Returns a PagedResult envelope. Each item in data is ContactResponse.
curl -X GET "https://api.miridia.io/api/carriers/contacts" \
-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",
"title": "string",
"description": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"mobileNumber": "string"
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Add fulfillment contact
POST/api/carriers/contacts
Access. Send a bearer token or an API key. The caller needs the Integrations modify permission.
Request body
Send JSON with the shape CreateContactCommand.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | No | |
customerId | string (uuid) | No | |
title | string | Yes | Limits: maximum 50 characters. |
description | string | No | Limits: maximum 1000 characters. |
firstName | string | Yes | Limits: maximum 50 characters. |
lastName | string | No | Limits: maximum 50 characters. |
email | string (email) | Yes | |
phoneNumber | string (tel) | No | |
mobileNumber | string (tel) | No |
Response
200. Returns a SingleResult envelope. The data field is ContactResponse.
curl -X POST "https://api.miridia.io/api/carriers/contacts" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"firstName": "string",
"lastName": "string",
"email": "name@example.com",
"phoneNumber": "string",
"mobileNumber": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"mobileNumber": "string"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Update fulfillment contact
PUT/api/carriers/contacts/{contactId}
Access. Send a bearer token or an API key. The caller needs the Integrations modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contactId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateContactCommand.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | No | |
customerId | string (uuid) | No | |
title | string | Yes | Limits: maximum 50 characters. |
description | string | No | Limits: maximum 1000 characters. |
firstName | string | Yes | Limits: maximum 50 characters. |
lastName | string | No | Limits: maximum 50 characters. |
email | string (email) | Yes | |
phoneNumber | string (tel) | No | |
mobileNumber | string (tel) | No |
Response
200. Returns a SingleResult envelope. The data field is ContactResponse.
curl -X PUT "https://api.miridia.io/api/carriers/contacts/{contactId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"firstName": "string",
"lastName": "string",
"email": "name@example.com",
"phoneNumber": "string",
"mobileNumber": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"mobileNumber": "string"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Delete fulfillment contact
DELETE/api/carriers/contacts/{contactId}
Access. Send a bearer token or an API key. The caller needs the Integrations delete permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contactId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is boolean.
curl -X DELETE "https://api.miridia.io/api/carriers/contacts/{contactId}" \
-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": true,
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Models
The operations on this page use these object types. Select a type to see its fields.
BusinessFulfillmentProviderResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
defaultOption | boolean | |
accountNumber | string | |
contactEmail | string | |
dateOfExpiry | string (date-time) | |
contactPerson | PrimitiveUserResponse |
ContactResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
title | string | |
description | string | |
firstName | string | |
lastName | string | |
email | string | |
phoneNumber | string | |
mobileNumber | string |
FulfillmentDeliveryTypeModel
Represents the delivery type. Perhaps the company only does warehouse to warehouse deliveries etc...
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
value | string |
FulfillmentProviderLookupWrapperResponse
| Field | Type | Description |
|---|---|---|
deliveryTypes | FulfillmentDeliveryTypeModel[] | |
serviceTypes | FulfillmentProviderServiceTypeModel[] | |
requirementTypes | FulfillmentRequirementTypeModel[] | |
serviceLevels | FulfillmentServiceLevelModel[] | |
subTypes | FulfillmentSubTypeModel[] | |
types | FulfillmentTypeModel[] |
FulfillmentProviderResponse
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
title | string | |
description | string | |
logoUrl | string | |
infoUrl | string | |
requiresUserAccount | boolean | |
isThirdPartyProvider | boolean | |
autoConfigure | boolean | |
fulfillmentTypes | string[] | |
configuredProvider | BusinessFulfillmentProviderResponse | |
integrationType | enum IntegrationType | One of: Unknown, OneClick, Plugin, Bespoke, ApiKey. |
actionLink | string | |
fields | MetadataConfigurationValue[] | |
requiredFields | map<string, string> | |
configuredValues | map<string, string> | |
deliveryTypes | FulfillmentDeliveryTypeModel[] | |
serviceTypes | FulfillmentProviderServiceTypeModel[] | |
requirementTypes | FulfillmentRequirementTypeModel[] | |
serviceLevels | FulfillmentServiceLevelModel[] | |
subTypes | FulfillmentSubTypeModel[] | |
types | FulfillmentTypeModel[] |
FulfillmentProviderServiceTypeModel
This model represents the different services which the fulfillment provider provides.
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
value | string |
FulfillmentRequirementTypeModel
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
value | string |
FulfillmentServiceLevelModel
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
value | string | |
description | string |
FulfillmentSubTypeModel
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
fulfillmentTypeId | integer (int32) | |
value | string |
FulfillmentTypeModel
| Field | Type | Description |
|---|---|---|
id | integer (int32) | |
value | string |
MetadataConfigurationValue
| Field | Type | Description |
|---|---|---|
key | string | |
title | string | |
isVisible | boolean | If this is true, it should be surfaced to the dashboard... |
isRequired | boolean | If the user needs to provide this value when configuring the integration. |
isSecret | boolean | If this is true, it should be returned as a marked value in the API response. We will show the first 5 characters and last 3 characters and remove the rest for security purposes. |
prefixMask | string | |
suffixMask | string | |
validationRegex | string | If there is regex to be applied to validate the value, it should be set here.... |
validationMessage | string | |
value | string | The stored configuration value |
PrimitiveUserResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
displayName | string | |
firstName | string | |
lastName | string | |
email | string | |
phoneNumber | string |