Miridia
Portal
Logistics

Dimension presets

The dimension presets operations of the Core API.

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

MethodPathOperation
GET/api/dimensions/presetsGet package sizes
POST/api/dimensions/presetsCreate dimension preset
GET/api/dimensions/templatesGet package size templates
GET/api/dimensions/get-default-dimensionsGet default dimensions
GET/api/dimensions/get-default-presetGet default package size
PUT/api/dimensions/presets/{presetId}Update dimension preset
DELETE/api/dimensions/presets/{presetId}Delete package size

Get package sizes

GET/api/dimensions/presets

Returns the PackageSizes for a business defined in the integration settings

Access. Send a bearer token or an API key. The caller needs the Products view permission.

Response

200. Returns a JSON array. Each item is DimensionPresetResponse.

Request
curl -X GET "https://api.miridia.io/api/dimensions/presets" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendor": "string",
    "fulfillmentType": "Package",
    "title": "string",
    "weight": 0,
    "length": 0,
    "width": 0,
    "height": 0,
    "defaultOption": true,
    "lengthType": "Centimeter",
    "weightType": "Kilogram",
    "countryCode": "Global",
    "dimensionType": {
      "weightType": "Kilogram",
      "lengthType": "Centimeter",
      "lengthSymbol": "string",
      "weightSymbol": "string"
    }
  }
]

Create dimension preset

POST/api/dimensions/presets

Create a new package size preset

Access. Send a bearer token or an API key. The caller needs the Products modify permission.

Request body

Send JSON with the shape CreateDimensionPresetCommand.

FieldTypeRequiredDescription
fulfillmentTypeenum FulfillmentTypeNoOne of: Unknown, Package, Pallet, Container, Miscellaneous.
titlestringNoLimits: maximum 200 characters.
weightnumber (double)No
widthnumber (double)No
lengthnumber (double)No
heightnumber (double)No
defaultOptionbooleanNo
lengthTypeenum LengthTypeNoOne of: Unknown, Centimeter, Meter, Inch, Foot.
weightTypeenum WeightTypeNoOne of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram.
countryCodeenum CountryCodeNoOne of: Invalid, Global, FallbackZa, Be, De, Lu, Nl, Za, Zw, Gb, Us, Zm.

Response

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

Request
curl -X POST "https://api.miridia.io/api/dimensions/presets" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "fulfillmentType": "Package",
  "title": "string",
  "weight": 0,
  "width": 0,
  "length": 0,
  "height": 0,
  "defaultOption": true,
  "lengthType": "Centimeter",
  "weightType": "Kilogram",
  "countryCode": "Global"
}'
Response
{
  "message": "string",
  "messages": [
    {
      "title": "string",
      "message": "string",
      "level": "Standard",
      "icon": "SyncAlert",
      "code": "string"
    }
  ],
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendor": "string",
    "fulfillmentType": "Package",
    "title": "string",
    "weight": 0,
    "length": 0,
    "width": 0,
    "height": 0,
    "defaultOption": true,
    "lengthType": "Centimeter",
    "weightType": "Kilogram",
    "countryCode": "Global",
    "dimensionType": {
      "weightType": "Kilogram",
      "lengthType": "Centimeter",
      "lengthSymbol": "string",
      "weightSymbol": "string"
    }
  },
  "statusCode": "OK",
  "canRead": true,
  "canEdit": true,
  "canDelete": true
}

Get package size templates

GET/api/dimensions/templates

Returns the PackageSize templates for the country (without business ids)

Access. Send a bearer token or an API key. The caller needs the Products view permission.

Response

200. Returns a JSON array. Each item is DimensionPresetResponse.

Request
curl -X GET "https://api.miridia.io/api/dimensions/templates" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendor": "string",
    "fulfillmentType": "Package",
    "title": "string",
    "weight": 0,
    "length": 0,
    "width": 0,
    "height": 0,
    "defaultOption": true,
    "lengthType": "Centimeter",
    "weightType": "Kilogram",
    "countryCode": "Global",
    "dimensionType": {
      "weightType": "Kilogram",
      "lengthType": "Centimeter",
      "lengthSymbol": "string",
      "weightSymbol": "string"
    }
  }
]

Get default dimensions

GET/api/dimensions/get-default-dimensions

Access. Send a bearer token or an API key. The caller needs the Products view permission.

Response

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

Request
curl -X GET "https://api.miridia.io/api/dimensions/get-default-dimensions" \
  -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": {
    "weightType": "Kilogram",
    "lengthType": "Centimeter",
    "lengthSymbol": "string",
    "weightSymbol": "string"
  },
  "statusCode": "OK",
  "canRead": true,
  "canEdit": true,
  "canDelete": true
}

Get default package size

