Skip to content

invalid_order

The order is well formed but breaks an ordering rule. This includes compounding reasons, state restrictions, quantities, shipping options, practice contact details and placeholder values. Platform keys must send practiceId. All API keys must send prescriber.

Updated

HTTP status 422. An API key request can get this code.

The order is well formed but breaks an ordering rule. This includes compounding reasons, state restrictions, quantities, shipping options, practice contact details and placeholder values. Platform keys must send practiceId. All API keys must send prescriber.

Recovery

Read issues for the exact field and fix. With a platform key, send practiceId. With any API key, send prescriber with npi, firstName and lastName. The API checks the request schema first. Other missing required fields return 400 before these checks run. Send one order per pharmacy. Read compoundingReasons, quantities, restrictedStates and shippingOptions from GET /v1/medications/{medicationId} with the same key and mode. Choose an accepted reason, quantity and shipping option. For a state restriction, choose an eligible medication or pharmacy. Placeholders are refused. Send the patient's real name and the directions the clinician wrote. Do not send N/A, TBD, unknown or see notes. When the patient has no known allergies, send allergies: [], not NKDA. A placeholder address line 2, such as N/A or none, means no apartment and is not an error. An address line 2 of see notes, TBD or unknown is refused: send the apartment or suite, or omit line2. Correct the order before retrying.

Branch on code, not on the text of detail. Give Affinity the requestId when you report a problem.

All error codes

Send feedback

Don't include patient information.

Type to search…

↑↓ navigate ↵ select Esc close