{
 "openapi": "3.1.0",
 "info": {
  "title": "Forwarding Shipments (Supply Chain)",
  "version": "20261030b",
  "description": "A house bill under a master bill. A forwarder makes its money on the spread between what it buys at and what it sells at, so buy and sell are two columns rather than one."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "forwarding-shipments": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "shipment_no": {
      "type": "string",
      "description": "Shipment no",
      "readOnly": true
     },
     "job_type": {
      "type": "string",
      "description": "Job type",
      "enum": [
       "export",
       "import",
       "cross_trade",
       "domestic",
       "transit"
      ]
     },
     "mode": {
      "type": "string",
      "description": "Mode",
      "enum": [
       "ocean",
       "air",
       "road",
       "rail",
       "multimodal",
       "courier"
      ]
     },
     "service_type": {
      "type": "string",
      "description": "Service"
     },
     "shipper_account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Shipper (customer)"
     },
     "shipper_supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Shipper (supplier)"
     },
     "shipper_name": {
      "type": "string",
      "description": "Shipper name"
     },
     "consignee_account_id": {
      "type": "string",
      "format": "uuid",
      "description": "Consignee (customer)"
     },
     "consignee_name": {
      "type": "string",
      "description": "Consignee name"
     },
     "notify_party": {
      "type": "string",
      "description": "Notify party"
     },
     "carrier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Carrier"
     },
     "vessel_name": {
      "type": "string",
      "description": "Vessel"
     },
     "voyage_no": {
      "type": "string",
      "description": "Voyage"
     },
     "flight_no": {
      "type": "string",
      "description": "Flight"
     },
     "house_bill_no": {
      "type": "string",
      "description": "House bill number"
     },
     "master_bill_no": {
      "type": "string",
      "description": "Master bill number"
     },
     "booking_no": {
      "type": "string",
      "description": "Booking number"
     },
     "consolidation_id": {
      "type": "string",
      "format": "uuid",
      "description": "Consolidated under"
     },
     "origin_place_id": {
      "type": "string",
      "format": "uuid",
      "description": "Origin"
     },
     "port_of_loading": {
      "type": "string",
      "description": "Port of loading"
     },
     "port_of_discharge": {
      "type": "string",
      "description": "Port of discharge"
     },
     "place_of_receipt": {
      "type": "string",
      "description": "Place of receipt"
     },
     "place_of_delivery": {
      "type": "string",
      "description": "Place of delivery"
     },
     "destination_place_id": {
      "type": "string",
      "format": "uuid",
      "description": "Destination"
     },
     "etd": {
      "type": "string",
      "format": "date",
      "description": "Estimated departure"
     },
     "atd": {
      "type": "string",
      "format": "date",
      "description": "Actual departure"
     },
     "eta": {
      "type": "string",
      "format": "date",
      "description": "Estimated arrival"
     },
     "ata": {
      "type": "string",
      "format": "date",
      "description": "Actual arrival"
     },
     "cargo_ready_on": {
      "type": "string",
      "format": "date",
      "description": "Cargo ready"
     },
     "cutoff_at": {
      "type": "string",
      "format": "date-time",
      "description": "Cutoff"
     },
     "free_time_days": {
      "type": "integer",
      "description": "Free days"
     },
     "incoterm": {
      "type": "string",
      "description": "Incoterm"
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "goods_description": {
      "type": "string",
      "description": "Goods"
     },
     "marks_and_numbers": {
      "type": "string",
      "description": "Marks and numbers"
     },
     "gross_weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Gross weight (kg)"
     },
     "chargeable_weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Chargeable weight (kg)"
     },
     "volume_cbm": {
      "type": "string",
      "format": "decimal",
      "description": "Volume (m3)"
     },
     "package_count": {
      "type": "integer",
      "description": "Packages"
     },
     "container_count": {
      "type": "integer",
      "description": "Container count",
      "readOnly": true
     },
     "declared_value": {
      "type": "string",
      "format": "decimal",
      "description": "Declared value"
     },
     "insurance_value": {
      "type": "string",
      "format": "decimal",
      "description": "Insured value"
     },
     "total_buy": {
      "type": "string",
      "format": "decimal",
      "description": "Total buy",
      "readOnly": true
     },
     "total_sell": {
      "type": "string",
      "format": "decimal",
      "description": "Total sell",
      "readOnly": true
     },
     "margin": {
      "type": "string",
      "format": "decimal",
      "description": "Margin",
      "readOnly": true
     },
     "is_hazardous": {
      "type": "boolean",
      "description": "Dangerous goods"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "operator_user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Operator"
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/forwarding-shipments": {
   "get": {
    "summary": "list forwarding-shipments",
    "operationId": "list_forwarding_shipments_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create forwarding-shipments",
    "operationId": "create_forwarding_shipments_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/forwarding-shipments/{id}": {
   "get": {
    "summary": "get forwarding-shipments",
    "operationId": "get_forwarding_shipments_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change forwarding-shipments",
    "operationId": "change_forwarding_shipments_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete forwarding-shipments",
    "operationId": "delete_forwarding_shipments_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/forwarding-shipments/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_forwarding_shipments_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/forwarding-shipments/{id}/profitability": {
   "get": {
    "summary": "Profitability",
    "operationId": "action_forwarding_shipments_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/forwarding-shipments/{parentId}/containers": {
   "get": {
    "summary": "Containers",
    "operationId": "action_forwarding_shipments_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Containers",
    "operationId": "action_forwarding_shipments_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/forwarding-shipments/{parentId}/containers/{lineId}": {
   "put": {
    "summary": "Containers",
    "operationId": "action_forwarding_shipments_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Containers",
    "operationId": "action_forwarding_shipments_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/forwarding-shipments/{parentId}/charges": {
   "get": {
    "summary": "Charges",
    "operationId": "action_forwarding_shipments_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Charges",
    "operationId": "action_forwarding_shipments_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/forwarding-shipments/{parentId}/charges/{lineId}": {
   "put": {
    "summary": "Charges",
    "operationId": "action_forwarding_shipments_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Charges",
    "operationId": "action_forwarding_shipments_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}