Packaging Type Codes
Standardized packaging type codes for categorizing different types of packaging used in products and shipments following industry classification systems.
The ref_packaging_type_codes Object
Packaging type codes collection provides standardized categories for different types of packaging materials and containers used in product packaging and shipment operations.
| Field Name | Type | Description |
|---|---|---|
code | string | Primary key. Unique identifier code for the packaging type following industry standards (e.g., "AA", "AE", "AM"). |
user_created | object | User who created the packaging type record. Read-only. Links to directus_users. |
date_created | datetime | Timestamp in ISO 8601 when the packaging type record was created. Read-only. |
user_updated | object | User who last updated the packaging type record. Read-only. Links to directus_users. |
date_updated | datetime | Timestamp in ISO 8601 when the packaging type record was last updated. Read-only. |
packaging_type_name | string | Human-readable description of the packaging type. |
List Packaging Type Codes
List existing packaging type codes.
- REST
- GraphQL
GET /items/ref_packaging_type_codes
query {
ref_packaging_type_codes {
code
packaging_type_name
date_created
date_updated
}
}
Query Parameters
Supports all global query parameters.
Returns
An array of up to limit packaging type codes objects. If no items are available, data will be an empty array.
Retrieve a Packaging Type Code
Retrieve a specific packaging type code by code.
- REST
- GraphQL
GET /items/ref_packaging_type_codes/:code
query {
ref_packaging_type_codes_by_id(id: "packaging_type_code") {
code
packaging_type_name
user_created {
id
first_name
last_name
}
date_created
user_updated {
id
first_name
last_name
}
date_updated
}
}
Returns
Returns a packaging type codes object if a valid code was provided.
Create a Packaging Type Code
Create a new packaging type code.
- REST
- GraphQL
POST /items/ref_packaging_type_codes
{
"code": "CX",
"packaging_type_name": "Custom packaging type"
}
mutation {
create_ref_packaging_type_codes_item(data: {
code: "CX"
packaging_type_name: "Custom packaging type"
}) {
code
packaging_type_name
}
}
Query Parameters
Supports all global query parameters.
Request Body
A partial packaging type codes object.
Returns
Returns the packaging type codes object for the created packaging type code.
Update a Packaging Type Code
Update an existing packaging type code.
- REST
- GraphQL
PATCH /items/ref_packaging_type_codes/:code
{
"packaging_type_name": "Updated packaging type name"
}
mutation {
update_ref_packaging_type_codes_item(id: "packaging_type_code", data: {
packaging_type_name: "Updated packaging type name"
}) {
code
packaging_type_name
}
}
Query Parameters
Supports all global query parameters.
Request Body
A partial packaging type codes object.
Returns
Returns the packaging type codes object for the updated packaging type code.
Delete a Packaging Type Code
Delete an existing packaging type code.
- REST
- GraphQL
DELETE /items/ref_packaging_type_codes/:code
mutation {
delete_ref_packaging_type_codes_item(id: "packaging_type_code") {
code
}
}
Returns
Empty body.
Sample Data
| Code | Packaging Type Name |
|---|---|
| AA | Intermediate bulk container, rigid plastic |
| AE | Aerosol |
| AM | Ampoule |
| BA | Barrel |
| BBG | Bag in Box |