---
updatedAt: 2026-08-07T16:25:02.000Z
agentTools:
  projectIndex: https://docs.elationhealth.com/llms.txt
---

# Update Referral Order

Replace an existing referral order.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "AuthorizationForEnum": {
        "enum": [
          "Consult (One Visit Only)",
          "Procedure / Testing Only",
          "Referral For Treatment, includes Consult Visit"
        ],
        "type": "string"
      },
      "DocumentResolutionState": {
        "properties": {
          "created_date": {
            "description": "The datetime when this resolution state was created.",
            "format": "date-time",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "deleted_date": {
            "description": "The datetime when this resolution was deleted. Should never be null because we're providing the most updated resolution.",
            "format": "date-time",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "document": {
            "description": "Will be the same as the id of the lab order.",
            "format": "int64",
            "readOnly": true,
            "type": "integer"
          },
          "id": {
            "description": "Internal id to represent the resolution state.",
            "readOnly": true,
            "type": "integer"
          },
          "note": {
            "description": "Any note that was added to represent why an order was cancelled.",
            "maxLength": 200,
            "type": [
              "string",
              "null"
            ]
          },
          "resolving_document": {
            "description": "If the order is fulfilled will indicate the document referenced. For lab orders will usually be a report. Must be an integer ID or null.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StateEnum"
              }
            ],
            "description": "The resolution state of the order.\n\n* `outstanding` - Outstanding\n* `fulfilled` - Fulfilled\n* `cancelled` - Cancelled"
          }
        },
        "required": [
          "state"
        ],
        "type": "object"
      },
      "ICD10Code": {
        "properties": {
          "code": {
            "maxLength": 50,
            "type": "string"
          },
          "description": {
            "maxLength": 500,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "MedicalSpecialty": {
        "properties": {
          "abbreviation": {
            "maxLength": 20,
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/MedicalSpecialtyCategory"
          },
          "created_date": {
            "format": "date-time",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "practice_created": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "abbreviation",
          "name"
        ],
        "type": "object"
      },
      "MedicalSpecialtyCategory": {
        "properties": {
          "abbreviation": {
            "maxLength": 20,
            "type": [
              "string",
              "null"
            ]
          },
          "created_date": {
            "format": "date-time",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "NullEnum": {
        "type": "null"
      },
      "ReferralLetter": {
        "properties": {
          "body": {
            "description": "The body of the letter.",
            "type": "string"
          },
          "delivery_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "sign_date": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ReferralOrder": {
        "properties": {
          "auth_number": {
            "maxLength": 20,
            "type": [
              "string",
              "null"
            ]
          },
          "authorization_for": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AuthorizationForEnum"
              },
              {
                "$ref": "#/components/schemas/NullEnum"
              }
            ]
          },
          "authorization_for_short": {
            "type": [
              "string",
              "null"
            ]
          },
          "consultant_name": {
            "maxLength": 1024,
            "type": [
              "string",
              "null"
            ]
          },
          "date_for_reEval": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "icd10_codes": {
            "items": {
              "$ref": "#/components/schemas/ICD10Code"
            },
            "type": "array"
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "letter": {
            "deprecated": true,
            "description": "The letter associated with this referral order. Use referral_letter for the full nested letter object.",
            "format": "int64",
            "readOnly": true,
            "type": "integer"
          },
          "patient": {
            "format": "int64",
            "type": "integer"
          },
          "practice": {
            "format": "int64",
            "type": "integer"
          },
          "referral_letter": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReferralLetter"
              }
            ],
            "description": "Nested letter object with full details.",
            "readOnly": true
          },
          "resolution": {
            "$ref": "#/components/schemas/DocumentResolutionState"
          },
          "short_consultant_name": {
            "maxLength": 1024,
            "type": [
              "string",
              "null"
            ]
          },
          "sign_date": {
            "description": "The datetime when this referral order was signed.",
            "format": "date-time",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "signed_by": {
            "description": "The ID of the user who signed this referral order.",
            "readOnly": true,
            "type": "integer"
          },
          "specialty": {
            "$ref": "#/components/schemas/MedicalSpecialty"
          }
        },
        "required": [
          "auth_number",
          "consultant_name",
          "date_for_reEval",
          "patient",
          "practice",
          "short_consultant_name",
          "specialty"
        ],
        "type": "object"
      },
      "StateEnum": {
        "description": "* `outstanding` - Outstanding\n* `fulfilled` - Fulfilled\n* `cancelled` - Cancelled",
        "enum": [
          "outstanding",
          "fulfilled",
          "cancelled"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "flows": {
          "clientCredentials": {
            "scopes": {
              "act_as_user": "Impersonate a provider via X-On-Behalf-Of (combinable with apiv2 or system scopes)",
              "apiv2": "Full access to the API",
              "system/{resource_name}.read": "Read access to a specific resource",
              "system/{resource_name}.write": "Write access to a specific resource"
            },
            "tokenUrl": "/api/2.0/oauth2/token/"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "info": {
    "contact": {
      "name": "Elation Health",
      "url": "https://www.elationhealth.com/"
    },
    "description": "Elation Health API v2.0",
    "title": "Patient Document API",
    "version": "2.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/2.0/referral_orders/{id}/": {
      "put": {
        "description": "Replace an existing referral order.",
        "operationId": "referral_orders_update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralOrder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralOrder"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "oauth2": []
          }
        ],
        "summary": "Update Referral Order",
        "tags": [
          "Referrals"
        ],
        "x-el8-docs-category": "Patient Document API",
        "x-el8-docs-versions": [
          "2.1",
          "2.0"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Sandbox Server",
      "url": "https://sandbox.elationemr.com"
    },
    {
      "description": "Production Server",
      "url": "https://api.app.elationemr.com"
    }
  ],
  "x-readme": {
    "proxy-enabled": true
  }
}
```