I’m trying to set up an API for a direct mail service. I successfully initialized the OAuth call although I’m not quite sure what to do with the resulting bearer token. Everything gets run through a single company platform account, so my users won’t be connecting to their own accounts.
Next I need to initialize the main call to place an order, but it’s returning a 404 error:
This is my setup:
I’ve tried to implement the docs correctly but clearly something is wrong:
curl --request POST \
--url https://api.pcmintegrations.com/v2/directmail-api/order \
--header 'Accept: application/json' \
--header 'Content-Type: Postcard' \
--data '[
{
"extRefNbr": "PBI",
"orderConfig": {
"designID": 2106,
"mailClass": "FirstClass",
"globalDesignVariables": [
{
"key": "frontcard",
"value": "https://portal.pcmintegrations.com/uploads/hq3rlfzh.rli.jpg"
},
{
"key": "backcard",
"value": "https://portal.pcmintegrations.com/uploads/4ehladjf.qsz.jpg"
},
{
"key": "companyaddress",
"value": "10 Main St"
},
{
"key": "companycity",
"value": "Tampa"
},
{
"key": "companyname",
"value": "PostcardMania"
},
{
"key": "companystate",
"value": "FL"
},
{
"key": "companyzipcode",
"value": "33626"
}
]
},
"recipientList": [
{
"firstName": "Brock",
"lastName": "Lee",
"address": "2145 Sunnydale Blvd",
"address2": "",
"city": "Clearwater",
"state": "FL",
"zipCode": "33765",
"extRefNbr": "6912Test",
"recipientDesignVariables": []
}
]
}
]'
If anyone could point me in the right direction I’d greatly appreciate it.