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
createRestrictedDataToken
operation. - Save the
restrictedDataToken
value (which is the RDT). You'll need this in Step 2.
Step 2. Get an order's regulated information
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 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 details:
The order in this example supports one additional detail type: prescriptionDetail
. You can only provide this information when RegulatedOrderVerificationStatus.Status
is Approved
. For more supported detail types, refer to List of verificationDetails that Amazon supports.
{
"payload": {
"AmazonOrderId": "205-2554781-3212354",
"RequiresDosageLabel": true,
"RegulatedInformation": {
"Fields": [
{
"FieldLabel": "Species",
"FieldId": "petsSpecies",
"FieldValue": "Cat",
"FieldType": "Text"
}
]
},
"RegulatedOrderVerificationStatus": {
"Status": "Pending",
"RequiresMerchantAction": true,
"ValidRejectionReasons": [
{
"RejectionReasonId": "shield_pom_v_reject_pregnant_only",
"RejectionReasonDescription": "Not suitable for pregnant pet"
}
],
"ValidVerificationDetails": [
{
"VerificationDetailType": "prescriptionDetail",
"ValidVerificationStatuses": [
"Approved"
]
}
]
}
}
}
Updated about 4 hours ago