Schemas
AoeResponse
valueThe response value for the AOE question. Format depends on the question's response type:
- TEXT: Free-text string (max 75 characters).
- NUMBER: Numeric string value.
- DATE: ISO-8601 date string.
- PICK: Must match one of the question's defined pick list values.
Aoe
idAOE question identifier as defined in the test compendium.
One or more response values for this AOE question. Most questions require exactly one response; PICK-type questions with multi-select may have multiple.
responseTimeISO-8601 timestamp indicating when the AOE response was collected from the patient. Supports date-only (YYYY-MM-DD) or full datetime with optional fractional seconds (up to 9 digits) and timezone offset.
AddTestCommand
typeDiscriminator for command type.
testCodeLabcorp test code to add to the order. Must exist in the compendium.
Ask at Order Entry responses for this test code. Required when the test has mandatory AOE questions defined in the compendium.
CancelTestCommand
typeDiscriminator for command type.
testCodeLabcorp test code to cancel from the order. Must exist in the compendium; an unknown code fails the command.
reasonFree-text justification for the cancellation. Must not be empty or whitespace-only.
The limit is 150 bytes when UTF-8 encoded (not 150 characters): a multibyte character occupies more than one byte, so a string of <=150 code points can still exceed the cap. An over-cap reason fails request validation and returns 400 (the request is rejected; the reason is never truncated). The byte-length check is enforced in the service; the maxLength below is an approximate code-point bound for documentation only.
Command
| Variant | Matching Criteria |
|---|---|
| type = object · type="add-test" · requires: testCode | |
| type = object · type="cancel-test" · requires: testCode, reason |
typeDiscriminator for command type.
testCodeLabcorp test code to add to the order. Must exist in the compendium.
Ask at Order Entry responses for this test code. Required when the test has mandatory AOE questions defined in the compendium.
OrderModificationRequest
controlNumberUnique identifier for the original order to be modified.
accountNumberThe account number associated with the order. Must match the account number on the order record for the lookup to succeed.
sendingFacilityThe sending facility, also known as the Client Site Identifier (CSID). Must match an active service subscription in the partner's profile and the sendingFacility on the original order.
sendingApplicationVendor mnemonic. Must match an active service subscription in the partner's profile and the sendingApplication on the original order.
The ordering provider for the modification. Supplied by the caller and treated as authoritative once validated. ASCII characters expected excluding &, \, ^, and |.
Ordered list of modification commands to execute. Commands are processed sequentially and coalesced into batches of up to 40 test codes sharing one command type. Any mix of add-test and cancel-test commands is allowed.
CommandResult
typeThe kind of command this result describes.
testCodeThe Labcorp test code this command acted on.
statusOutcome status for this command.
-
submitted: The command was published to an internal system and accepted.
-
rejected: The service declined the command on its own merits — a validation failure (e.g. an unknown test code) or a business rule (e.g. a cancel against an accessioned order). Deterministic: re-sending the same command will be rejected again; correct the command.
-
failed: The command was sent to an internal system but the publish failed. This is an operational failure and may be retryable.
-
not-submitted: The command was never attempted because a prior command stopped processing. Re-submitting the request may let it through.
reasonHuman-readable explanation of the outcome. Present when status is rejected, failed, or not-submitted.
messagesInformational notes about a test that was added — for example, that the specimen is old and will be pulled from storage, or that the test was already on the order. A note is not a refusal or a problem to correct: the test was accepted and submitted, and no action is required for the addition to take effect. Treat these as notifications about how the addition will be handled.
Present only when status is submitted and at least one note applies. Absent
otherwise, including for any command that was not submitted: a note describes a test
that was actually added, so it is never returned for one that was not. Notes are
returned in the order they were produced, since a sequence of notes may read as one
explanation.
OrderModificationResponse
One result object per command, in the same order as the request. Each entry includes the command identifiers and its status.
ValidationIssue
idMachine-readable error identifier for programmatic handling.
pathJSONPath-relative expression identifying the field that caused the issue. An empty string indicates a request-level error not attributable to a specific field.
messageHuman-readable description of the issue.

