urb-it Developer Portal

{"id":"55a4d5531a5f991700a9409e","name":"urb-it Developer Portal","subdomain":"urb-it-developer-portal","versions":[{"_id":"55a4d5541a5f991700a940a1","releaseDate":"2015-07-14T09:24:36.007Z","is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},{"_id":"575676128749830e00681e82","releaseDate":"2016-06-07T07:21:54.005Z","is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":false,"codename":"","version_clean":"2.0.0","version":"2.0"}],"doc_slug":"","current_version":{"version_clean":"1.0.0","version":"1.0"},"oauth":{"enabled":false},"api":{"name":"","url":"https://stage-retailer-api.urb-it.com/api","contenttype":"json","auth":"","explorer":false,"jwt":false,"authextra":[{"_id":"55a6723e80c8a30d00b3269a","type":"header","default":"","key":"Authentication"}],"headers":[],"object_definitions":[]},"apiAlt":[{"_id":"55a8ecfac8bd450d000dd0fa","object_definitions":[],"headers":[],"authextra":[],"jwt":false,"explorer":false,"auth":"","contenttype":"json","url":"https://retailer-api.urb-it.com/api","name":"prod-retailer"},{"_id":"56cc4a0bca43550b00281336","object_definitions":[],"headers":[],"authextra":[],"jwt":false,"explorer":false,"auth":"","contenttype":"json","url":"https://stage-checkout.urb-it.com","name":"stage-checkout"}],"plan_details":{"name":"Developer Hub","is_active":true,"cost":59,"versions":10000,"custom_domain":true,"custom_pages":true,"whitelabel":false,"errors":false,"password":true,"landing_page":true,"themebuilder":true,"stylesheet":true,"javascript":false,"html":true,"extra_html":false,"admins":true,"apps":true},"apps":{"enabled":false},"intercom":"","intercom_secure_emailonly":false,"flags":{"allow_hub2":false,"hub2":false,"migrationRun":false,"oauth":false,"swagger":true,"correctnewlines":false,"speedyRender":false,"allowXFrame":false,"ssl":false},"asset_base_url":""}
  • Documentation
  • Support
  • v1.0
    • v{{v.version}}latestbetaprivatedeprecated
    • View all versions
  • {{ u.user.name }}
    • Admin Panel
    • Log Out
  • Log In
PopularNewestOpen

General


Problem authorization Urb-IT API

Hi, I’m trying to fetch opening hours for a store but I’m having problems with the authentication. I build the authentication header as mentioned here: http://developer.urb-it.com/v1.0/docs/create-the-authorization-header Below is what I get in my logfile. Can you see anything wrong? Not OK returned from Urb-It API: Elapsed time [0:058 seconds] [ Unauthorized ] Parameters: [ application/json={ "from": "2015-10-29T11:35:57.5244218Z", "to": "2015-11-05T11:35:57.5244218Z", "closed": false } : Authorization=UWA 31a8ef40-071c-4f7c-bdfa-1258a7ee7105:vcI59FTY6bDoPqTHwMBJeQyjyjUlNK58pc5IEcOl+kw=:ea5f332f-4ee0-4ea6-849e-b38bd55c7096:1446122157,52542 : Accept=application/vnd.urb-it.se+json; version=1 ] Method: [ openinghours (https://stage-retailer-api.urb-it.com/api/openinghours)] Status [ StatusCode: Unauthorized, StatusDescription: {"status":401,"code":"401","message":"Invalid authorization method.","developer_message":"The provided authorization method is not supported. Supported methods are OAuth1a and UWA.","more_info":null} ]

Solved!
Posted in General by Niklas Hultgren
Thu Oct 29 2015 11:41:01 GMT+0000 (UTC)
188 views
8 comments
Uber-it Integration

Hej, We want to Integrate uber-it in our website. I’m looking on documentation and I think it’s a great application and good documentation. will you please let me know the difference between Getting started with Click&Get and Getting Started with Retailer API?. From where I will start?

Solved!
Posted in General by Nadeem
Tue Apr 26 2016 09:02:56 GMT+0000 (UTC)
46 views
2 comments
The remote server returned an error: (401) Unauthorized error

HI, Hi, I’m trying to validate the postal code but getting “The remote server returned an error: (401) Unauthorized” error. I tried in your online api tool and it’s working.If I copied the Authorization header from your online tool to my post request method and then it’ working. I think some problem in getting the Authorization header. Here is code. public ActionResult Index() { dynamic postcode = new JObject(); postcode.postal_code = "11144"; var contentAsString = JsonConvert.SerializeObject(postcode).ToString(); var header = urbItRequest.GetAuthorizationHeader("POST", "https://stage-retailer-api.urb-it.com/api/postalcode/validate", string.Empty); var response = urbItRequest.DoRequest("POST" , "https://stage-retailer-api.urb-it.com/api/postalcode/validate", header, contentAsString); return View(); } public string GetAuthorizationHeader(string method, string url, string contentAsJson) { var digestBase64 = String.Empty; if (String.IsNullOrWhiteSpace(contentAsJson)) { var content = Encoding.UTF8.GetBytes(contentAsJson); byte[] requestContentHash = MD5.Create().ComputeHash(content); digestBase64 = Convert.ToBase64String(requestContentHash); } var timestamp = urbitConfig.GetTimestamp; var nonce = urbitConfig.GetNonce; var msgToSisgn = String.Format("{0}{1}{2}{3}{4}{5}", urbitConfig.GetStoreId, method.ToUpper(), url.ToLower(), timestamp, nonce, digestBase64); var secretKeyByteArray = Convert.FromBase64String(urbitConfig.GetSharedSecret); using (var hmac = new HMACSHA256(secretKeyByteArray)) { byte[] signatureBytes = hmac.ComputeHash(Encoding.UTF8.GetBytes(msgToSisgn)); var requestSignatureBase64String = Convert.ToBase64String(signatureBytes); return String.Format("UWA {0}:{1}:{2}:{3}", urbitConfig.GetStoreId, requestSignatureBase64String, nonce, timestamp ); } } public string DoRequest(string method, string uri, string header, string parameters = "") { string response = string.Empty; using (var client = new WebClient()) { client.Headers.Add(HttpRequestHeader.Authorization, header); client.Headers.Add(HttpRequestHeader.Accept, string.Format("application/vnd.urb-it.se+json; version={0}", "1")); client.Headers.Add(HttpRequestHeader.ContentType, "application/json; charset=UTF-8"); response = client.UploadString(new Uri(uri), method.ToUpper(), parameters); } return response; } Regards Nadeem

Solved!
Posted in General by Nadeem
Thu Apr 28 2016 12:40:21 GMT+0000 (UTC)
34 views
2 comments
Ask a Question

Categories

  • All Categories
  • General
readme.io