Get Started

Getting started with the REST Admin APIs

The REST Admin APIs let you build apps and other integrations for the Shoplazza admin using REST. With the APIs, you can create apps that offer functionality at every stage of a store's operation, including shipping, fulfillment, and product management.


Authentication

The REST Admin APIs require a Shoplazza access token for making authenticated requests.

Authenticate using OAuth

To get the access token, follow the OAuth authorization flow in the OAuth guide. Include the access token as a Access-Token header in your requests.

You can obtain an access token by following the OAuth authorization process.


REST Admin API

You can access the REST Admin API using curl or any other HTTP client. REST Admin API endpoints are organized by APIs References. You'll need to use different API endpoints depending on the service that your app provides.


Example GET request using curl

The following curl request retrieves information by using the Shop API and the GET /openapi/2020-07/shop endpoint. Replace {shop} with your store’s domain and {token} with the access token you generated in the Authentication section.

Request:

curl -X GET \
  https://{shop}.myshoplazza.com/openapi/2020-07/shop \
  -H 'Content-Type: application/json' \
  -H 'Access-Token: {token}'

Example POST request

The following example illustrates how to create a product by using the Product API and the POST /openapi/2020-07/products endpoint. Replace {shop} with your store’s domain and {token} with the access token you generated in the Authentication section.

Request:
POST https://{shop}.myshoplazza.com/openapi/2020-07/products

{
     "product": {
       "title": "Hipop T-Shirts",
       "brief": "Good product!",
       "published": "false",
       "requires_shipping": "false",
       "inventory_tracking": "false",
       "display_fake_sales": "false"
     }
}

Example PUT request

The following example illustrates how to update the postal code of a customer address by using the Customer Address API and the PUT /openapi/2020-07/customers/{customer_id}/addresses/{address_id} endpoint.

Request:
PUT /openapi/2020-07/customers/123/addresses/123

{
  "address": {
    "id": "123",
    "zip": "90210"
  }
}

Example DELETE request

The following example illustrates how to delete an order by using the Order API and the DELETE /openapi/2020-07/orders/{order_id} endpoint.

Request:
DELETE /openapi/2020-01/orders/123