GET/api/dimensions/get-default-preset

Access. Send a bearer token or an API key. The caller needs the Products view permission.

Response

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

Request
curl -X GET "https://api.miridia.io/api/dimensions/get-default-preset" \
  -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": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendor": "string",
    "fulfillmentType": "Package",
    "title": "string",
    "weight": 0,
    "length": 0,
    "width": 0,
    "height": 0,
    "defaultOption": true,
    "lengthType": "Centimeter",
    "weightType": "Kilogram",
    "countryCode": "Global",
    "dimensionType": {
      "weightType": "Kilogram",
      "lengthType": "Centimeter",
      "lengthSymbol": "string",
      "weightSymbol": "string"
    }
  },
  "statusCode": "OK",
  "canRead": true,
  "canEdit": true,
  "canDelete": true
}

Update dimension preset

PUT/api/dimensions/presets/{presetId}

Update an existing package size preset

Access. Send a bearer token or an API key. The caller needs the Products modify permission.

Parameters

NameInTypeRequiredDescription
presetIdpathstring (uuid)YesThe dimension preset id

Request body

Send JSON with the shape UpdateDimensionPresetCommand.

FieldTypeRequiredDescription
fulfillmentTypeenum FulfillmentTypeNoOne of: Unknown, Package, Pallet, Container, Miscellaneous.
titlestringNoLimits: maximum 200 characters.
weightnumber (double)No
widthnumber (double)No
lengthnumber (double)No
heightnumber (double)No
isDefaultbooleanNoPromotes/demotes the default flag. null/omitted leaves the default flag untouched; true promotes this preset (demoting the current default in the same transaction) unless it is already the default; false is a no-op unless this preset is the current default, in which case the request is rejected. There is no way to reach a no-default state.
lengthTypeenum LengthTypeNoOne of: Unknown, Centimeter, Meter, Inch, Foot.
weightTypeenum WeightTypeNoOne of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram.
countryCodeenum CountryCodeNoOne of: Invalid, Global, FallbackZa, Be, De, Lu, Nl, Za, Zw, Gb, Us, Zm.

Response

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

Request
curl -X PUT "https://api.miridia.io/api/dimensions/presets/{presetId}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "fulfillmentType": "Package",
  "title": "string",
  "weight": 0,
  "width": 0,
  "length": 0,
  "height": 0,
  "isDefault": true,
  "lengthType": "Centimeter",
  "weightType": "Kilogram",
  "countryCode": "Global"
}'
Response
{
  "message": "string",
  "messages": [
    {
      "title": "string",
      "message": "string",
      "level": "Standard",
      "icon": "SyncAlert",
      "code": "string"
    }
  ],
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vendor": "string",
    "fulfillmentType": "Package",
    "title": "string",
    "weight": 0,
    "length": 0,
    "width": 0,
    "height": 0,
    "defaultOption": true,
    "lengthType": "Centimeter",
    "weightType": "Kilogram",
    "countryCode": "Global",
    "dimensionType": {
      "weightType": "Kilogram",
      "lengthType": "Centimeter",
      "lengthSymbol": "string",
      "weightSymbol": "string"
    }
  },
  "statusCode": "OK",
  "canRead": true,
  "canEdit": true,
  "canDelete": true
}

Delete package size

DELETE/api/dimensions/presets/{presetId}

Access. Send a bearer token or an API key. The caller needs the Products delete permission.

Parameters

NameInTypeRequiredDescription
presetIdpathstring (uuid)Yes

Response

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

Request
curl -X DELETE "https://api.miridia.io/api/dimensions/presets/{presetId}" \
  -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.

DimensionPresetResponse
FieldTypeDescription
idstring (uuid)
vendorstringLimits: maximum 100 characters.
fulfillmentTypeenum FulfillmentTypeOne of: Unknown, Package, Pallet, Container, Miscellaneous.
titlestringLimits: maximum 200 characters.
weightnumber (double)The weight property acts as a limit for this specific box size.
lengthnumber (double)
widthnumber (double)
heightnumber (double)
defaultOptionbooleanevery business can have one package size preset set as the default option
lengthTypeenum LengthTypeOne of: Unknown, Centimeter, Meter, Inch, Foot.
weightTypeenum WeightTypeOne of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram.
countryCodeenum CountryCodeOne of: Invalid, Global, FallbackZa, Be, De, Lu, Nl, Za, Zw, Gb, Us, Zm.
dimensionTypeGeometryFieldSymbol
GeometryFieldSymbol
FieldTypeDescription
weightTypeenum WeightTypeOne of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram.
lengthTypeenum LengthTypeOne of: Unknown, Centimeter, Meter, Inch, Foot.
lengthSymbolstring
weightSymbolstring