{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"HOST URLs","description":"Partner Pharmacy API"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PHIL Transfer Rx Intake API Documentation"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The purpose of this API is to intake a prescription transfer request from an originating pharmacy seeking to transfer a prescription to Phil. This API accepts one script per request in the standard NCPDP SCRIPT ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["RxTransferResponse"]}," XML format."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the API is called, it performs key field and schema validations and provides an immediate request acceptance or reject status (with relevant error messages)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the transfer script is received we follow the standard pharmacy transfer-in process to validate remaining refills, confirm the originating pharmacy details, and process the transfer."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NOTE:"]}," In NCPDP terminology, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["RxTransferResponse"]}," is used because the originating pharmacy sends the full prescription data as its response to the patient's request to transfer to Phil. This is the standard NCPDP SCRIPT 2017 format for pharmacy-to-pharmacy transfer data pushes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"host-urls","__idx":0},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HOST URLs"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Production Endpoint URL"},"children":["Production Endpoint URL"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"https://tbd/api/v1/intake/transfer-rx"},"children":["https://tbd/api/v1/intake/transfer-rx"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Staging Endpoint URL"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["https://tbd/api/v1/intake/transfer-rx"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"credentials-for-staging","__idx":1},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Credentials for Staging"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Username:"]}," tbd"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Key:"]}," tbd"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Base64 encoded String:"]}," tbd"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"key-headers","__idx":2},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Key Headers"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Content-Type: application/json"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authorization: Basic username:api_key  //for Staging you can use the value above"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NOTE"]},": the \"username:api_key\" combined string will need to be base64 encoded. We will share the auth details separately in a secure email for both production environment"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"request-format","__idx":3},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request Format"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"{   \"transaction_id\": <unique transaction id>,   \"message\": \"base64-encoded-transfer-script.xml\" }"},"children":["{   \"transaction_id\": <unique transaction id>,   \"message\": \"base64-encoded-transfer-script.xml\" }"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NOTE:"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["1. \"transaction_id\" should be a unique value to identify each request for tracking purposes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["2. The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["\"message\""]}," field is a single base64 encoded RxTransferResponse Script XML representing the prescription transfer being requested. Only one script is accepted per API call."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"response-format","__idx":4},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response Format"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Response has 2 parts. If the http request itself fails then error will be based on http status such as 404 (unauthorized), 400 (client error) or 500 for internal server error"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["But, if the http request is good and the API call fails because of bad XML data or others, the JSON response will be sent back to the client with http status 200 or 201. But, JSON response has 1 of 2 possible statuses: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["\"OK\""]}," or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["\"ERROR\""]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["JSON response body for status \"OK\":"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"{   \"error\": \"\",   \"status\": \"OK\",   \"data\": <formatted string showing the results> }"},"children":["{   \"error\": \"\",   \"status\": \"OK\",   \"data\": <formatted string showing the results> }"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NOTE:"]}," TransactionID is the same id sent by the originating pharmacy system and is used for tracking purposes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["JSON response body for status \"ERROR\":"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"{   \"error\": <any error message>,   \"data\": null,   \"status\": \"ERROR\" }"},"children":["{   \"error\": <any error message>,   \"data\": null,   \"status\": \"ERROR\" }"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NOTE:"]}," the error value will reference the MessageID from the Script XML to identify which script failed. Example:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"\"error\": \"erx_message_id:error_msg\""},"children":["\"error\": \"erx_message_id:error_msg\""]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["erx_message_id is the MessageID value from the Script XML"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"transferrx-script-xml-format","__idx":5},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TransferRx Script XML Format"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["RxTransferResponse XML - sent as part of the request body (base64 encoded)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NOTE:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PHIL Rx NCPDP ID: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["3685508"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Any tags with the comment ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["//NOTE: can remain same"]}," can be static. Meaning can use the exact same value"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Header qualifiers:"]}," <To Qualifier=\"D\"> identifies PHIL as the recipient; <From Qualifier=\"P\"> identifies the originating pharmacy by NCPDP ID"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Two ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<Pharmacy>"]}," elements are required. Both use the same tag, differentiated by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<TransferType>"]},". Sending pharmacy first (TRANSFER FROM PHARMACY), PHIL second (TRANSFER TO PHARMACY)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PHIL's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<Pharmacist>"]}," block inside the second ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<Pharmacy>"]}," uses a flat structure: <Name/> followed by <FirstName> and <LastName> as direct children (not nested under <Name>)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The medication block is nested inside ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<MedicationTransferred>"]}," with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<PrescriptionPreviouslyFilled>"]},": \"true\" if a LastFillDate exists; \"false\" if the script was never dispensed"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<BenefitsCoordination>"]}," appears BEFORE ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<MedicationTransferred>"]}," in the element ordering"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<HistorySource>"]}," inside ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<MedicationPrescribed>"]}," carries the originating pharmacy identity, original Rx number, fill dates, and authorized/remaining refill counts. Required when the Rx number is known."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["<NumberOfRefills>"]}," should be RefillsRemaining + 1 to account for the current fill being transferred"]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"<?xml version=\"1.0\" encoding=\"utf-8\"?> <Message DatatypesVersion=\"20170715\" TransportVersion=\"20170715\" TransactionDomain=\"SCRIPT\"          TransactionVersion=\"20170715\" StructuresVersion=\"20170715\" ECLVersion=\"20170715\"          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"          xsi:noNamespaceSchemaLocation=\"transport.xsd\">   <Header>     <To Qualifier=\"D\">3685508</To>             //PHIL NCPDP ID     <From Qualifier=\"P\">[Originating Pharmacy NCPDP ID]</From>     <MessageID>[SendingNCPDP]-[OriginalRxNumber]</MessageID>   //alphanumeric 1-35 len     <SentTime>2025-03-04T20:25:03.5Z</SentTime>     <Security>       <UsernameToken>         <Username>3685508</Username>           //PHIL NCPDP ID //NOTE: can remain same         <Password Type=\"PasswordDigest\"></Password>         <Nonce>[MessageID]</Nonce>             //same value as MessageID above         <Created>2025-03-04T20:25:03.5Z</Created>       </UsernameToken>       <Sender />       <Receiver />     </Security>     <SenderSoftware>       <SenderSoftwareDeveloper>SoftwareDeveloper</SenderSoftwareDeveloper>       <SenderSoftwareProduct>PharmacySystem</SenderSoftwareProduct>       <SenderSoftwareVersionRelease>X</SenderSoftwareVersionRelease>     </SenderSoftware>   </Header>   <Body>     <RxTransferResponse>       <Response>         <Approved />   //Indicates the originating pharmacy approves the transfer       </Response>       <Patient>         <HumanPatient>           <Name>             <LastName>DOE</LastName>             <FirstName>JOHN</FirstName>           </Name>           <Gender>M</Gender>           <DateOfBirth>             <Date>1955-01-01</Date>           </DateOfBirth>           <Address>             <AddressLine1>1234 Elm Street</AddressLine1>             <City>SPRINGFIELD</City>             <StateProvince>IL</StateProvince>             <PostalCode>62701</PostalCode>             <CountryCode>US</CountryCode>           </Address>           <CommunicationNumbers>   //PRIMARY number is required             <PrimaryTelephone>               <Number>xxxxxxxxxx</Number>             </PrimaryTelephone>             <OtherTelephone>               <Number>xxxxxxxxxx</Number>               <SupportsSMS>Y</SupportsSMS>   //Y if patient consents to SMS             </OtherTelephone>           </CommunicationNumbers>         </HumanPatient>       </Patient>       <!--         Two <Pharmacy> elements are required. Both use the <Pharmacy> tag;         <TransferType> differentiates sending from receiving.         Order: sending pharmacy FIRST, PHIL (receiving) SECOND.       -->       <Pharmacy>   //Originating (sending) pharmacy         <Identification>           <NCPDPID>[Originating Pharmacy NCPDP ID]</NCPDPID>           <NPI>[Originating Pharmacy NPI]</NPI>         </Identification>         <StoreName>[Originating Pharmacy Store Name]</StoreName>         <BusinessName>[Originating Pharmacy Business Name]</BusinessName>         <Address>           <AddressLine1>1705 ROUTE 46</AddressLine1>           <AddressLine2>STE 4</AddressLine2>           <City>LEDGEWOOD</City>           <StateProvince>NJ</StateProvince>           <PostalCode>07852</PostalCode>           <CountryCode>US</CountryCode>         </Address>         <CommunicationNumbers>           <PrimaryTelephone>             <Number>xxxxxxxxxx</Number>           </PrimaryTelephone>           <Fax>             <Number>xxxxxxxxxx</Number>           </Fax>         </CommunicationNumbers>         <TransferType>TRANSFER FROM PHARMACY</TransferType>       </Pharmacy>       <Pharmacy>   //Receiving pharmacy (PHIL) //NOTE: can remain same         <Identification>           <NCPDPID>3685508</NCPDPID>           <DEANumber>FP7647677</DEANumber>           <NPI>1487163598</NPI>         </Identification>         <Pharmacist>   //Note: FirstName/LastName are direct children, not under <Name>           <Name/>           <FirstName>HALEY</FirstName>           <LastName>DECOY</LastName>         </Pharmacist>         <StoreName>PHIL PHARMACY SOLUTIONS</StoreName>   //NOTE: can remain same         <BusinessName>PHIL PHARMACY SOLUTIONS</BusinessName>   //NOTE: can remain same         <Address>           <AddressLine1>150 E Campus View Blvd</AddressLine1>           <AddressLine2>STE 210</AddressLine2>           <City>COLUMBUS</City>           <StateProvince>OH</StateProvince>           <PostalCode>43235</PostalCode>           <CountryCode>US</CountryCode>         </Address>         <CommunicationNumbers>           <PrimaryTelephone>             <Number>8559770975</Number>           </PrimaryTelephone>           <Fax>             <Number>8889750603</Number>           </Fax>         </CommunicationNumbers>         <TransferType>TRANSFER TO PHARMACY</TransferType>       </Pharmacy>       <Prescriber>         <NonVeterinarian>           <Identification>             <DEANumber>Prescriber DEA - if applicable</DEANumber>             <NPI>Prescriber NPI</NPI>           </Identification>           <PracticeLocation>   //IF applicable             <BusinessName>Practice/Clinic Name</BusinessName>           </PracticeLocation>           <Name>             <LastName>DOE</LastName>             <FirstName>JOHN</FirstName>           </Name>           <Address>             <AddressLine1>500 OLD PKWY</AddressLine1>             <AddressLine2>#605</AddressLine2>             <City>DULUTH</City>             <StateProvince>CA</StateProvince>             <PostalCode>95292</PostalCode>             <CountryCode>US</CountryCode>           </Address>           <CommunicationNumbers>             <PrimaryTelephone>               <Number>xxxxxxxxxx</Number>             </PrimaryTelephone>             <OtherTelephone>               <Number>xxxxxxxxxx</Number>             </OtherTelephone>             <ElectronicMail>prescriber@email.com</ElectronicMail>             <Fax>               <Number>xxxxxxxxxx</Number>             </Fax>           </CommunicationNumbers>         </NonVeterinarian>       </Prescriber>       <Pharmacist>   //Top-level sending pharmacist — mirrors Pharmacy[0] authorizing pharmacist         <Name>           <LastName>KARLSON</LastName>           <FirstName>JOHN</FirstName>         </Name>       </Pharmacist>       <AllergyOrAdverseEvent>   //IF applicable         <Allergy>           <SourceOfInformation>O</SourceOfInformation>           <AdverseEvent>             <Text>Allergy</Text>           </AdverseEvent>           <DrugProductCoded>             <Qualifier>MSKDC</Qualifier>             <Text>Penicillin</Text>             <Code>00985</Code>           </DrugProductCoded>         </Allergy>       </AllergyOrAdverseEvent>       <BenefitsCoordination>   //IF applicable — appears BEFORE MedicationTransferred         <PayerIdentification>           <IINNumber>xxxx</IINNumber>   //BIN         </PayerIdentification>         <PatientRelationship>1</PatientRelationship>         <CommunicationNumbers>           <PrimaryTelephone>             <Number>xxxxxxxxxx</Number>           </PrimaryTelephone>         </CommunicationNumbers>         <PayerName>CIGNA</PayerName>         <CardholderID>xxxxxxxxx</CardholderID>         <GroupID>xxxxxxxxxxxxxxxxx</GroupID>       </BenefitsCoordination>       <MedicationTransferred>         <PrescriptionPreviouslyFilled>false</PrescriptionPreviouslyFilled>         <!--           Set to \"true\" if a LastFillDate exists (previously dispensed).           Set to \"false\" if the script was never dispensed at the originating pharmacy.         -->         <MedicationPrescribed>           <DrugDescription>VEVYE</DrugDescription>           <DrugCoded>             <ProductCode>               <Code>82667090002</Code>   //NDC               <Qualifier>ND</Qualifier>             </ProductCode>             <Strength>               <StrengthValue>0.1 %</StrengthValue>             </Strength>             <DrugDBCode>               <Code>C28254</Code>               <Qualifier>ND</Qualifier>             </DrugDBCode>           </DrugCoded>           <Quantity>             <Value>2</Value>             <CodeListQualifier>38</CodeListQualifier>             <QuantityUnitOfMeasure>               <Code>C28254</Code>             </QuantityUnitOfMeasure>           </Quantity>           <DaysSupply>30</DaysSupply>           <WrittenDate>             <Date>2025-03-12</Date>           </WrittenDate>           <LastFillDate>             <Date>2025-03-12</Date>   //Most recent dispense date at originating pharmacy           </LastFillDate>           <Substitutions>0</Substitutions>           <NumberOfRefills>12</NumberOfRefills>   //RefillsRemaining + 1 (accounts for current fill)           <RefillsRemaining>12</RefillsRemaining>   //Refills still available to dispense           <Prescriber>   //Prescriber repeated inside MedicationPrescribed             <NonVeterinarian>               <Identification>                 <DEANumber>Prescriber DEA - if applicable</DEANumber>                 <NPI>Prescriber NPI</NPI>               </Identification>               <PracticeLocation>   //IF applicable                 <BusinessName>Practice/Clinic Name</BusinessName>               </PracticeLocation>               <Name>                 <LastName>DOE</LastName>                 <FirstName>JOHN</FirstName>               </Name>               <Address>                 <AddressLine1>500 OLD PKWY</AddressLine1>                 <AddressLine2>#605</AddressLine2>                 <City>DULUTH</City>                 <StateProvince>CA</StateProvince>                 <PostalCode>95292</PostalCode>                 <CountryCode>US</CountryCode>               </Address>               <CommunicationNumbers>                 <PrimaryTelephone>                   <Number>xxxxxxxxxx</Number>                 </PrimaryTelephone>                 <OtherTelephone>                   <Number>xxxxxxxxxx</Number>                 </OtherTelephone>                 <ElectronicMail>prescriber@email.com</ElectronicMail>                 <Fax>                   <Number>xxxxxxxxxx</Number>                 </Fax>               </CommunicationNumbers>             </NonVeterinarian>           </Prescriber>           <Sig>             <SigText>INSTILL 1 SPRAY IN EACH NOSTRIL TWICE DAILY</SigText>           </Sig>           <HistorySource>   //Required when the original Rx number is known             <Source>               <NCPDPID>[Originating Pharmacy NCPDP ID]</NCPDPID>               <NPI>[Originating Pharmacy NPI]</NPI>               <DEANumber>[Originating DEA - if applicable]</DEANumber>             </Source>             <SourceReference>[Original Rx Number]</SourceReference>             <OriginCode>5</OriginCode>   //5 = Transferred             <WrittenDate>               <Date>2025-03-12</Date>             </WrittenDate>             <OriginalFillDate>               <Date>2025-03-12</Date>   //Date of first dispense             </OriginalFillDate>             <LastFillDate>               <Date>2025-03-12</Date>             </LastFillDate>             <RefillsAuthorized>12</RefillsAuthorized>             <RefillsRemaining>12</RefillsRemaining>           </HistorySource>         </MedicationPrescribed>       </MedicationTransferred>     </RxTransferResponse>   </Body> </Message>"},"children":["<?xml version=\"1.0\" encoding=\"utf-8\"?> <Message DatatypesVersion=\"20170715\" TransportVersion=\"20170715\" TransactionDomain=\"SCRIPT\"          TransactionVersion=\"20170715\" StructuresVersion=\"20170715\" ECLVersion=\"20170715\"          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"          xsi:noNamespaceSchemaLocation=\"transport.xsd\">   <Header>     <To Qualifier=\"D\">3685508</To>             //PHIL NCPDP ID     <From Qualifier=\"P\">[Originating Pharmacy NCPDP ID]</From>     <MessageID>[SendingNCPDP]-[OriginalRxNumber]</MessageID>   //alphanumeric 1-35 len     <SentTime>2025-03-04T20:25:03.5Z</SentTime>     <Security>       <UsernameToken>         <Username>3685508</Username>           //PHIL NCPDP ID //NOTE: can remain same         <Password Type=\"PasswordDigest\"></Password>         <Nonce>[MessageID]</Nonce>             //same value as MessageID above         <Created>2025-03-04T20:25:03.5Z</Created>       </UsernameToken>       <Sender />       <Receiver />     </Security>     <SenderSoftware>       <SenderSoftwareDeveloper>SoftwareDeveloper</SenderSoftwareDeveloper>       <SenderSoftwareProduct>PharmacySystem</SenderSoftwareProduct>       <SenderSoftwareVersionRelease>X</SenderSoftwareVersionRelease>     </SenderSoftware>   </Header>   <Body>     <RxTransferResponse>       <Response>         <Approved />   //Indicates the originating pharmacy approves the transfer       </Response>       <Patient>         <HumanPatient>           <Name>             <LastName>DOE</LastName>             <FirstName>JOHN</FirstName>           </Name>           <Gender>M</Gender>           <DateOfBirth>             <Date>1955-01-01</Date>           </DateOfBirth>           <Address>             <AddressLine1>1234 Elm Street</AddressLine1>             <City>SPRINGFIELD</City>             <StateProvince>IL</StateProvince>             <PostalCode>62701</PostalCode>             <CountryCode>US</CountryCode>           </Address>           <CommunicationNumbers>   //PRIMARY number is required             <PrimaryTelephone>               <Number>xxxxxxxxxx</Number>             </PrimaryTelephone>             <OtherTelephone>               <Number>xxxxxxxxxx</Number>               <SupportsSMS>Y</SupportsSMS>   //Y if patient consents to SMS             </OtherTelephone>           </CommunicationNumbers>         </HumanPatient>       </Patient>       <!--         Two <Pharmacy> elements are required. Both use the <Pharmacy> tag;         <TransferType> differentiates sending from receiving.         Order: sending pharmacy FIRST, PHIL (receiving) SECOND.       -->       <Pharmacy>   //Originating (sending) pharmacy         <Identification>           <NCPDPID>[Originating Pharmacy NCPDP ID]</NCPDPID>           <NPI>[Originating Pharmacy NPI]</NPI>         </Identification>         <StoreName>[Originating Pharmacy Store Name]</StoreName>         <BusinessName>[Originating Pharmacy Business Name]</BusinessName>         <Address>           <AddressLine1>1705 ROUTE 46</AddressLine1>           <AddressLine2>STE 4</AddressLine2>           <City>LEDGEWOOD</City>           <StateProvince>NJ</StateProvince>           <PostalCode>07852</PostalCode>           <CountryCode>US</CountryCode>         </Address>         <CommunicationNumbers>           <PrimaryTelephone>             <Number>xxxxxxxxxx</Number>           </PrimaryTelephone>           <Fax>             <Number>xxxxxxxxxx</Number>           </Fax>         </CommunicationNumbers>         <TransferType>TRANSFER FROM PHARMACY</TransferType>       </Pharmacy>       <Pharmacy>   //Receiving pharmacy (PHIL) //NOTE: can remain same         <Identification>           <NCPDPID>3685508</NCPDPID>           <DEANumber>FP7647677</DEANumber>           <NPI>1487163598</NPI>         </Identification>         <Pharmacist>   //Note: FirstName/LastName are direct children, not under <Name>           <Name/>           <FirstName>HALEY</FirstName>           <LastName>DECOY</LastName>         </Pharmacist>         <StoreName>PHIL PHARMACY SOLUTIONS</StoreName>   //NOTE: can remain same         <BusinessName>PHIL PHARMACY SOLUTIONS</BusinessName>   //NOTE: can remain same         <Address>           <AddressLine1>150 E Campus View Blvd</AddressLine1>           <AddressLine2>STE 210</AddressLine2>           <City>COLUMBUS</City>           <StateProvince>OH</StateProvince>           <PostalCode>43235</PostalCode>           <CountryCode>US</CountryCode>         </Address>         <CommunicationNumbers>           <PrimaryTelephone>             <Number>8559770975</Number>           </PrimaryTelephone>           <Fax>             <Number>8889750603</Number>           </Fax>         </CommunicationNumbers>         <TransferType>TRANSFER TO PHARMACY</TransferType>       </Pharmacy>       <Prescriber>         <NonVeterinarian>           <Identification>             <DEANumber>Prescriber DEA - if applicable</DEANumber>             <NPI>Prescriber NPI</NPI>           </Identification>           <PracticeLocation>   //IF applicable             <BusinessName>Practice/Clinic Name</BusinessName>           </PracticeLocation>           <Name>             <LastName>DOE</LastName>             <FirstName>JOHN</FirstName>           </Name>           <Address>             <AddressLine1>500 OLD PKWY</AddressLine1>             <AddressLine2>#605</AddressLine2>             <City>DULUTH</City>             <StateProvince>CA</StateProvince>             <PostalCode>95292</PostalCode>             <CountryCode>US</CountryCode>           </Address>           <CommunicationNumbers>             <PrimaryTelephone>               <Number>xxxxxxxxxx</Number>             </PrimaryTelephone>             <OtherTelephone>               <Number>xxxxxxxxxx</Number>             </OtherTelephone>             <ElectronicMail>prescriber@email.com</ElectronicMail>             <Fax>               <Number>xxxxxxxxxx</Number>             </Fax>           </CommunicationNumbers>         </NonVeterinarian>       </Prescriber>       <Pharmacist>   //Top-level sending pharmacist — mirrors Pharmacy[0] authorizing pharmacist         <Name>           <LastName>KARLSON</LastName>           <FirstName>JOHN</FirstName>         </Name>       </Pharmacist>       <AllergyOrAdverseEvent>   //IF applicable         <Allergy>           <SourceOfInformation>O</SourceOfInformation>           <AdverseEvent>             <Text>Allergy</Text>           </AdverseEvent>           <DrugProductCoded>             <Qualifier>MSKDC</Qualifier>             <Text>Penicillin</Text>             <Code>00985</Code>           </DrugProductCoded>         </Allergy>       </AllergyOrAdverseEvent>       <BenefitsCoordination>   //IF applicable — appears BEFORE MedicationTransferred         <PayerIdentification>           <IINNumber>xxxx</IINNumber>   //BIN         </PayerIdentification>         <PatientRelationship>1</PatientRelationship>         <CommunicationNumbers>           <PrimaryTelephone>             <Number>xxxxxxxxxx</Number>           </PrimaryTelephone>         </CommunicationNumbers>         <PayerName>CIGNA</PayerName>         <CardholderID>xxxxxxxxx</CardholderID>         <GroupID>xxxxxxxxxxxxxxxxx</GroupID>       </BenefitsCoordination>       <MedicationTransferred>         <PrescriptionPreviouslyFilled>false</PrescriptionPreviouslyFilled>         <!--           Set to \"true\" if a LastFillDate exists (previously dispensed).           Set to \"false\" if the script was never dispensed at the originating pharmacy.         -->         <MedicationPrescribed>           <DrugDescription>VEVYE</DrugDescription>           <DrugCoded>             <ProductCode>               <Code>82667090002</Code>   //NDC               <Qualifier>ND</Qualifier>             </ProductCode>             <Strength>               <StrengthValue>0.1 %</StrengthValue>             </Strength>             <DrugDBCode>               <Code>C28254</Code>               <Qualifier>ND</Qualifier>             </DrugDBCode>           </DrugCoded>           <Quantity>             <Value>2</Value>             <CodeListQualifier>38</CodeListQualifier>             <QuantityUnitOfMeasure>               <Code>C28254</Code>             </QuantityUnitOfMeasure>           </Quantity>           <DaysSupply>30</DaysSupply>           <WrittenDate>             <Date>2025-03-12</Date>           </WrittenDate>           <LastFillDate>             <Date>2025-03-12</Date>   //Most recent dispense date at originating pharmacy           </LastFillDate>           <Substitutions>0</Substitutions>           <NumberOfRefills>12</NumberOfRefills>   //RefillsRemaining + 1 (accounts for current fill)           <RefillsRemaining>12</RefillsRemaining>   //Refills still available to dispense           <Prescriber>   //Prescriber repeated inside MedicationPrescribed             <NonVeterinarian>               <Identification>                 <DEANumber>Prescriber DEA - if applicable</DEANumber>                 <NPI>Prescriber NPI</NPI>               </Identification>               <PracticeLocation>   //IF applicable                 <BusinessName>Practice/Clinic Name</BusinessName>               </PracticeLocation>               <Name>                 <LastName>DOE</LastName>                 <FirstName>JOHN</FirstName>               </Name>               <Address>                 <AddressLine1>500 OLD PKWY</AddressLine1>                 <AddressLine2>#605</AddressLine2>                 <City>DULUTH</City>                 <StateProvince>CA</StateProvince>                 <PostalCode>95292</PostalCode>                 <CountryCode>US</CountryCode>               </Address>               <CommunicationNumbers>                 <PrimaryTelephone>                   <Number>xxxxxxxxxx</Number>                 </PrimaryTelephone>                 <OtherTelephone>                   <Number>xxxxxxxxxx</Number>                 </OtherTelephone>                 <ElectronicMail>prescriber@email.com</ElectronicMail>                 <Fax>                   <Number>xxxxxxxxxx</Number>                 </Fax>               </CommunicationNumbers>             </NonVeterinarian>           </Prescriber>           <Sig>             <SigText>INSTILL 1 SPRAY IN EACH NOSTRIL TWICE DAILY</SigText>           </Sig>           <HistorySource>   //Required when the original Rx number is known             <Source>               <NCPDPID>[Originating Pharmacy NCPDP ID]</NCPDPID>               <NPI>[Originating Pharmacy NPI]</NPI>               <DEANumber>[Originating DEA - if applicable]</DEANumber>             </Source>             <SourceReference>[Original Rx Number]</SourceReference>             <OriginCode>5</OriginCode>   //5 = Transferred             <WrittenDate>               <Date>2025-03-12</Date>             </WrittenDate>             <OriginalFillDate>               <Date>2025-03-12</Date>   //Date of first dispense             </OriginalFillDate>             <LastFillDate>               <Date>2025-03-12</Date>             </LastFillDate>             <RefillsAuthorized>12</RefillsAuthorized>             <RefillsRemaining>12</RefillsRemaining>           </HistorySource>         </MedicationPrescribed>       </MedicationTransferred>     </RxTransferResponse>   </Body> </Message>"]}]}]}]}]}]},"headings":[{"value":"HOST URLs","id":"host-urls","depth":1},{"value":"Credentials for Staging","id":"credentials-for-staging","depth":1},{"value":"Key Headers","id":"key-headers","depth":1},{"value":"Request Format","id":"request-format","depth":1},{"value":"Response Format","id":"response-format","depth":1},{"value":"TransferRx Script XML Format","id":"transferrx-script-xml-format","depth":1}],"frontmatter":{"seo":{"title":"HOST URLs"}},"lastModified":"2026-09-25T20:46:18.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/script-intake","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}