Submit Orders
Order API
Clients will be provided with an API key
POST
Create an order.
Route
https://api.cogginsstore.com/api/v1/orders/apikey}
URL Variables
apikey = your API key
The email address will generally be a preset email that always sends the orders through to the api. All other fields are pertinent to who the order is being shipped to and what they ordered.
Sku and ShipVia are also preset values within our system and will need to be provided to you so you can configure it on your side accordingly.
//USA Example
POST
{
"email":"apiorders@yourdomain.com",
"Name":"Steve Tester",
"Address":"123 Main Street",
"City":"Las Vegas",
"State":"NV",
"Country":"USA",
"ZipCode":"11133",
"PhoneNumber":"555-555-1234",
"Items":[
{
"Sku":"S-ABC-441",//Inventory identity provided by Coggins
"Quantity":1,
"ShipVia":"SHIPTBD" //Shipping identity provided by Coggins
}
]
}
RESPONSE
{
"orderNumber": 7488197, //order number
"success": true, //true or false based on success of order
"message": null //any accompanying message, null on success
}
ERRORS
Invalid Email for Store - Email provided was not found registered as an existing account
Invalid or Empty Payload - Data submitted was either missing or in an invalid format
Supplied email is invalid - format of the email does not appear to be an actual email address
One of the accounts does not exist. - Email provided was not found registered as an existing account
//Canada Example
POST
{
"email":"apiorders@ercbpo.com",
"Name":"George Tester",
"Address":"123 Main Street",
"City":"Langley",
"State":"BC",
"Country":"CAN",
"ZipCode":"V2Y 1N2",
"PhoneNumber":"(555)555-6789",
"Items":[
{
"Sku":"S-ABC-240",
"Quantity":1,
"ShipVia":"FXSCOG"
},
{
"Sku":"S-ERC-286",
"Quantity":1,
"ShipVia":"SHIPTBD"
}
]
}
RESPONSE
{
"orderNumber": 7488210, //order number
"success": true, //true or false based on success of order
"message": null //any accompanying message, null on success
}
The number returned is the order number.