REST API Scenarios

The following scenarios provide examples of how to create orders with the REST API. Each scenario includes a sample payload and a description of the order being created.

These examples are not entirely comprehensive. However, since the REST API is a wrapper on top of the GraphQL API, the easiest way to determine the correct request body is to review the GraphQL schema. The GraphQL playground will display the correct enums and specific personalCancerHistory request objects.

Sample Request PayloadSample Request Payload

Female Patient with personal history of breast cancer, family history of prostate cancer, ordering BRACANALYSIS with MyRisk Update. Also includes an insurance policy.

Show Example
{ 
  "order": {
    "requisitionNumber": "SOME_REQUISITION_NUMBER",
    "patient": {
      "firstName": "Jane",
      "lastName": "Doe",
      "dob": "1970-01-01",
      "genderCode": "FEMALE",
      "address": {
        "street": "320 Wakara Way",
        "city": "Salt Lake City",
        "stateCode": "UT",
        "postalCode": "84104"
      },
      "mobilePhoneNumber": "801-584-3700",
      "emailAddress": "test@myriad.com"
    },
    "products": [
      {
        "product": "BRACANALYSIS",
        "updateTo": "MYRISK" 
      }
    ],
    "clinical": {
      "personalCancerHistory": [
        {
          "breastDCIS": {
            "diagnosisAge": 25,
            "currentlyBeingTreated": false,
            "diagnosisDetails": {
              "cancerSeverity": "METASTATIC",
              "tripleNegative": false,
              "left": false,
              "right": true,
              "her2Status": "POSITIVE",
              "erStatus": "NEGATIVE",
              "prStatus": "NEGATIVE",
              "previousChemotherapy": false
            }
          }
        }
      ],
      "familyCancerHistory": [
        {
          "relationshipTypeCode": "FATHER",
          "cancerHistory": [{
            "cancerSiteCode": "PROSTATE",
            "diagnosisAge": {
              "range": {
                "lowerAge": 60,
                "upperAge": 70
              }
            }
          }]
        }
      ],
      "ancestry": [
        "HISPANIC_LATINO",
        "BLACK_AFRICAN"
      ]
    },
    "billing": {
      "insurance": {
        "insurancePolicies": [{
          "relationshipToInsuredCode": "SELF",
          "payerName": "My Health Insurance",
          "groupNumber": "123456",
          "policyNumber": "1234567890",
          "policyHolderFirstName": "Jane",
          "policyHolderLastName": "Doe",
          "policyHolderDob": "1970-01-01"
        }]
      }
    },
    "providerAccounts": [
      {
        "organization": {
          "identifiers": {
            "use": "OFFICIAL",
            "type": "XX",
            "value": "SOME_ORGANIZATION_ID_PROVIDED_MYRIAD"
          }
        },
        "provider": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "NPI",
              "value": "SOME_NPI"
            }
          ],
          "firstName": "John",
          "lastName": "Smith"
        },
        "role": "ORDERING",
        "location": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "FI",
              "value": "SOME_ORDERING_PROVIDER_ID_PROVIDED_MYRIAD"
            }
          ]
        }
      }
    ],
    "specimens": [
      {
        "germline": {
          "collectionDate": "2024-01-01"
        }
      }
    ],
    "notes": [
      "this is a test note"
    ]
  }
}

Unaffected Female Patient with family history of breast cancer ordering BRACANALYSIS with MyRisk Update. Also includes a request for TC and RiskScore. No insurance.

