{
 "openapi": "3.1.0",
 "info": {
  "title": "Dock Appointments (Supply Chain)",
  "version": "20261030b",
  "description": "Carrier bookings of a door and a slot — a gate entry for a delivery: what is coming or going, against which order or notice, how many pallets — and when the truck actually arrived. A door cannot be booked twice for the same time."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "dock-appointments": {
    "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
     },
     "appointment_no": {
      "type": "string",
      "description": "Appointment no",
      "readOnly": true
     },
     "warehouse_id": {
      "type": "string",
      "format": "uuid",
      "description": "Warehouse",
      "readOnly": true
     },
     "door_id": {
      "type": "string",
      "format": "uuid",
      "description": "Door",
      "readOnly": true
     },
     "direction": {
      "type": "string",
      "description": "Direction",
      "enum": [
       "inbound",
       "outbound"
      ],
      "readOnly": true
     },
     "carrier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Carrier",
      "readOnly": true
     },
     "carrier_name": {
      "type": "string",
      "description": "Carrier (not on file)",
      "readOnly": true
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supplier",
      "readOnly": true
     },
     "po_id": {
      "type": "string",
      "format": "uuid",
      "description": "Purchase order",
      "readOnly": true
     },
     "asn_id": {
      "type": "string",
      "format": "uuid",
      "description": "Asn id",
      "readOnly": true
     },
     "shipment_id": {
      "type": "string",
      "format": "uuid",
      "description": "Shipment id",
      "readOnly": true
     },
     "reference": {
      "type": "string",
      "description": "Reference"
     },
     "pallets": {
      "type": "integer",
      "description": "Pallets"
     },
     "needs_reefer": {
      "type": "boolean",
      "description": "Needs a refrigerated door",
      "readOnly": true
     },
     "hazmat": {
      "type": "boolean",
      "description": "Hazardous goods",
      "readOnly": true
     },
     "trailer_no": {
      "type": "string",
      "description": "Trailer"
     },
     "driver_name": {
      "type": "string",
      "description": "Driver"
     },
     "driver_phone": {
      "type": "string",
      "description": "Driver phone"
     },
     "starts_at": {
      "type": "string",
      "format": "date-time",
      "description": "Slot starts",
      "readOnly": true
     },
     "ends_at": {
      "type": "string",
      "format": "date-time",
      "description": "Ends at",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "arrival": {
      "type": "string",
      "description": "Arrival",
      "readOnly": true
     },
     "late_minutes": {
      "type": "integer",
      "description": "Late minutes",
      "readOnly": true
     },
     "checked_in_at": {
      "type": "string",
      "format": "date-time",
      "description": "Checked in at",
      "readOnly": true
     },
     "at_door_at": {
      "type": "string",
      "format": "date-time",
      "description": "At door at",
      "readOnly": true
     },
     "checked_out_at": {
      "type": "string",
      "format": "date-time",
      "description": "Checked out at",
      "readOnly": true
     },
     "yard_movement_id": {
      "type": "string",
      "format": "uuid",
      "description": "Yard movement id",
      "readOnly": true
     },
     "booked_via": {
      "type": "string",
      "description": "Booked via",
      "readOnly": true
     },
     "portal_user_id": {
      "type": "string",
      "format": "uuid",
      "description": "Portal user id",
      "readOnly": true
     },
     "cancel_reason": {
      "type": "string",
      "description": "Cancel reason",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "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
     },
     "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/dock-appointments": {
   "get": {
    "summary": "list dock-appointments",
    "operationId": "list_dock_appointments_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create dock-appointments",
    "operationId": "create_dock_appointments_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/{id}": {
   "get": {
    "summary": "get dock-appointments",
    "operationId": "get_dock_appointments_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change dock-appointments",
    "operationId": "change_dock_appointments_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete dock-appointments",
    "operationId": "delete_dock_appointments_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/slots": {
   "get": {
    "summary": "Slots",
    "operationId": "action_dock_appointments_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/{id}/check-in": {
   "post": {
    "summary": "Check in",
    "operationId": "action_dock_appointments_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/{id}/to-door": {
   "post": {
    "summary": "To door",
    "operationId": "action_dock_appointments_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/{id}/check-out": {
   "post": {
    "summary": "Check out",
    "operationId": "action_dock_appointments_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/{id}/cancel": {
   "post": {
    "summary": "Cancel",
    "operationId": "action_dock_appointments_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/mark-no-shows": {
   "post": {
    "summary": "Mark no shows",
    "operationId": "action_dock_appointments_0_5",
    "description": "Body keys: warehouseId",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/dock-appointments/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_dock_appointments_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"
     }
    }
   }
  }
 }
}