cancel
Showing results for 
Search instead for 
Did you mean: 

API Capture with purchaseLevel = 3 and purchaseOrderNumber fails with "invalid or missing: user_po"

I am posting a Capture specifying the purchase level = 3 and providing PO number, the API returns with 

 "status": "INVALID_REQUEST""reason": "MISSING_FIELD""message": "Declined - The request is missing one or more fields"  "details": [{"field": "purchasing_level_3","reason": "MISSING_FIELD"}.

On the portal it says "The request data was either invalid or missing: user_po"

here is my post:
{
"clientReferenceInformation": {
"code": "7352454072276947004602",
"applicationName": "oe",
"applicationVersion": "2.0"
},
"billTo": {
"country": "US",
"firstName": "John",
"lastName": "Doe",
"address1": "37 Circle Lane",
"postalCode": "10977",
"locality": "Spring Valley",
"administrativeArea": "NY"
},
"processingInformation": {
"purchaseLevel": "3"
},
"orderInformation": {
"amountDetails": {
"totalAmount": "682.77",
"currency": "USD",
"discountAmount": "0",
"taxAmount": "52.77",
"taxTypeCode": "056"
},
"lineItems": [
{
"productCode": "R340",
"productName": "Compass Chair Size 4",
"productSku": "R340",
"quantity": "1",
"unitPrice": "425.00",
"unitOfMeasure": "ES",
"totalAmount": "425.00",
"taxAmount": "35.59",
"taxRate": ".002",
"taxTypeCode": "local_tax_indicator",
"amountIncludesTax": "true",
"taxStatusIndicator": "1",
"commodityCode": "12345",
"productDescription": "Compass Chair Size 4",
"discountAmount": "0.00"
},
{
"productCode": "K811",
"productName": "Small Right Arm Anchor",
"productSku": "K811",
"quantity": "2",
"unitPrice": "210.00",
"unitOfMeasure": "ES",
"totalAmount": "420.00",
"taxAmount": "35.18",
"taxRate": ".002",
"taxTypeCode": "local_tax_indicator",
"amountIncludesTax": "true",
"taxStatusIndicator": "1",
"commodityCode": "12345",
"productDescription": "Small Right Arm Anchor",
"discountAmount": "0.00"
}
]
},
"buyerInformation": {
"merchantCustomerId": "Z4A88-0"
},
"invoiceDetails": {
"purchaseOrderNumber": "9989982"
}
}

mgellis
New Member
1 ACCEPTED SOLUTION

Accepted Solutions

The problem was that the "invoiceDetails" section was not nested under "orderInformation". I changed that and it works.

View solution in original post

mgellis
New Member
2 REPLIES 2

I added the userPO to the buyerInformation and it worked. Note that the API documentation is missing this field.

"buyerInformation": {
"merchantCustomerId": "Z4A95-0",
"userPO":"32534534"
},

mgellis
New Member

The problem was that the "invoiceDetails" section was not nested under "orderInformation". I changed that and it works.

mgellis
New Member