Carrier requests

Whether a label, void, manifest, tender or bill-of-lading request succeeded, failed or is Uncertain, and what may run next.

Request with "decision": "carrier" and one of these operations: LabelCreate, LabelVoid, ManifestSubmit, TenderRegister, BOLCreate.

Clauses applied

  • carrier.freeze: A carrier operation freezes its RequestKey and digest.
  • carrier.reprint: Reprint does not buy another label.
  • carrier.uncertain: A lost or timed-out response is Uncertain, not a confirmed failure. The original request identity is reused only when the verified connector supports idempotency; otherwise query/reconcile before another potentially billable creation.
  • carrier.retry: Known rejection may be retried according to the connector contract; timeout/unknown result requires lookup or reconciliation, not a new billable create.
  • carrier.reissue: Confirmed void or supported reconciliation precedes reissue; voiding a label does not itself change stock.

Evidence questions

carrier_outcome@1

This is the carrier's reply, error or lookup result for one request. Did the carrier carry out the requested operation?

AnswerMeaning
performedYes. The carrier created what was requested (label, void, manifest, tender or bill of lading), or reports that it already exists for this request.
not_performedNo. The carrier refused or never processed the request and nothing was created, or a lookup finds no such request.
not_establishedUnknown. The evidence does not settle it, such as a timeout, dropped connection, gateway error or ambiguous reply after the request was sent.

Examples

A label request whose reply was lost

{
  "decision": "carrier",
  "proposal": {
    "operation": "LabelCreate",
    "key": "CR-0413",
    "digest": "c7e1f0"
  },
  "connector": {
    "carrier": "UPS",
    "idempotency": "unverified",
    "lookup": "verified"
  },
  "requests": [
    {
      "key": "CR-0412",
      "digest": "c7e1f0",
      "operation": "LabelCreate",
      "attempts": [
        {
          "kind": "request",
          "transport": "sent",
          "at": "2026-10-02T14:02:11Z",
          "evidence": "POST /api/shipments/v2409/ship: read timed out after 30000 ms; request body fully written"
        }
      ]
    }
  ]
}

Response from the rules with no model loaded, so every question abstains.

{
  "verdict": "reconcile",
  "state": "Uncertain",
  "next": {
    "action": "lookup",
    "text": "Look up request CR-0412 with the carrier and record what it finds before anything billable runs again."
  },
  "questions": [
    {
      "ask": "requests/0/attempts/0",
      "question": "carrier_outcome@1",
      "status": "model_unavailable",
      "evidence": [
        "/requests/0/attempts/0/evidence"
      ]
    }
  ]
}

Download the request

The lookup finds the label already bought

{
  "decision": "carrier",
  "proposal": {
    "operation": "LabelCreate",
    "key": "CR-0413",
    "digest": "c7e1f0"
  },
  "connector": {
    "carrier": "UPS",
    "idempotency": "unverified",
    "lookup": "verified"
  },
  "requests": [
    {
      "key": "CR-0412",
      "digest": "c7e1f0",
      "operation": "LabelCreate",
      "attempts": [
        {
          "kind": "request",
          "transport": "sent",
          "at": "2026-10-02T14:02:11Z",
          "evidence": "POST /api/shipments/v2409/ship: read timed out after 30000 ms; request body fully written"
        },
        {
          "kind": "lookup",
          "transport": "response_received",
          "http_status": 200,
          "at": "2026-10-02T14:05:40Z",
          "evidence": "{\"shipmentResults\":[{\"customerReference\":\"CR-0412\",\"trackingNumber\":\"1Z9F21470345992311\",\"status\":\"Label Created\",\"createdAt\":\"2026-10-02T14:02:12Z\"}]}"
        }
      ]
    }
  ]
}

Response from the rules with no model loaded, so every question abstains.

{
  "verdict": "reconcile",
  "state": "Uncertain",
  "next": {
    "action": "lookup",
    "text": "Look up request CR-0412 with the carrier and record what it finds before anything billable runs again."
  },
  "questions": [
    {
      "ask": "requests/0/attempts/0",
      "question": "carrier_outcome@1",
      "status": "model_unavailable",
      "evidence": [
        "/requests/0/attempts/0/evidence"
      ]
    },
    {
      "ask": "requests/0/attempts/1",
      "question": "carrier_outcome@1",
      "status": "model_unavailable",
      "evidence": [
        "/requests/0/attempts/1/evidence"
      ]
    }
  ]
}

Download the request

Request schema

{
  "type": "object",
  "required": [
    "decision",
    "proposal",
    "connector"
  ],
  "additionalProperties": false,
  "properties": {
    "decision": {
      "const": "carrier"
    },
    "proposal": {
      "type": "object",
      "required": [
        "operation",
        "key",
        "digest"
      ],
      "additionalProperties": false,
      "properties": {
        "operation": {
          "type": "string",
          "enum": [
            "LabelCreate",
            "LabelVoid",
            "ManifestSubmit",
            "TenderRegister",
            "BOLCreate"
          ]
        },
        "key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "digest": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "replaces": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "voids": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      }
    },
    "connector": {
      "type": "object",
      "required": [
        "idempotency",
        "lookup"
      ],
      "additionalProperties": false,
      "properties": {
        "carrier": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "idempotency": {
          "type": "string",
          "enum": [
            "verified",
            "unverified",
            "unsupported"
          ]
        },
        "lookup": {
          "type": "string",
          "enum": [
            "verified",
            "none"
          ]
        }
      }
    },
    "requests": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "key",
          "digest",
          "operation",
          "attempts"
        ],
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "digest": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "operation": {
            "type": "string",
            "enum": [
              "LabelCreate",
              "LabelVoid",
              "ManifestSubmit",
              "TenderRegister",
              "BOLCreate"
            ]
          },
          "remote_request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "voids": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "kind",
                "transport"
              ],
              "additionalProperties": false,
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "request",
                    "lookup"
                  ]
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "transport": {
                  "type": "string",
                  "enum": [
                    "not_sent",
                    "sent",
                    "response_received"
                  ]
                },
                "http_status": {
                  "type": "integer",
                  "minimum": 100,
                  "maximum": 599
                },
                "document_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "evidence": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4000
                }
              }
            },
            "maxItems": 50
          }
        }
      },
      "maxItems": 50
    }
  }
}