Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/plantasur-dev/ship-quote/llms.txt

Use this file to discover all available pages before exploring further.

Pallet types define the named size-and-weight categories that the Ship Quote rate engine uses to classify an incoming shipment. Each agency configures its own set of pallet types — for example, Cayco uses seven tiers from MINI (150 kg) through SUPER (1 200 kg), while Tecum defines formats such as QUARTER PALLET and FULL PALLET. When a quote request arrives, the engine matches the item’s dimensions and weight against these constraints to select the correct base price row from the agency’s rate table.
Pallet types are agency-scoped. Each PalletType document is linked to a single agency via agencyId. The rate engine queries only the pallet types that belong to the agency being evaluated, then walks the list in order of increasing maxWeight to find the smallest tier that fits the shipment.

POST /api/v1/pallets

Create a new pallet type for an agency.

Request body

agencyId
string
required
MongoDB ObjectId of the agency this pallet type belongs to. Must reference an existing agency document.
name
string
required
Human-readable label for the tier (max 60 characters). Examples from live data: "MINI", "CUARTO", "PLUMA", "QUARTER PALLET", "FULL PALLET", "EURO PALLET".
constraints
object
required
Physical limits that define this tier. The rate engine uses maxWeight to select the tier; dimension fields default to 0 when omitted (meaning no dimensional limit is enforced).

Response — 201 Created

id
string
MongoDB ObjectId of the newly created pallet type.
agencyId
string
ObjectId of the owning agency.
name
string
Pallet type label as stored.
constraints
object
The physical limits that were saved.
createdAt
string
ISO 8601 timestamp of creation.
updatedAt
string
ISO 8601 timestamp of last update.

Examples

curl -X POST http://localhost:3000/api/v1/pallets \
  -H "Content-Type: application/json" \
  -d '{
    "agencyId": "507f1f77bcf86cd799439011",
    "name": "CUARTO",
    "constraints": {
      "maxWeight": 300,
      "maxLength": 120,
      "maxWidth": 100,
      "maxHeight": 80
    }
  }'

GET /api/v1/pallets

Return all pallet types across all agencies. Returns 404 when no documents exist in the collection.

Response — 200 OK

An array of pallet type objects. Each object has the same shape as the POST 201 response above.

Example

curl -X GET http://localhost:3000/api/v1/pallets

GET /api/v1/pallets/:palletTypeId

Retrieve the details of a single pallet type by its MongoDB ObjectId.

Path parameters

palletTypeId
string
required
MongoDB ObjectId of the pallet type to retrieve.

Response — 200 OK

A single pallet type object (same shape as the POST 201 response).

Error responses

StatusCondition
404 Not FoundNo pallet type document exists with the given palletTypeId.

Example

curl -X GET http://localhost:3000/api/v1/pallets/684a2f9cbe1234567890abcd

DELETE /api/v1/pallets/:palletTypeId

Permanently delete a pallet type. The rate engine will no longer be able to classify shipments that were previously matched against this tier, so remove with care.

Path parameters

palletTypeId
string
required
MongoDB ObjectId of the pallet type to delete.

Response — 204 No Content

Empty body on success. This endpoint always returns 204 — it does not return 404 if the given ID does not exist.
Deleting a pallet type does not cascade to existing rate documents that reference it. If you remove a tier that is actively used by the rate table of an agency, that agency’s pricing will be incomplete for shipments that fall into the deleted tier.

Example

curl -X DELETE http://localhost:3000/api/v1/pallets/684a2f9cbe1234567890abcd

Bootstrap reference — real pallet types

The following tables show the pallet tiers loaded by the built-in seed data for Cayco and Tecum, giving you concrete examples of the constraint values in production use.

Cayco pallet types

NameMax Weight (kg)Max Length (cm)Max Width (cm)Max Height (cm)
MINI15012010060
CUARTO30012010080
PLUMA30012080220
MEDIO450120100180
LIGERO600120100220
COMPLETO800120100180
SUPER1 200120100220

Tecum pallet types

NameMax Weight (kg)Max Length (cm)Max Width (cm)Max Height (cm)
MINI QUARTER PALLET150120100080
MINI QUARTER PALLET (compact)1506080120
QUARTER PALLET300120120110
SUPER EURO LIGHT PALLET30012080220
EXTRA LIGHT PALLET450120100220
HALF PALLET600120100160
EURO PALLET90012080220
FULL PALLET1 200120100220

Build docs developers (and LLMs) love