Dimension presets
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| GET | /api/dimensions/presets | Get package sizes |
| POST | /api/dimensions/presets | Create dimension preset |
| GET | /api/dimensions/templates | Get package size templates |
| GET | /api/dimensions/get-default-dimensions | Get default dimensions |
| GET | /api/dimensions/get-default-preset | Get 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.
curl -X GET "https://api.miridia.io/api/dimensions/presets" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"[
{
"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.
| Field | Type | Required | Description |
|---|---|---|---|
fulfillmentType | enum FulfillmentType | No | One of: Unknown, Package, Pallet, Container, Miscellaneous. |
title | string | No | Limits: maximum 200 characters. |
weight | number (double) | No | |
width | number (double) | No | |
length | number (double) | No | |
height | number (double) | No | |
defaultOption | boolean | No | |
lengthType | enum LengthType | No | One of: Unknown, Centimeter, Meter, Inch, Foot. |
weightType | enum WeightType | No | One of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram. |
countryCode | enum CountryCode | No | One of: Invalid, Global, FallbackZa, Be, De, Lu, Nl, Za, Zw, Gb, Us, Zm. |
Response
200. Returns a SingleResult envelope. The data field is DimensionPresetResponse.
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"
}'{
"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.
curl -X GET "https://api.miridia.io/api/dimensions/templates" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"[
{
"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.
curl -X GET "https://api.miridia.io/api/dimensions/get-default-dimensions" \
-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": {
"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.
curl -X GET "https://api.miridia.io/api/dimensions/get-default-preset" \
-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": {
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
presetId | path | string (uuid) | Yes | The dimension preset id |
Request body
Send JSON with the shape UpdateDimensionPresetCommand.
| Field | Type | Required | Description |
|---|---|---|---|
fulfillmentType | enum FulfillmentType | No | One of: Unknown, Package, Pallet, Container, Miscellaneous. |
title | string | No | Limits: maximum 200 characters. |
weight | number (double) | No | |
width | number (double) | No | |
length | number (double) | No | |
height | number (double) | No | |
isDefault | boolean | No | Promotes/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. |
lengthType | enum LengthType | No | One of: Unknown, Centimeter, Meter, Inch, Foot. |
weightType | enum WeightType | No | One of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram. |
countryCode | enum CountryCode | No | One of: Invalid, Global, FallbackZa, Be, De, Lu, Nl, Za, Zw, Gb, Us, Zm. |
Response
200. Returns a SingleResult envelope. The data field is DimensionPresetResponse.
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"
}'{
"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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
presetId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is boolean.
curl -X DELETE "https://api.miridia.io/api/dimensions/presets/{presetId}" \
-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.
DimensionPresetResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
vendor | string | Limits: maximum 100 characters. |
fulfillmentType | enum FulfillmentType | One of: Unknown, Package, Pallet, Container, Miscellaneous. |
title | string | Limits: maximum 200 characters. |
weight | number (double) | The weight property acts as a limit for this specific box size. |
length | number (double) | |
width | number (double) | |
height | number (double) | |
defaultOption | boolean | every business can have one package size preset set as the default option |
lengthType | enum LengthType | One of: Unknown, Centimeter, Meter, Inch, Foot. |
weightType | enum WeightType | One of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram. |
countryCode | enum CountryCode | One of: Invalid, Global, FallbackZa, Be, De, Lu, Nl, Za, Zw, Gb, Us, Zm. |
dimensionType | GeometryFieldSymbol |
GeometryFieldSymbol
| Field | Type | Description |
|---|---|---|
weightType | enum WeightType | One of: Unknown, Kilogram, Tonne, Pound, Stone, UsTon, ImperialTon, Gram. |
lengthType | enum LengthType | One of: Unknown, Centimeter, Meter, Inch, Foot. |
lengthSymbol | string | |
weightSymbol | string |