Merchant want to fetch new orders from Hygglig.

Input

Name Type Description
mid string Merchant’s key
noofm string Number of months i.e 2, 3, 4.
mac string A mac or checksum generated from input parameters using merchant’s private key.

Response

Name Description
Checkout Orders A list of all new orders of requested content-Type i.e xml, text or json object.
Success True if no error, false if there is error.
Error In case of an error this field contains the error description.

Get sent orders example code

$url  = 'https://www.hygglig.com/Manage/api/CheckoutOrder/GetSentOrders?mId=';
$url .= $merchantKey . '&noofm=' . $noofm . '&mac=';
$url .= sha1($noofm . $secret);
//Store result
$result = json_decode(file_get_contents($url),true);

Response from example code

array(3) {
   ["CheckoutOrder"] => array(3) {
      [0] => array(19) {
         ["CheckoutOrderId"] => string(36)"47637a5f-d0b8-4e1b-b8d3-9af3cf9456e7" 
         ["CheckoutOrderNr"] => int(2200021151)
         ["MerchantId"] => string(36)"00000000-0000-0000-0000-000000000000" 
         ["Currency"] => string(3) "SEK" 
         ["MerchantOrderReference"] => string(4) "1256" 
         ["MerchantOrderDate"] => string(23)  "2015-12-11T09:54:02.193" 
         ["CreatedTimestamp"] => string(23) "2015-12-11T09:54:12.633" 
         ["Timeout"] => NULL      
         ["AutoActivate"] => bool(false)
         ["BuyerIP"] => bool(false)
         ["MerchantIp"] => NULL
         ["CheckoutOrderArticles"] => array(2) {
            [0] => array(11) {
               ["CheckoutOrderArticleId"] => string(36)"963ba05c-5810-4894-9dca-7edf6efe2258" 
               ["CheckoutOrderId"] => string(36)"00000000-0000-0000-0000-000000000000" 
               ["ArticleName"] => string(8)"SHIPPING" 
               ["ArticleNumber"] => int(999)
               ["Description"] => string(22)"International Delivery" 
               ["Price"] => float(100)
               ["Quantity"] => float(1)
               ["VatValue"] => float(0.25)
               ["CreatedTimestamp"] => string(23) "2015-12-11T09:54:12.633" 
               ["CancelledTimestamp"] => NULL          
               ["TotalPrice"] => float(125)
           }
           [1] => array(11) {
              ["CheckoutOrderArticleId"] => string(36) "4fa0e3da-7ac5-4b79-bd23-dcbdc3e790e1" 
              ["CheckoutOrderId"] => string(36)"00000000-0000-0000-0000-000000000000" 
              ["ArticleName"] => string(23)"Totemme Jojosnöre Gult" 
              ["ArticleNumber"] => int(41)
              ["Description"] => string(27)"Exklusivt jojosnöre. Gult." 
              ["Price"] => float(6.8)
              ["Quantity"] => float(1)
              ["VatValue"] => float(0.25)
              ["CreatedTimestamp"] => string(23)"2015-12-11T09:54:12.633" 
              ["CancelledTimestamp"] => NULL          
              ["TotalPrice"] => float(8.5)
           }
         }
         ["Customer"] => array(13) {
            ["PersonalInfoId"] => string(36)"00000000-0000-0000-0000-000000000000" 
            ["FirstName"] => string(10)"Marginalen" 
            ["LastName"] => string(6)"Credit" 
            ["Address"] => string(17) "Valhallavägen 66" 
            ["PostalCode"] => string(5) "10000" 
            ["City"] => string(9)"Stockholm" 
            ["Country"] => NULL        
            ["MobileNumber"] => string(12)"+46701234567" 
            ["PhoneNumber"] => NULL        
            ["Email"] => string(22) "testcredit@hygglig.com" 
            ["CreatedTimestamp"] => string(19) "0001-01-01T00:00:00" 
            ["CustomerEmailURLRequest"] => NULL        
            ["CustomerEmailURLRequestTimestamp"] => NULL
         }
         ["Letters"] => array(0) {}      
         ["TotalActivatePrice"] => float(133.5)
         ["TotalPrice"] => float(133.5)
         ["TotalPriceWithoutVAT"] => float(106.8)
         ["TotalActivePriceWithoutVAT"] => float(106.8)
         ["Checksum"] => NULL
      }
      [1] => array(19) {
         ["CheckoutOrderId"] => string(36)"e0392301-faa1-4b94-9f07-c28b8681d75f" 
         ["CheckoutOrderNr"] => int(2200021156)
         ["MerchantId"] => string(36)"00000000-0000-0000-0000-000000000000" 
         ["Currency"] => string(3) "SEK" 
         ["MerchantOrderReference"] => string(4) "1261" 
         ["MerchantOrderDate"] => string(23)"2015-12-11T13:32:53.377" 
         ["CreatedTimestamp"] => string(23)  "2015-12-11T13:33:13.747" 
         ["Timeout"] => NULL
         ["AutoActivate"] => bool(false)
         ["BuyerIP"] => bool(false)
         ["MerchantIp"] => NULL
         ["CheckoutOrderArticles"] => array(2) {
            [0] => array(11) {
               ["CheckoutOrderArticleId"] => string(36) "2d3220f1-f3a0-4373-b55b-e7a119d099d2" 
               ["CheckoutOrderId"] => string(36)"00000000-0000-0000-0000-000000000000" 
               ["ArticleName"] => string(23)"Totemme Jojosnöre Gult" 
               ["ArticleNumber"] => int(41)
               ["Description"] => string(27) "Exklusivt jojosnöre. Gult." 
               ["Price"] => float(6.8)
               ["Quantity"] => float(1)
               ["VatValue"] => float(0.25)
               ["CreatedTimestamp"] => string(23)"2015-12-11T13:33:13.747" 
               ["CancelledTimestamp"] => NULL
               ["TotalPrice"] => float(8.5)
            }
            [1] => array(11) {
               ["CheckoutOrderArticleId"] => string(36) "2514060e-49da-40d2-a9ef-ca39b43fb2d4" 
               ["CheckoutOrderId"] => string(36) "00000000-0000-0000-0000-000000000000"
               ["ArticleName"] => string(8) "SHIPPING"
               ["ArticleNumber"] => int(999)
               ["Description"] => string(22) "International Delivery" 
               ["Price"] => float(100)
               ["Quantity"] => float(1)
               ["VatValue"] => float(0.25)
               ["CreatedTimestamp"] => string(23) "2015-12-11T13:33:13.747" 
               ["CancelledTimestamp"] => NULL
               ["TotalPrice"] => float(125)
            }
         }
         ["Customer"] => array(13) {
            ["PersonalInfoId"] => string(36) "00000000-0000-0000-0000-000000000000" 
            ["FirstName"] => string(10) "Marginalen" 
            ["LastName"] => string(6) "Credit" 
            ["Address"] => string(17) "Valhallavägen 66" 
            ["PostalCode"] => string(5) "10000" 
            ["City"] => string(9) "Stockholm" 
            ["Country"] => NULL
            ["MobileNumber"] => string(12)"+46701234567" 
            ["PhoneNumber"] => NULL
            ["Email"] => string(22) "testcredit@hygglig.com" 
            ["CreatedTimestamp"] => string(19) "0001-01-01T00:00:00" 
            ["CustomerEmailURLRequest"] => NULL
            ["CustomerEmailURLRequestTimestamp"] => NULL
         }
         ["Letters"] => array(0) {}
         ["TotalActivatePrice"] => float(133.5)
         ["TotalPrice"] => float(133.5)
         ["TotalPriceWithoutVAT"] => float(106.8)
         ["TotalActivePriceWithoutVAT"] => float(106.8)
         ["Checksum"] => NULL
      }
      [2] => array(19) {
         ["CheckoutOrderId"] => string(36) "5254ada9-a054-468e-b0a1-3b424c8a7838" 
         ["CheckoutOrderNr"] => int(2200021110)
         ["MerchantId"] => string(36) "00000000-0000-0000-0000-000000000000" 
         ["Currency"] => string(3)"SEK" 
         ["MerchantOrderReference"] => string(4) "1210" 
         ["MerchantOrderDate"] => string(23) "2015-12-09T12:45:10.597" 
         ["CreatedTimestamp"] => string(23) "2015-12-09T12:45:20.747" 
         ["Timeout"] => NULL      
         ["AutoActivate"] => bool(false)
         ["BuyerIP"] => bool(false)
         ["MerchantIp"] => NULL
         ["CheckoutOrderArticles"] => array(2) {
            [0] => array(11) {
               ["CheckoutOrderArticleId"] => string(36)"71fe41d5-9919-42bf-a3d4-ad67c14baecf" 
               ["CheckoutOrderId"] => string(36) "00000000-0000-0000-0000-000000000000" 
               ["ArticleName"] => string(57) "S2 The Silver Surfer Stainless Steel" 
               ["ArticleNumber"] => int(42)
               ["Description"] => string(63) "Vill du bli bäst på skolgården?" 
               ["Price"] => float(71.2)
               ["Quantity"] => float(1)
               ["VatValue"] => float(0.25)
               ["CreatedTimestamp"] => string(23) "2015-12-09T12:45:20.747" 
               ["CancelledTimestamp"] => NULL
               ["TotalPrice"] => float(89)
            }
            [1] => array(11) {
               ["CheckoutOrderArticleId"] => string(36) "f52d5361-7b45-49a5-88c2-3a29b290da44" 
               ["CheckoutOrderId"] => string(36) "00000000-0000-0000-0000-000000000000" 
               ["ArticleName"] => string(8) "SHIPPING"
               ["ArticleNumber"] => int(999)
               ["Description"] => string(0)"" 
               ["Price"] => float(100)
               ["Quantity"] => float(1)
               ["VatValue"] => float(0.25)
               ["CreatedTimestamp"] => string(23) "2015-12-09T12:45:20.747" 
               ["CancelledTimestamp"] => NULL
               ["TotalPrice"] => float(125)
            }
         }
         ["Customer"] => array(13) {
            ["PersonalInfoId"] => string(36) "00000000-0000-0000-0000-000000000000" 
            ["FirstName"] => string(10) "Marginalen" 
            ["LastName"] => string(6) "Credit" 
            ["Address"] => string(16) "Valhallavägen 6" 
            ["PostalCode"] => string(5)"10000" 
            ["City"] => string(9) "Stockholm" 
            ["Country"] => NULL
            ["MobileNumber"] => string(12) "+46701234567" 
            ["PhoneNumber"] => NULL
            ["Email"] => string(22) "testcredit@hygglig.com" 
            ["CreatedTimestamp"] => string(19) "0001-01-01T00:00:00" 
            ["CustomerEmailURLRequest"] => NULL
            ["CustomerEmailURLRequestTimestamp"] => NULL
         }
         ["Letters"] => array(0) {}
         ["TotalActivatePrice"] => float(214)
         ["TotalPrice"] => float(214)
         ["TotalPriceWithoutVAT"] => float(171.2)
         ["TotalActivePriceWithoutVAT"] => float(171.2)
         ["Checksum"] => NULL
      }
   }
   ["Success"] => bool(true)
   ["Error"] => NULL
}