Advertisement
mrhodes-hatchbuck

Create Order

Oct 29th, 2014
684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // https://api.hatchbuck.com/api/v1/Contact/Order?api_key = XXXX   (get API key from your API settings page)
  2. {
  3.     "marketingOptInInd": true,  //required -- true or false
  4.     "firstName": "Mathew", // optional, only used if contact doesn't exist
  5.     "orderType": "Paid", // required, Paid or Refund
  6.     "externalOrderId": "110", // optional, correlates to the order id in your source system
  7.     "emailAddress": "mrhodes@hatchbuck.com", //required, used to find or create contact
  8.     "lastName": "Rhodes", // optional, only used if contact doesn't exist
  9.     "orderLineItem": [ // at least one required, all fields required
  10.         {
  11.             "quantity": 1,
  12.             "pricePerUnit": 19,
  13.             "productName": "[Sample] Roxy, time warp tie dye mini", // system will create product if not found
  14.             "categoryName": "Magento" // system will create category if product not already assigned to one
  15.         }
  16.     ],
  17.     "phones": [ // optional, however all fields required if included, only used when creating contact
  18.         {
  19.             "number": "3148840814",
  20.             "type": "Work" //required, types are Home, Work or Other
  21.         }
  22.     ],
  23.     "status": {
  24.         "name": "Prospect" //required, must be a valid contact status from your company settings
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement