Miridia
Portal
Logistics

Carriers

The carriers operations of the Core API.

Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.

MethodPathOperation
GET/api/carriersGet carriers
GET/api/carriers/lookupsGet carrier lookups
POST/api/carriers/configureConfigure carrier
GET/api/carriers/{carrierId}Get fulfillment provider
PATCH/api/carriers/{carrierId}Update carrier
DELETE/api/carriers/{carrierId}Delete configured carrier
GET/api/carriers/contactsGet fulfillment contacts
POST/api/carriers/contactsAdd 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

NameInTypeRequiredDescription
configuredquerybooleanNoDefault: false.

Response

200. Returns a PagedResult envelope. Each item in data is FulfillmentProviderResponse.

Request
curl -X GET "https://api.miridia.io/api/carriers" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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.

Request
curl -X GET "https://api.miridia.io/api/carriers/lookups" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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.

FieldTypeRequiredDescription
carrierIdinteger (int32)Yes
contactIdstring (uuid)Yes
defaultOptionbooleanNo
configuredValuesmap<string, string>No

Response

200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.

Request
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

NameInTypeRequiredDescription
carrierIdpathinteger (int32)Yes

Response

200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.

Request
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

NameInTypeRequiredDescription
carrierIdpathinteger (int32)Yes

Request body

Send JSON with the shape UpdateFulfillmentProviderRequest.

FieldTypeRequiredDescription
idinteger (int32)No
deliveryTypesFulfillmentDeliveryTypeModel[]No
serviceTypesFulfillmentProviderServiceTypeModel[]No
requirementTypesFulfillmentRequirementTypeModel[]No
serviceLevelsFulfillmentServiceLevelModel[]No
subTypesFulfillmentSubTypeModel[]No
typesFulfillmentTypeModel[]No

Response

200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.

Request
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

NameInTypeRequiredDescription
carrierIdpathstring (uuid)Yes

Response

200. Returns a SingleResult envelope. The data field is FulfillmentProviderResponse.

Request
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.

Request
curl -X GET "https://api.miridia.io/api/carriers/contacts" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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.

FieldTypeRequiredDescription
idstring (uuid)No
customerIdstring (uuid)No
titlestringYesLimits: maximum 50 characters.
descriptionstringNoLimits: maximum 1000 characters.
firstNamestringYesLimits: maximum 50 characters.
lastNamestringNoLimits: maximum 50 characters.
emailstring (email)Yes
phoneNumberstring (tel)No
mobileNumberstring (tel)No

Response

200. Returns a SingleResult envelope. The data field is ContactResponse.

Request
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"
}'
Response
{
  "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

NameInTypeRequiredDescription
contactIdpathstring (uuid)Yes

Request body

Send JSON with the shape UpdateContactCommand.

FieldTypeRequiredDescription
idstring (uuid)No
customerIdstring (uuid)No
titlestringYesLimits: maximum 50 characters.
descriptionstringNoLimits: maximum 1000 characters.
firstNamestringYesLimits: maximum 50 characters.
lastNamestringNoLimits: maximum 50 characters.
emailstring (email)Yes
phoneNumberstring (tel)No
mobileNumberstring (tel)No

Response

200. Returns a SingleResult envelope. The data field is ContactResponse.

Request
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"
}'
Response
{
  "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

NameInTypeRequiredDescription
contactIdpathstring (uuid)Yes

Response

200. Returns a SingleResult envelope. The data field is boolean.

Request
curl -X DELETE "https://api.miridia.io/api/carriers/contacts/{contactId}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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
FieldTypeDescription
idstring (uuid)
defaultOptionboolean
accountNumberstring
contactEmailstring
dateOfExpirystring (date-time)
contactPersonPrimitiveUserResponse
ContactResponse
FieldTypeDescription
idstring (uuid)
titlestring
descriptionstring
firstNamestring
lastNamestring
emailstring
phoneNumberstring
mobileNumberstring
FulfillmentDeliveryTypeModel

Represents the delivery type. Perhaps the company only does warehouse to warehouse deliveries etc...

FieldTypeDescription
idinteger (int32)
valuestring
FulfillmentProviderLookupWrapperResponse
FulfillmentProviderResponse
FieldTypeDescription
idinteger (int32)
titlestring
descriptionstring
logoUrlstring
infoUrlstring
requiresUserAccountboolean
isThirdPartyProviderboolean
autoConfigureboolean
fulfillmentTypesstring[]
configuredProviderBusinessFulfillmentProviderResponse
integrationTypeenum IntegrationTypeOne of: Unknown, OneClick, Plugin, Bespoke, ApiKey.
actionLinkstring
fieldsMetadataConfigurationValue[]
requiredFieldsmap<string, string>
configuredValuesmap<string, string>
deliveryTypesFulfillmentDeliveryTypeModel[]
serviceTypesFulfillmentProviderServiceTypeModel[]
requirementTypesFulfillmentRequirementTypeModel[]
serviceLevelsFulfillmentServiceLevelModel[]
subTypesFulfillmentSubTypeModel[]
typesFulfillmentTypeModel[]
FulfillmentProviderServiceTypeModel

This model represents the different services which the fulfillment provider provides.

FieldTypeDescription
idinteger (int32)
valuestring
FulfillmentRequirementTypeModel
FieldTypeDescription
idinteger (int32)
valuestring
FulfillmentServiceLevelModel
FieldTypeDescription
idinteger (int32)
valuestring
descriptionstring
FulfillmentSubTypeModel
FieldTypeDescription
idinteger (int32)
fulfillmentTypeIdinteger (int32)
valuestring
FulfillmentTypeModel
FieldTypeDescription
idinteger (int32)
valuestring
MetadataConfigurationValue
FieldTypeDescription
keystring
titlestring
isVisiblebooleanIf this is true, it should be surfaced to the dashboard...
isRequiredbooleanIf the user needs to provide this value when configuring the integration.
isSecretbooleanIf 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.
prefixMaskstring
suffixMaskstring
validationRegexstringIf there is regex to be applied to validate the value, it should be set here....
validationMessagestring
valuestringThe stored configuration value
PrimitiveUserResponse
FieldTypeDescription
idstring (uuid)
displayNamestring
firstNamestring
lastNamestring
emailstring
phoneNumberstring