# Create Refill Request Request a refill for an existing medication order that has been shipped or delivered. Eligibility Requirements: - Medication must have been shipped or delivered - Refills must be authorized on the original prescription - No pending refill request already exists The refill request will create a new prescription and medication order automatically. Endpoint: POST /api/external/refill-request Version: 1.0.0 Security: ApiKeyAuth ## Request fields (application/json): - `medication_request_id` (string, required) UUID of the medication request to refill Example: "880e8400-e29b-41d4-a716-446655440003" - `shipment_group_id` (string) Optional shipment group ID for grouping multiple refills Example: "optional-group-id" ## Response 200 fields (application/json): - `success` (boolean) Example: true - `message` (string) Example: "Refill request was created successfully." - `data` (object) - `data.refill_request_id` (string) Unique identifier for the refill request Example: "990e8400-e29b-41d4-a716-446655440004" - `data.medication_order_id` (string) Unique identifier for the new medication order Example: "aa0e8400-e29b-41d4-a716-446655440005" ## Response 400 fields (application/json): - `success` (boolean) - `error` (object) - `error.message` (string) Human-readable error message Example: "Validation error" - `error.details` (object) Additional error details Example: {} ## Response 401 fields (application/json): - `success` (boolean) - `error` (object) - `error.message` (string) Human-readable error message Example: "Validation error" - `error.details` (object) Additional error details Example: {}