Arcadier Marketplace API   >  Sample Website

Sample Website

We have created a sample website purely through using our APIs as the backend services. You can view it at https://bespoke.sandbox.arcadier.io.

In this website, you will be able to see firsthand how the APIs work. We recommend you to try searching for items, viewing the item details and adding an item to a cart.

Do note that this is only the front-facing consumer portal. The admin portal will still remain as an uncustomizable portal from arcadier marketplaces.


Deploy your own website by using our Sample Code

  1. Get the source code of the sample site here: https://github.com/iOS-Arcadier/Sample-Arctick-APIs.git

    This code is in .net 4.5 MVC framework thus you would require Microsoft Visual Studio (Recommended version 2015)

  2. Clone the source code and open it using Microsoft Visual Studio.
  3. Change the value of the website in the "ApiURL" key to your own sandbox marketplace URL.
    (e.g. {henry}.sandbox.arcadier.io/api should be {yourmarketplacename}.sandbox.arcadier.io/api)
  4. Change the "ClientId" value to the one provided by your own sandbox marketplace admin portal.
  5. Change the "ClientSecret" value as well.
  6. "UserToken" is optional, you can put one token as the default value, so that your website would still function even if you don't login.
  7. Now rebuilt and publish your own website onto IIS server and try it out.

Develop your own website

