{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/artashippinginc/json-schema/artashippinginc-self-ship-collection-schema.json",
  "title": "SelfShipCollection",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/artashippinginc-self-ship-collections-api-openapi.yml#/components/schemas/SelfShipCollection",
  "properties": {
    "closed_at": {
      "description": "A NaiveDatetime-formatted timestamp describing when the collection was closed",
      "type": [
        "string",
        "null"
      ],
      "x-struct": null,
      "x-validate": null
    },
    "collection_date": {
      "description": "The pickup date in ISO 8601 format (`YYYY-MM-DD`).",
      "format": "date",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "collection_time": {
      "description": "The pickup time in ISO 8601 format (`HH:MM:SS`).",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "created_at": {
      "description": "A NaiveDatetime-formatted timestamp describing when the resource was created with microsecond precision",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "id": {
      "description": "The ID of the self-ship collection in UUID format",
      "format": "uuid",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "location": {
      "description": "The pickup location details",
      "properties": {
        "address_line_1": {
          "description": "Street address",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "address_line_2": {
          "description": "Additional address info",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "city": {
          "description": "City",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "close_time": {
          "description": "Location closing time in ISO 8601 format (`HH:MM:SS`)",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "contact": {
          "description": "Contact at the pickup location",
          "properties": {
            "email_address": {
              "description": "Contact email address",
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "name": {
              "description": "Contact name",
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "phone_number": {
              "description": "Contact phone number",
              "type": "string",
              "x-struct": null,
              "x-validate": null
            }
          },
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "country": {
          "description": "Two-letter country code",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "package_location": {
          "description": "Where packages are located at the pickup location: the `front`, `rear`, or `side` of the building, or `none` when not specified. Always `none` for DHL collections.",
          "enum": [
            "front",
            "none",
            "rear",
            "side"
          ],
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "postal_code": {
          "description": "Postal code",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "region": {
          "description": "State or province code",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        }
      },
      "type": "object",
      "x-struct": null,
      "x-validate": null
    },
    "service": {
      "description": "Carrier service details",
      "properties": {
        "carrier": {
          "description": "Carrier identifier",
          "enum": [
            "fedex",
            "dhl"
          ],
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "code": {
          "description": "Service level code",
          "enum": [
            "express",
            "ground"
          ],
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "declared_value": {
          "description": "Declared value of the collected packages, as a decimal string. `null` when no declared value was provided.",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "declared_value_currency": {
          "description": "ISO 4217 three-letter code for `declared_value`. An empty string when no declared value was provided.",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "package_details": {
          "description": "The packages the collection was booked with, echoed back in the shape they were submitted. `null` for FedEx collections.",
          "properties": {
            "packages": {
              "description": "The packages included in the collection, one entry per package. Dimensions and weight are decimal strings, and every package shares the same `unit_of_measurement` and `weight_unit`.",
              "items": {
                "properties": {
                  "depth": {
                    "description": "Package depth",
                    "type": "string",
                    "x-struct": null,
                    "x-validate": null
                  },
                  "height": {
                    "description": "Package height",
                    "type": "string",
                    "x-struct": null,
                    "x-validate": null
                  },
                  "unit_of_measurement": {
                    "description": "Unit for `depth`, `height`, and `width`",
                    "enum": [
                      "in",
                      "cm"
                    ],
                    "type": "string",
                    "x-struct": null,
                    "x-validate": null
                  },
                  "weight": {
                    "description": "Package weight",
                    "type": "string",
                    "x-struct": null,
                    "x-validate": null
                  },
                  "weight_unit": {
                    "description": "Unit for `weight`",
                    "enum": [
                      "lb",
                      "kg"
                    ],
                    "type": "string",
                    "x-struct": null,
                    "x-validate": null
                  },
                  "width": {
                    "description": "Package width",
                    "type": "string",
                    "x-struct": null,
                    "x-validate": null
                  }
                },
                "type": "object",
                "x-struct": null,
                "x-validate": null
              },
              "type": "array",
              "x-struct": null,
              "x-validate": null
            }
          },
          "type": [
            "object",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "route": {
          "description": "Route type",
          "enum": [
            "domestic",
            "international"
          ],
          "type": "string",
          "x-struct": null,
          "x-validate": null
        }
      },
      "type": "object",
      "x-struct": null,
      "x-validate": null
    },
    "shortcode": {
      "description": "A human-readable identifier for the collection, formatted as the organization's shortcode followed by a hyphen and six alphanumeric characters",
      "pattern": "^[A-Z]+-[A-Z0-9]{6}$",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "status": {
      "description": "The current status of the collection",
      "enum": [
        "scheduled",
        "closed",
        "cancelled",
        "incomplete"
      ],
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "updated_at": {
      "description": "A NaiveDatetime-formatted timestamp describing when the resource was last updated with microsecond precision",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    }
  },
  "type": "object",
  "x-struct": "Elixir.DocsWeb.Schemas.Response.SelfShipCollection",
  "x-validate": null
}