Error Codes
A consolidated reference for the errors the Partners API returns, and how to resolve them.
The Partners API returns standard HTTP status codes (see API Requests → Status Codes). For 400 and 422 responses, the body also includes a machine-readable errors array with a numeric code, a message, and field-level error_detail.
{
"errors": [
{
"code": 42227,
"message": "Invalid Address Zip",
"error_detail": [{ "field": "zip", "message": "did not exist in the state provided" }]
}
]
}
Duplicate / conflicting requests — 409
A 409 Conflicting Request means your request conflicts with another recent request — most often a duplicate order submission. Because this is a pharmacy API, retrying a POST /orders call without checking can cause a duplicate fill.
{
"error": {
"error_code": 409,
"message": "Your request is conflicting with another recent request. Please make sure this request is not a duplicate and resend."
}
}
:::caution Make order submission idempotent
Before retrying a failed or timed-out POST /orders, query GET /orders for the patient to confirm the order was not already created. Treat a 409 as "already in flight," not as a transient error to blindly retry.
:::
Create order — 422 error codes
Returned by POST /orders when the request is well-formed but cannot be processed.
Patient
| Code | Meaning | Resolution |
|---|---|---|
| 42201 | Invalid Patient Email | Provide a valid email |
| 42202 | Invalid Patient First Name | Provide a valid first name |
| 42203 | Invalid Patient Last Name | Provide a valid last name |
| 42204 | Invalid Patient Phone | Provide a valid phone |
| 42205 | Invalid Patient Gender | Use a valid gender code (M, F, N) |
| 42206 | Invalid Patient Id | Verify the patient_id from the RX_RECEIVED webhook |
| 42208 | Invalid Patient Identity Documents | Controlled substance requires identity_documents |
Identity documents
| Code | Meaning | Resolution |
|---|---|---|
| 42216 | Invalid Document Type | One of DL, PP, MI, PR, SI, TI, OT |
| 42217 | Invalid Issuing Country | 2-character country code |
| 42218 | Invalid Issuing State | 2-character state code |
| 42219 | Invalid Document Number | Provide the document number |
| 42220 | Invalid Document Expiration Date | Must be future-dated, YYYY-MM-DD |
Address
| Code | Meaning | Resolution |
|---|---|---|
| 42221 | Invalid Address First Name | Provide a valid first name |
| 42222 | Invalid Address Last Name | Provide a valid last name |
| 42223 | Invalid Address Street1 | Provide a valid street address |
| 42225 | Invalid Address City | Provide a valid city |
| 42226 | Invalid Address State Abbreviation | Use a 2-character state code |
| 42227 | Invalid Address Zip | Zip malformed or not in the given state |
| 42230 | Invalid Address | Address could not be validated |
| 42231 | Invalid Address State | State cannot be shipped to (licensure) |
See Address Validation Errors for the full handling guide including suggested-address acceptance.
Items & prescription
| Code | Meaning | Resolution |
|---|---|---|
| 42241 | Invalid Item NDC | NDC not in your formulary |
| 42242 | Invalid Item Quantity | Quantity not offered for this product |
| 42243 | Invalid Item Prescriber Name | Provide a valid prescriber name |
| 42244 | Invalid Item Prescriber Phone | Provide a valid prescriber phone |
| 42245 | Invalid Item Prescriber Fax | Provide a valid prescriber fax |
| 42246 | Invalid Item GCN | GCN not in your formulary |
| 42247 | Invalid Item Package Size | Package size not offered |
| 42249 | Invalid Item Prescription Id | prescription_id invalid for partner-requested fills |
| 42250 | Invalid Item Prescription Refills | Prescription has no refills remaining |
| 42253 | Invalid Item Inventory | No remaining inventory |
| 42254 | Invalid Item SKU | SKU not in your formulary |
| 42255 | Invalid Item Prescription Quantity | Requested quantity exceeds the prescription |
| 42256 | Invalid Item Shipping Method | Shipping method not allowed for an item |
| 42257 | Invalid Item Prescription Expired | Prescription expired — a new Rx is required |
| 42258 | Invalid Item Prescription Ndc | Item does not match medication on prescription |
| 42259 | Invalid Item Written Quantity | Written quantity not offered for this product |
| 42260 | Invalid Item Product Selection | Item not in your formulary |
See Quantities and Package Sizes and Over-the-Counter Items.
Shipping & brand
| Code | Meaning | Resolution |
|---|---|---|
| 42291 | Invalid Shipping Method Id | Use an id from GET /shipping_methods |
| 42292 | Invalid Shipping Signature Confirmation | Not available for the selected method |
| 42293 | Invalid Shipping Method Carrier | Incompatible with PO Box / general delivery |
| 42294 | Invalid Shipping Label Format | Label format invalid |
| 42295 | Invalid Shipping Label Impermissible | Account not permitted to submit custom labels |
| 42296 | Invalid Shipping Label Data | Label data does not match the format |
| 42380 | Invalid Brand | brand_id did not match a brand for this account |
Order action — 422 error codes
Returned by POST /orders/{order_number}/partner_order_action_requests.
| Code | Meaning | Resolution |
|---|---|---|
| 42430 | Invalid Order Status Reason Id | Provide a valid reason_id (refund events) |
| 42461 | Invalid Order Action Event | event not one of the supported values |
| 42462 | Invalid Order Action Request | This order cannot be verified through the API |
| 42463 | Invalid Order for Action Request | The event cannot be applied to this order's state |
Related
- API Requests — HTTP status codes and request/response basics
- Address Validation Errors
- Integration Guide