Show Example
{ 
  "order": {
    "requisitionNumber": "SOME_REQUISITION_NUMBER",
    "patient": {
      "firstName": "Jane",
      "lastName": "Doe",
      "dob": "1970-01-01",
      "genderCode": "FEMALE",
      "address": {
        "street": "320 Wakara Way",
        "city": "Salt Lake City",
        "stateCode": "UT",
        "postalCode": "84104"
      },
      "mobilePhoneNumber": "801-584-3700",
      "emailAddress": "test@myriad.com"
    },
    "products": [
      {
        "product": "BRACANALYSIS",
        "updateTo": "MYRISK" 
      }
    ],
    "clinical": {
      "familyCancerHistory": [{
        "relationshipTypeCode": "MOTHER",
        "cancerHistory": [{
          "cancerSiteCode": "BREAST_DCIS",
          "diagnosisAge": {
            "age": 60
          }
        }]
      }],
      "ancestry": [
        "NONE_SPECIFIED"
      ],
      "cancerRisk": {
        "breastCancerRisk": {
          "heightIn": 66,
          "weightLbs": 150,
          "ageOfMenarche": 12,
          "liveBirth": {
            "ageAtFirstBirth": 24
          },
          "menopause": {
            "stageCode": "POST_MENOPAUSAL",
            "ageOfOnset": 45
          },
          "hormoneReplacementTherapy": {
            "use": true,
            "typeCode": "COMBINED",
            "status": {
              "currentUser": {
                "yearsInUse": 2,
                "monthsInUse": 2,
                "yearsRemaining": 5,
                "monthsRemaining": 3
              }
            }
          },
          "femaleRelatives": {
            "numberOfDaughters": 2,
            "numberOfSisters": 0,
            "numberOfMaternalAunts": 2,
            "numberOfPaternalAunts": 4
          },
          "breastBiopsyResultCodes": [
            "LCIS",
            "HYPERPLASIA"
          ],
          "mammographicDensity": {
            "assessed": true,
            "biradsDensityCode": "HETEROGENEOUSLY_DENSE"
          }
        },
        "riskAnalysisOption": "INCLUDE_TC_AND_RISKSCORE"
      }
    },
    "providerAccounts": [
      {
        "organization": {
          "identifiers": {
            "use": "OFFICIAL",
            "type": "XX",
            "value": "SOME_ORGANIZATION_ID_PROVIDED_MYRIAD"
          }
        },
        "provider": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "NPI",
              "value": "SOME_NPI"
            }
          ],
          "firstName": "John",
          "lastName": "Smith"
        },
        "role": "ORDERING",
        "location": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "FI",
              "value": "SOME_ORDERING_PROVIDER_ID_PROVIDED_MYRIAD"
            }
          ]
        }
      }
    ],
    "specimens": [
      {
        "germline": {
          "collectionDate": "2024-01-01"
        }
      }
    ],
    "notes": [
      "this is a test note"
    ]
  }
}

Male Patient with personal history of prostate cancer ordering PROLARIS. Billing provided by institution.

Show Example
{ 
  "order": {
    "requisitionNumber": "SOME_REQUISITION_NUMBER",
    "patient": {
      "firstName": "John",
      "lastName": "Doe",
      "dob": "1960-01-01",
      "genderCode": "MALE",
      "address": {
        "street": "320 Wakara Way",
        "city": "Salt Lake City",
        "stateCode": "UT",
        "postalCode": "84104"
      },
      "mobilePhoneNumber": "801-584-3700",
      "emailAddress": "test@myriad.com"
    },
    "products": [
      {
        "product": "PROLARIS"
      }
    ],
    "clinical": {
      "personalCancerHistory": [{
        "prostate": {
          "diagnosisAge": 60,
          "currentlyBeingTreated": false,
          "diagnosisDetails": {
            "gleasonScore": "THREE_PLUS_THREE_EQUAL_SIX",
            "metastatic": false,
            "nccnHighRisk": false,
            "intraductalHistory": false,
            "preBiopsyPSA": 1.25,
            "biopsyCoresBiopsied": 2,
            "biopsyCoresPositive": 1,
            "preBiopsyTreatment": false
          }
        }
      }],
      "ancestry": [
        "NONE_SPECIFIED"
      ],
      "cancerRisk": {
        "breastCancerRisk": {
          "heightIn": 66,
          "weightLbs": 150,
          "ageOfMenarche": 12,
          "liveBirth": {
            "ageAtFirstBirth": 24
          },
          "menopause": {
            "stageCode": "POST_MENOPAUSAL",
            "ageOfOnset": 45
          },
          "hormoneReplacementTherapy": {
            "use": true,
            "typeCode": "COMBINED",
            "status": {
              "currentUser": {
                "yearsInUse": 2,
                "monthsInUse": 2,
                "yearsRemaining": 5,
                "monthsRemaining": 3
              }
            }
          },
          "femaleRelatives": {
            "numberOfDaughters": 2,
            "numberOfSisters": 0,
            "numberOfMaternalAunts": 2,
            "numberOfPaternalAunts": 4
          },
          "breastBiopsyResultCodes": [
            "LCIS",
            "HYPERPLASIA"
          ],
          "mammographicDensity": {
            "assessed": true,
            "biradsDensityCode": "HETEROGENEOUSLY_DENSE"
          }
        },
        "riskAnalysisOption": "INCLUDE_TC_AND_RISKSCORE"
      }
    },
    "billing": {
      "institution": {
        "institutionalAccountNumber": "12345"
      }
    },
    "providerAccounts": [
      {
        "organization": {
          "identifiers": {
            "use": "OFFICIAL",
            "type": "XX",
            "value": "SOME_ORGANIZATION_ID_PROVIDED_MYRIAD"
          }
        },
        "provider": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "NPI",
              "value": "SOME_NPI"
            }
          ],
          "firstName": "John",
          "lastName": "Smith"
        },
        "role": "ORDERING",
        "location": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "FI",
              "value": "SOME_ORDERING_PROVIDER_ID_PROVIDED_MYRIAD"
            }
          ]
        }
      }
    ],
    "specimens": [
      {
        "germline": {
          "collectionDate": "2024-01-01"
        }
      }
    ],
    "notes": [
      "this is a test note"
    ]
  }
}

