ShopBase Developers
  • Getting started
  • Build An App
    • Making your first request
      • Authentication
        • Public apps
        • Private apps
        • OAuth
        • API access scopes
      • Rest API References
        • Rate limits
      • Using webhooks
        • Webhook events and topics
      • Response status codes
    • How to submit an app to ShopBase App Store
    • Getting your app approved
      • App requirements
      • Testing your app
      • Submitting your app
      • The review process
  • BUILD A THEME
    • Getting started building themes
    • Theme development resources
      • Connect to your store & start developing
      • Theme structure
      • Theme object, methods, and props
      • Theme editor
        • How to update configure for theme editor
    • How to submit a theme to ShopBase Theme Store
    • Storefront SDK
  • Test and Debug app
    • Debug apps with Postman
  • Tutorial
    • Manage orders and shipping
      • Manage orders with the REST Admin API
        • Transaction
        • Order
      • Edit an existing order with the Admin API
      • Manage fulfillments with Fulfillment and FulfillmentService resources
      • Get a country field using Admin API
  • Integrate a payment gateway
    • How to create your payment gateway on ShopBase
    • Technical Specifications
Powered by GitBook
On this page
  • Generate API credentials from the ShopBase admin
  • Making your first request
  • Sample App

Was this helpful?

  1. Build An App

Making your first request

This guide describes the basic steps for getting started with ShopBase's API. You can create your development stores to test your apps, themes, and other integrations that you build.

PreviousGetting startedNextAuthentication

Last updated 4 years ago

Was this helpful?

The first step in building an app for ShopBase is to join the ShopBase Partner Program by .

Generate API credentials from the ShopBase admin

When you make an API call, you need to include API credentials to authenticate it. You can quickly generate API credentials by creating a private app from your development store's ShopBase admin. When you create the private app, ShopBase creates an API key and password, which you can include in API calls to the development store.

To learn more about public and private apps, see .

Steps:

  1. From your ShopBase admin, go to Apps.

  2. Click Manage private apps.

  3. Click Create a new private app.

  4. In the App details section, enter a name for your app, and an emergency developer email.

  5. In the Admin API section, select the areas of your store that you want the app to access.

  6. Click Save.

After you save the app's details, the Admin API section shows the app's API key and password.

Caution

Treat the API key and password like you would any other password since whoever has access to these credentials has full API access to the store.

Making your first request

You can use the API key and password that you generated for of your first request. The URL format for basic authorization is as follows:

https://{username}:{password}@{shop}.onshopbase.com/admin/{resource}.json
  • {username} — The API key that you generated

  • {password} — The API password

  • {shop} - The name that you entered for your development store

A URL with real values looks like this:

https://38b3692b6b48a9712b8d909c46e6208d:c2dc0abbdef5825da69ee1647962ce2d@example.onshopbase.com/admin/products.json

The following curl request retrieves information by using the Shop resource and the /admin/shop.jsonendpoint:

curl -X GET https://{username}:{password}@{shop}.onshopbase.com/admin/shop.json -H 'Content-Type: application/json'

Substitute your own values, and then run the curl command from the command line to retrieve information from your development store.

Sample App

{resource} — A resource endpoint from the

You can use SampleApp from this as a reference for understanding authentication flow of a ShopBase app and how to call ShopBase APIs with public app.

REST admin API
github repo
Authentication
basic HTTP authorization
creating a partner account