Get an order's regulated information
Learn how to get an order's regulated information.
Learn how to get an order's regulated information.
Prerequisites
To complete this tutorial, you need:
- Authorization from the selling partner for whom you are making calls. For more information, refer to Authorizing Selling Partner API applications.
- The Direct-to-Consumer Delivery (Restricted) role assigned to your developer profile.
- The Direct-to-Consumer Delivery (Restricted) role selected in the app registration page for your application.
Step 1. Get a Restricted Data Token
To access regulated information, you must have a Restricted Data Token (RDT). To get this token:
- Call the
createRestrictedDataTokenoperation. - Save the
restrictedDataTokenvalue (which is the RDT). You'll need this in Step 2.
Step 2. Get an order's regulated information
Note
This is a restricted operation and requires a Restricted Data Token (RDT) for authorization. Some operations require restrictions because they contain customer PII data. These operations require passing an additional security review. For more information on RDT, refer to the Tokens API guide.
Call the getOrderRegulatedInfo operation. Specify the orderId of the order with the regulated information you want. Include the RDT in the x-amz-access-token header of your call.
A successful response includes information about the order, whether a dosage label is required, the verification status of the order, and the requested regulated information. Some types of regulated orders support additional details about the verification of the order. Information about the supported detail types and valid interim status codes is returned as part of this response.
Response example
This example is for a pending order:
{
"payload": {
"AmazonOrderId": "205-1725759-9209952",
"RequiresDosageLabel": true,
"RegulatedInformation": {
"Fields": [
{
"FieldLabel": "Species",
"FieldId": "petsSpecies",
"FieldValue": "Cat",
"FieldType": "Text"
}, {
"FieldLabel": "Pet name",
"FieldId": "petsName",
"FieldValue": "Snowy",
"FieldType": "Text"
}, {
"FieldLabel": "Birth date",
"FieldId": "petsDateOfBirth",
"FieldValue": "15 August 2021",
"FieldType": "Text"
}, {
"FieldLabel": "Weight",
"FieldId": "petsWeight",
"FieldValue": "1 kg",
"FieldType": "Text"
}, {
"FieldLabel": "Gender",
"FieldId": "petsGender",
"FieldValue": "Female",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet lactating?",
"FieldId": "petsLactating",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet pregnant?",
"FieldId": "petsPregnant",
"FieldValue": "Yes",
"FieldType": "Text"
}, {
"FieldLabel": "Pregnancy stage",
"FieldId": "petsPregnancyStage",
"FieldValue": "Second trimester",
"FieldType": "Text"
}, {
"FieldLabel": "Does your pet have allergies?",
"FieldId": "petsAllergies",
"FieldValue": "Yes",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet neutered?",
"FieldId": "petsNeutered",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet on any other medication?",
"FieldId": "petsAdditionalMedicationRadio",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "snowy prescription 1",
"FieldId": "snowy prescription 1",
"FieldValue": "https://...",
"FieldType": "FileAttachment"
}
]
},
"RegulatedOrderVerificationStatus": {
"Status": "Pending",
"RequiresMerchantAction": true,
"ValidRejectionReasons": [
{
"RejectionReasonId": "shield_pom_v_reject_pregnant_only",
"RejectionReasonDescription": "Not suitable for pregnant pet"
}, {
"RejectionReasonId": "shield_pom_v_reject_product",
"RejectionReasonDescription": "This product is not suitable"
}, {
"RejectionReasonId": "shield_pom_v_reject_reject_age",
"RejectionReasonDescription": "Your pet is too young for this medicine."
}
]
}
}
}
This example is for an approved order:
{
"payload": {
"AmazonOrderId": "205-1725759-9209952",
"RequiresDosageLabel": true,
"RegulatedInformation": {
"Fields": [
{
"FieldLabel": "Species",
"FieldId": "petsSpecies",
"FieldValue": "Cat",
"FieldType": "Text"
}
]
},
"RegulatedOrderVerificationStatus": {
"Status": "Approved",
"RequiresMerchantAction": false,
"ExternalReviewerId": "externalId",
"ReviewDate": "1970-01-19T03:59:27Z",
"ValidRejectionReasons": []
}
}
}
This example is for a rejected order:
{
"payload": {
"AmazonOrderId": "205-1725759-9209952",
"RequiresDosageLabel": true,
"RegulatedInformation": {
"Fields": [
{
"FieldLabel": "Species",
"FieldId": "petsSpecies",
"FieldValue": "Cat",
"FieldType": "Text"
}
]
},
"RegulatedOrderVerificationStatus": {
"Status": "Rejected",
"RequiresMerchantAction": false,
"ExternalReviewerId": "externalId",
"ReviewDate": "1970-01-19T03:59:27Z",
"RejectionReason": {
"RejectionReasonId": "shield_pom_vps_reject_species",
"RejectionReasonDescription": "This medicine is not suitable for this pet's species"
},
"ValidRejectionReasons": []
}
}
}
This example is for a cancelled order:
{
"payload": {
"AmazonOrderId": "202-5156092-2672318",
"RequiresDosageLabel": false,
"RegulatedInformation": {
"Fields": [
{
"FieldLabel": "Species",
"FieldId": "petsSpecies",
"FieldValue": "Dog",
"FieldType": "Text"
}, {
"FieldLabel": "Birth date",
"FieldId": "petsDateOfBirth",
"FieldValue": "8 March 2019",
"FieldType": "Text"
}, {
"FieldLabel": "Weight",
"FieldId": "petsWeight",
"FieldValue": "44 kg",
"FieldType": "Text"
}, {
"FieldLabel": "Gender",
"FieldId": "petsGender",
"FieldValue": "Male",
"FieldType": "Text"
}, {
"FieldLabel": "Does your pet have allergies?",
"FieldId": "petsAllergies",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet neutered?",
"FieldId": "petsNeutered",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet on any other medication?",
"FieldId": "petsAdditionalMedicationRadio",
"FieldValue": "No",
"FieldType": "Text"
}
]
},
"RegulatedOrderVerificationStatus": {
"Status": "Cancelled",
"RequiresMerchantAction": false,
"ValidRejectionReasons": []
}
}
}
This example is for an expired order:
{
"payload": {
"AmazonOrderId": "205-2554781-3212354",
"RequiresDosageLabel": true,
"RegulatedInformation": {
"Fields": [
{
"FieldLabel": "Species",
"FieldId": "petsSpecies",
"FieldValue": "Cat",
"FieldType": "Text"
}, {
"FieldLabel": "Birth date",
"FieldId": "petsDateOfBirth",
"FieldValue": "25 January 2020",
"FieldType": "Text"
}, {
"FieldLabel": "Weight",
"FieldId": "petsWeight",
"FieldValue": "2 kg",
"FieldType": "Text"
}, {
"FieldLabel": "Gender",
"FieldId": "petsGender",
"FieldValue": "Male",
"FieldType": "Text"
}, {
"FieldLabel": "Does your pet have allergies?",
"FieldId": "petsAllergies",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet neutered?",
"FieldId": "petsNeutered",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "Is your pet on any other medication?",
"FieldId": "petsAdditionalMedicationRadio",
"FieldValue": "No",
"FieldType": "Text"
}, {
"FieldLabel": "JPEG 2 prescription 1",
"FieldId": "JPEG 2 prescription 1",
"FieldValue": "https://...",
"FieldType": "FileAttachment"
}
]
},
"RegulatedOrderVerificationStatus": {
"Status": "Expired",
"RequiresMerchantAction": false,
"ValidRejectionReasons": []
}
}
}
This example is for a pending order that supports additional verification details and interim status updates:
The order in this example supports three additional detail types: prescriptionDetail, approvedAlternativeDetails, and interimStatusDetail. Each detail type is only valid when the order is in the corresponding status indicated by ValidVerificationStatuses. The response also includes ValidInterimStatusCodes, which lists the status codes you can use when providing an interim status update. For more information, refer to Provide an interim status update for a regulated order.
{
"payload": {
"AmazonOrderId": "902-2592119-3531015",
"RequiresDosageLabel": false,
"RegulatedInformation": {
"Fields": [
{
"FieldId": "pets_rx_scName",
"FieldLabel": "Pet name",
"FieldType": "Text",
"FieldValue": "Woofer"
},
{
"FieldId": "pets_rx_scType",
"FieldLabel": "Pet type",
"FieldType": "Text",
"FieldValue": "Dog"
}
]
},
"RegulatedOrderVerificationStatus": {
"Status": "Pending",
"RequiresMerchantAction": true,
"ValidRejectionReasons": [
{
"RejectionReasonId": "pets_rx_sc_incorrect_product",
"RejectionReasonDescription": "Canceled order due to veterinarian indicating wrong product ordered"
}
],
"ValidVerificationDetails": [
{
"VerificationDetailType": "prescriptionDetail",
"ValidVerificationStatuses": [
"Approved"
]
},
{
"VerificationDetailType": "approvedAlternativeDetails",
"ValidVerificationStatuses": [
"Rejected"
]
},
{
"VerificationDetailType": "interimStatusDetail",
"ValidVerificationStatuses": [
"Pending"
]
}
],
"ValidInterimStatusCodes": [
{
"StatusCode": "awaiting_vet_response",
"StatusDescription": "Vetsource is contacting your vet. Response usually takes 1-2 business days."
},
{
"StatusCode": "vet_contacted_email",
"StatusDescription": "Vetsource contacted your vet via email."
},
{
"StatusCode": "vet_contacted_phone",
"StatusDescription": "Vetsource contacted your vet via phone."
},
{
"StatusCode": "vet_contacted_fax",
"StatusDescription": "Vetsource contacted your vet via fax."
},
{
"StatusCode": "communication_failure",
"StatusDescription": "We're having trouble reaching your vet. We'll keep trying."
},
{
"StatusCode": "no_vet_response",
"StatusDescription": "Your vet didn't respond. Contact them to confirm they'll approve your next order."
},
{
"StatusCode": "processing",
"StatusDescription": "Your order has been approved and is being processed."
}
]
}
}
}
Updated about 3 hours ago