Male Patient with personal history of colon cancer, colon polyps, family history of endometrial cancer ordering Colaris.

Show Example
{ 
  "order": {
    "requisitionNumber": "SOME_REQUISITION_NUMBER",
    "patient": {
      "firstName": "John",
      "lastName": "Doe",
      "dob": "1960-01-01",
      "genderCode": "MALE",
      "address": {
        "street": "320 Wakara Way",
        "city": "Salt Lake City",
        "stateCode": "UT",
        "postalCode": "84104"
      },
      "mobilePhoneNumber": "801-584-3700",
      "emailAddress": "test@myriad.com"
    },
    "products": [
      {
        "product": "COLARIS"
      }
    ],
    "clinical": {
      "personalCancerHistory": [{
        "colon": {
          "diagnosisAge": 60,
          "currentlyBeingTreated": false,
          "diagnosisDetails": {
            "msiHistologyCodes": [
              "MUCINOUS"
            ],
            "msiResultCode": "LOW",
            "ihcResultCode": "MLH1"
          }
        },
        "colorectalPolyps": {
          "diagnosisAge": 50,
          "currentlyBeingTreated": false,
          "diagnosisDetails": {
            "adenomaRangeCode": "RANGE_100_TO_999"
          }
        }
      }],
      "familyCancerHistory": [{
        "relationshipTypeCode": "MOTHER",
        "cancerHistory": [{
          "cancerSiteCode": "ENDOMETRIAL",
          "diagnosisAge": {
            "age": 60
          }
        }]
      }],
      "ancestry": [
        "NONE_SPECIFIED"
      ],
      "cancerRisk": {
        "breastCancerRisk": {
          "heightIn": 66,
          "weightLbs": 150,
          "ageOfMenarche": 12,
          "liveBirth": {
            "ageAtFirstBirth": 24
          },
          "menopause": {
            "stageCode": "POST_MENOPAUSAL",
            "ageOfOnset": 45
          },
          "hormoneReplacementTherapy": {
            "use": true,
            "typeCode": "COMBINED",
            "status": {
              "currentUser": {
                "yearsInUse": 2,
                "monthsInUse": 2,
                "yearsRemaining": 5,
                "monthsRemaining": 3
              }
            }
          },
          "femaleRelatives": {
            "numberOfDaughters": 2,
            "numberOfSisters": 0,
            "numberOfMaternalAunts": 2,
            "numberOfPaternalAunts": 4
          },
          "breastBiopsyResultCodes": [
            "LCIS",
            "HYPERPLASIA"
          ],
          "mammographicDensity": {
            "assessed": true,
            "biradsDensityCode": "HETEROGENEOUSLY_DENSE"
          }
        },
        "riskAnalysisOption": "INCLUDE_TC_AND_RISKSCORE"
      }
    },
    "billing": {
      "institution": {
        "institutionalAccountNumber": "12345"
      }
    },
    "providerAccounts": [
      {
        "organization": {
          "identifiers": {
            "use": "OFFICIAL",
            "type": "XX",
            "value": "SOME_ORGANIZATION_ID_PROVIDED_MYRIAD"
          }
        },
        "provider": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "NPI",
              "value": "SOME_NPI"
            }
          ],
          "firstName": "John",
          "lastName": "Smith"
        },
        "role": "ORDERING",
        "location": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "FI",
              "value": "SOME_ORDERING_PROVIDER_ID_PROVIDED_MYRIAD"
            }
          ]
        }
      }
    ],
    "specimens": [
      {
        "germline": {
          "collectionDate": "2024-01-01"
        }
      }
    ],
    "notes": [
      "this is a test note"
    ]
  }
}