You can also build your own consumer portal from scratch.

  1. 1. Authorize your server to call the APIs
    1. In the URL below, replace {yourmarketplacename} with your sandbox marketplace name, {your_client_id} with your own Client ID from your admin portal and {yourserveruri/} with your server's uri.

      https://{yourmarketplacename}.sandbox.arcadier.io/api/account/externallogin?provider=Google&response_ type=code&dient_id={your_client_id}&scope=basic&redirect_uri=https://{yourserveruri}/apitoken

      Do take note that your uri has to be SSL secured. (i.e it needs https://)

    2. If prompted, login with your sandbox marketplace admin account using your Google credentials.
    3. When successful, you will be able to get the return URL with the access token code (in red).
      Sample code: https://{yourserveruri}apitoken?code=63fb2fd819d04d2aba7a8add12823a1a

    This code is unique and can only be called once when getting the token and it will be used whether the call was successful or not. (i.e. you will have to get a new code if unsuccessful)

  2. 2. Get Token
    Request
    
    Header:
    Accept: application/json 
    Content-Type: application/x-www-form-urlencoded
    Method: Post
    
    URL: https://www.sandbox.arcadier.io/token
    
    Body:
    grant_type=authorization_code&client_id=&client_secret=&code=63fb2fd819d04d2aba7a8add12823a1a&redirect_uri=https://localhost:8080/apitoken
    

    P.S. The redirect_uri should be exactly the same with the redirect_uri you used in 1.1. Here we use https://{yourserveruri}:8080/apitoken because we used it at step 1.1.

    Response:
    {
       "access_token": "UuM8WNuUr51rt9eZT6zztHp3omgIl7RSXf_8fqc3pa0QRwZQF8-mZ9bnrMoJ6cMR7z5HA0WWUpkHjeaiEVyKdxNjYZI-cG9tqGcEJZbSNTvptgcgABkFx962FmjFx4Ho63ALBlzjZBUhjmoFvQRT7ZQGhGN7SzY8GNe4DhsY7fZBzqQhMYY4d0_pIv4Jk_4nIrZBxtbBRTuvxHmK1OMrFjWQM4mL0viSP8mlwDVqwo3VFHcGydB4hcmyK62E4E7YPlwYKFMtytIfIFIK4QKxcy9viUk3E9i7njSfKKTYtZONY03l-XG_s2AUoRi7T4dhKJ5RUwMmtu243NAE8Xb0TIkWPFVokg-fs6kL8RA8cEMEYtEeIFiRBXkIdAxOglD26af5bC2LAWqSdi6x7PyR2Grk73YN5SNibCu1Ivi41gbkKSDW7RAYRDbJ1OA77-1wOG57HE9pyEzhVh9sHCE89AQo4ond9B7QdDy_s2AeV1j9sWk_xWK6pqx_LmOYEGG8-a5ZUbqT6VrfRg6sMq_wdHX4-FyUxDiqJ6McMjw7zsxVaieP5URzALzxuSzn-PC4G0Lwcuz7QfiOPZx47zC0OnRr0eg",
       "token_type": "bearer",
       "expires_in": 2159999,
       "refresh_token": "3c6086e3171d48b791327decea010c94285daa194e5e4208bee070655a382aa4",
       "userName": "Google-HenryTang-EYtE8mgJgF",
       ".issued": "Thu, 10 Nov 2016 06:41:57 GMT",
       ".expires": "Mon, 05 Dec 2016 06:41:57 GMT",
       "client_id": "ec4OmZynY7t1fKrPiQZzyHYGML1yruBN7s8bFqJo"
    }
    
  3. 3. Call API
    Request
    
    Header:
    Accept: application/json
    Authorization: Bearer UuM8WNuUr51rt9eZT6zztHp3omgIl7RSXf_8fqc3pa0QRwZQF8-mZ9bnrMoJ6cMR7z5HA0WWUpkHjeaiEVyKdxNjyZI-cG9tqGcEJZbSNTvptgcgABkFx962FmjFx4Ho63ALBlzjZBUhjmoFvQRT7ZQGhGN7SzY8GNe4DhsY7fZBzqQhMYY4d0_pIv4Jk_4nIrZBxtbBRTuvxHmK1OMrFjWQM4mL0viSP8mlwDVqwo3VFHcGydB4hcmyK62E4E7YPlwYKFMtytIfIFIK4QKxcy9viUk3E9i7njSfKKTYtZONY03l-XG_s2AUoRi7T4dhKJ5RUwMmtu243NAE8Xb0TIkWPFVokg-fs6kL8RA8cEMEYtEeIFiRBXkIdAxOglD26af5bC2LAWqSdi6x7PyR2Grk73YN5SNibCu1Ivi41gbkKSDW7RAYRDbJ1OA77-1wOG57HE9pyEzhVh9sHCE89AQo4ond9B7QdDy_s2AeV1j9sWk_xWK6pqx_LmOYEGG8-a5ZUbqT6VrfRg6sMq_wdHX4-FyUxDiqJ6McMjw7zsxVaieP5URzALzxuSzn-PC4G0Lwcuz7QfiOPZx47zC0OnRr0eg
    	
    Method: Get
    
    URL: https://example.sandbox.arcadier.io/api/account/info
    	
    Response:
    {
       "Id": 47,
       "UserName": "GoogleUserName",
       "Email": "example@gmail.com",
       "ImplementationID": 86,
       "PublicID": null,
       "FirstName": "Henry",
       "LastName": "Tang",
       "Description": null,
       "DisplayName": "Henry",
       "Guest": false,
       "BusinessProfileID": 29,
       "IsAgreedToTerms": true,
       "AgreedToTermsDateTime": "2016-08-08T04:53:35.2191192",
       "Onboarded": false,
       "ModifiedDateTime": "2016-08-08T04:53:35.2347442",
       "CreatedDateTime": "2016-05-19T02:55:09.5652278",
       "Active": true,
       "PhoneNumber": "1111",
       "Visible": true,
       "LanguageCode": "en",
       "Language": null,
       "Implementation": {
          "ID": 86,
          "Sponsor": null,
          "SponsorUrl": null,
          "Name": "henry",
          "Domain": "example.sandbox.arcadier.io",
          "Logo": 347,
          "LogoUrl": "b06261a4-1e22-42c4-bbb9-7c8a2b6dd28a.png",
          "Slogan": "eeee",
          "SeoTitle": null,
          "SeoDescription": null,
          "CountryCode": "AU",
          "CurrencyCode": "SGD",
          "CoverImage": null,
          "GoogleAnalyticsTrackingId": null,
          "GoogleAnalyticsViewId": null,
          "GoogleAnalyticsClientId": null,
          "GoogleAnalyticsClientSecret": null,
          "Theme": null,
          "Homepage": null,
          "DefaultDomain": "example.sandbox.arcadier.io",
          "ActiveDomain": null,
          "CreatedDateTime": "0001-01-01T00:00:00",
          "ModifiedDateTime": "2016-08-16T08:29:47.8457032",
          "IisStatus": "added",
          "CustomDomains": [],
          "DefaultConsumerLanguageCode": "en",
          "DefaultMerchantLanguageCode": "en",
          "ImplementationTranslations": []
       }
    }
                                
Back To Top