Female Patient with Ovarian Cancer ordering MyChoice.

Show Example
{ 
  "order": {
    "requisitionNumber": "SOME_REQUISITION_NUMBER",
    "patient": {
      "firstName": "John",
      "lastName": "Doe",
      "dob": "1960-01-01",
      "genderCode": "MALE",
      "address": {
        "street": "320 Wakara Way",
        "city": "Salt Lake City",
        "stateCode": "UT",
        "postalCode": "84104"
      },
      "mobilePhoneNumber": "801-584-3700",
      "emailAddress": "test@myriad.com"
    },
    "products": [
      {
        "product": "MYCHOICE"
      }
    ],
    "clinical": {
      "boneMarrowTransplantRecipient": "AUTOLOGOUS",
      "personalCancerHistory": [{
        "ovarian": {
          "diagnosisAge": 40,
          "currentlyBeingTreated": true,
          "diagnosisDetails": {
            "left": true,
            "right": false,
            "additionalHistopathology": "Some String"
          }
        }
      }],
      "familyCancerHistory": [{
        "relationshipTypeCode": "MOTHER",
        "cancerHistory": [{
          "cancerSiteCode": "OVARIAN",
          "diagnosisAge": {
            "age": 60
          }
        }]
      }],
      "ancestry": [
        "ASHKENAZI_JEWISH"
      ]
    },
    "billing": {
      "institution": {
        "institutionalAccountNumber": "12345"
      }
    },
    "specimens": [{
      "tumor": {
        "collectionDate": "2024-01-01",
        "hospitalizationCode": "HOSPITAL_INPATIENT",
        "hospitalDischargeDate": "2024-01-01",
        "tumorStage": "I",
        "tissueTypeCode": "OVARY",
        "specimenIds": ["Your ID"],
        "currentTreatment": ["NOT_STARTED"],
        "previousTreatment": ["CHEMOTHERAPY"],
        "tumorClinicalStatus": ["REFRACTORY"],
        "tumorHistory": {
          "ovarian": {
            "diagnosisAge": 40,
            "currentlyBeingTreated": true,
            "diagnosisDetails": {
              "left": true,
              "right": false,
              "additionalHistopathology": "Some String"
            }
          }
        }
      }
    }],
    "providerAccounts": [
      {
        "organization": {
          "identifiers": {
            "use": "OFFICIAL",
            "type": "XX",
            "value": "SOME_ORGANIZATION_ID_PROVIDED_MYRIAD"
          }
        },
        "provider": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "NPI",
              "value": "SOME_NPI"
            }
          ],
          "firstName": "John",
          "lastName": "Smith"
        },
        "role": "ORDERING",
        "location": {
          "identifiers": [
            {
              "use": "OFFICIAL",
              "type": "FI",
              "value": "SOME_ORDERING_PROVIDER_ID_PROVIDED_MYRIAD"
            }
          ]
        }
      }
    ],
    "notes": [
      "this is a test note"
    ]
  }
}