NAV

BigCommerce Script API

About the API

The BigCommerce Scripts API can be used to add a script to a store’s page. Some use cases:

To get started make sure you have the content scope Checkout Content selected in the BigCommerce Control Panel for the API Account. Accounts can only be created by the store owner.

Notes:

Definitions:

Script Manager API Partner Guidelines

With the Script Manager API, your Apps now have the ability to insert scripts into a user’s storefront without requiring the user to manually paste a snippet of code into their control panel. You can freely update these scripts while your App is installed, and, if desired, have them automatically removed should your App be uninstalled.

For Apps being installed on our latest theme engine (Stencil), this process is relatively straightforward. However, if your App is already live, you may have already asked merchants to paste a code snippet in one of these two sections in the control panel:

Also, since our older (Blueprint-based) themes do not support the Script Manager API, you’ll still need some way of providing users of older themes the documentation they need, without burdening users of newer themes with additional, unnecessary steps.

To help you transition to the Script Manager API, we’ve provided some recommended strategies to deal with these different situations.

Stencil vs Blueprint

As mentioned above, BigCommerce supports two theme engines: Stencil and Blueprint. Stencil is our latest technology, and all new stores only have access to Stencil themes. However, older stores may still be using our legacy theme engine, Blueprint, which does not have the ability to render scripts inserted through the Script Manager API.

Because of this, you’ll need to check whether a user is running Stencil to determine if their store supports the Script Manager API. To do this, use the Get Store Information API endpoint and check the stencil_enabled flag. (requires store_v2_information_read_only scope).

To learn more about the theme frameworks visit:

Prerequisites

To better understand the content of this document, you should be familiar with the app installation procedure, which is outlined here: https://developer.bigcommerce.com/api/#app-installation-and-update-sequence

Using the new Script API

Installing An App on Stencil

For Apps being installed on Stencil stores, we recommend inserting your scripts immediately after receiving the POST response during the Auth Callback flow. Add your scripts using the Create Script endpoint of the Script Manager API.

We highly recommend leaving the auto_uninstall flag set to true, so that your App will properly clean itself up when uninstalled. More information about this flag can be found here.

Upgrading Existing Apps on Stencil

If your App has already been released, you may have existing users with pasted-in code somewhere in their control panel. There are a few possible ways to deal with this situation.

1.) Do nothing

If you don’t need to upgrade existing merchants to the Script Manager API, it’s perfectly fine to leave them as-is. You’ll need to maintain documentation for the manual uninstallation process so that merchants with older installations know what to clean up, and you won’t be able to automatically update or add scripts for these users.

2.) Prompt merchants to upgrade

If you want your merchants to gradually update to the new Script Manager over time, you can prompt them to do so on your App’s landing page. You’ll need to keep track of which of your merchants are not using the Script Manager yet to know whether you need to display this prompt. Also, make sure to check that they are running Stencil (via the Get Store Information endpoint) before prompting them to upgrade.

Once a user decides to upgrade, you can walk them through removing the old pasted-in code in their control panel, and then, once the merchant clicks a button, install your scripts through the Script Manager API.

3.) Silently upgrade to the Script Manager API

Finally, if it’s possible for your old, pasted-in scripts to live alongside the new Script Manager API scripts, you may be able to upgrade to using the Script Manager API without any user intervention being required. Whether or not this is possible will vary depending on the implementation of your App.

While your merchants will be loading more data on their storefront pages than necessary, this method will allow you to transition to using the Script Manager API for all of your installations immediately. Keep in mind you’ll still need to document the manual uninstallation process for existing installations.

Installing Apps on Blueprint Stores

As mentioned, the Blueprint theme engine does not support the Script Manager API. Any scripts inserted through this API will not be rendered on any storefront pages. To prevent unpredictable behavior should a user change their theme, we highly recommend checking the Get Store Information endpoint for Stencil support prior to installing any scripts through the Script Manager API. Additionally, you’ll still want to show the old manual installation steps when a store does not support Stencil.

Existing Blueprint Installations

Existing blueprint installations won’t be affected, but remember that if you are prompting existing Stencil users to upgrade to the Script Manager, you’ll want to suppress this message for Blueprint users.

Fixing Missing Scripts

It’s possible that your App installation may find itself unexpectedly missing one or more scripts. Below are some possible causes of this issue.

1.) The Merchant Deleted Your Script

Merchants are given a warning when attempting to delete a script belonging to an App, but we do allow them to do so.

If you want to handle this situation gracefully, we recommend you check the Get Scripts endpoint on your App Detail Page (returned by the Load Callback URI) to determine whether the expected scripts are present. If they are not, you can prompt the user to click a button to automatically repair their installation.

We ask that you request the user’s permission rather than doing this automatically, as they may have had a good reason for deleting the missing script.

2.) The Merchant’s Theme is Not Set Up Correctly

In order to render scripts, the theme templates must have the handlebars expressions {{head.scripts}} and {{footer.scripts}} in the pages where scripts should be rendered. If either of these is absent, scripts on that page with location set to head or footer (respectively) will not be rendered.

Of particular note, {{head.scripts}} was only recently added to the checkout and order confirmation pages in our Cornerstone theme, and widespread adoption of this standard outside of Cornerstone is still an ongoing process.

To ensure your App is compatible with as many themes as possible, we recommend footer over head for checkout, order_confirmation and all_pages visibilities.

3.) Scripts Are Not Rendering in the Checkout and Order Confirmation

In order to render scripts, the store must have BigCommerce’s Optimized one-page checkout enabled. This is the default checkout type for all new Stencil stores. Existing stores have to manually change the checkout type as detailed in this article.

Stencil themes from the marketplace support the Optimized One-Page Checkout. However, there could be instances where the merchant maintains their own private theme and the theme has not been updated to support the Optimized one-page checkout. In this case, the merchant is required to add the theme support, following the steps here.


Run in Postman

createScript


from urllib2 import Request, urlopen

values = """
  {
    "name": "jQuery",
    "description": "The Write Less, Do More, JavaScript Library.",
    "src": "https://code.jquery.com/jquery-3.2.1.min.js",
    "auto_uninstall": true,
    "load_method": "defer",
    "location": "head",
    "visibility": "storefront",
    "kind": "src"
  }
"""

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
request = Request('https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts', data=values, headers=headers)

response_body = urlopen(request).read()
print response_body

require 'rest_client'
require 'json'

values = '{
  "name": "jQuery",
  "description": "The Write Less, Do More, JavaScript Library.",
  "src": "https://code.jquery.com/jquery-3.2.1.min.js",
  "auto_uninstall": true,
  "load_method": "defer",
  "location": "head",
  "visibility": "storefront",
  "kind": "src"
}'

headers = {
  :content_type => 'application/json',
  :accept => 'application/json'
}

response = RestClient.post 'https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts', values, headers
puts response


<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

curl_setopt($ch, CURLOPT_POST, TRUE);

curl_setopt($ch, CURLOPT_POSTFIELDS, "{
  \"name\": \"jQuery\",
  \"description\": \"The Write Less, Do More, JavaScript Library.\",
  \"src\": \"https://code.jquery.com/jquery-3.2.1.min.js\",
  \"auto_uninstall\": true,
  \"load_method\": \"defer\",
  \"location\": \"head\",
  \"visibility\": \"storefront\",
  \"kind\": \"src\"
}");

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  "Content-Type: application/json",
  "Accept: application/json"
));

$response = curl_exec($ch);
curl_close($ch);

var_dump($response);
{
  "data": {
    "uuid": "2bf40be2-e57a-4bc8-860a-5bf45edd3795",
    "name": "jQuery",
    "description": "The Write Less, Do More, JavaScript Library.",
    "src": "https://code.jquery.com/jquery-3.2.1.min.js",
    "auto_uninstall": true,
    "load_method": "defer",
    "location": "head",
    "visibility": "storefront",
    "kind": "src",
    "api_client_id": "d1j42k5q76xsm15fa3g8sp2egytoixo",
    "date_created": "2017-12-05T23:37:45.506Z",
    "date_modified": "2017-12-05T23:37:45.506Z"
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

POST /content/scripts

Creates a script.

Parameters

Parameter In Type Required Description
body body ScriptPost true No description

getAllScripts


from urllib2 import Request, urlopen

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
request = Request('https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts{?page,limit}', headers=headers)

response_body = urlopen(request).read()
print response_body

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts{?page,limit}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  "Content-Type: application/json",
  "Accept: application/json"
));

$response = curl_exec($ch);
curl_close($ch);

var_dump($response);

require 'rest_client'
require json

headers = {
  :content_type => 'application/json',
  :accept => 'application/json'
}

response = RestClient.get 'https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts{?page,limit}', headers
puts response

{
  "data": [
    {
      "uuid": "2bf40be2-e57a-4bc8-860a-5bf45edd3795",
      "name": "jQuery",
      "description": "The Write Less, Do More, JavaScript Library.",
      "src": "https://code.jquery.com/jquery-3.2.1.min.js",
      "auto_uninstall": true,
      "load_method": "defer",
      "location": "head",
      "visibility": "storefront",
      "kind": "src",
      "api_client_id": "d1j42k5q76xsm15fa3g8sp2egytoixo",
      "date_created": "2017-12-05T23:37:45.506Z",
      "date_modified": "2017-12-05T23:37:45.506Z"
    }
  ],
  "meta": {
    "pagination": {
      "total": 0,
      "count": 0,
      "per_page": 0,
      "current_page": 0,
      "total_pages": 0,
      "links": {
        "previous": "string",
        "current": "string",
        "next": "string"
      }
    }
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

GET /content/scripts

Gets all scripts.

Parameters

Parameter In Type Required Description
page query integer false Specifies the page number in a limited (paginated) list of products.
limit query integer false Controls the number of items per page in a limited (paginated) list of products.

Responses

Status Meaning Description Schema
200 Created Success. ScriptsResponse
422 Unprocessable Entity This is the result of missing required fields, or of invalid data. See the response for more details. ErrorResponse

getAScript


from urllib2 import Request, urlopen

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
request = Request('https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}', headers=headers)

response_body = urlopen(request).read()
print response_body

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  "Content-Type: application/json",
  "Accept: application/json"
));

$response = curl_exec($ch);
curl_close($ch);

var_dump($response)
require 'rest_client'
require 'json'

headers = {
  :content_type => 'application/json',
  :accept => 'application/json'
}

response = RestClient.get 'https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}', headers
puts response

{
  "data": {
    "uuid": "2bf40be2-e57a-4bc8-860a-5bf45edd3795",
    "name": "jQuery",
    "description": "The Write Less, Do More, JavaScript Library.",
    "src": "https://code.jquery.com/jquery-3.2.1.min.js",
    "auto_uninstall": true,
    "load_method": "defer",
    "location": "head",
    "visibility": "storefront",
    "kind": "src",
    "api_client_id": "d1j42k5q76xsm15fa3g8sp2egytoixo",
    "date_created": "2017-12-05T23:37:45.506Z",
    "date_modified": "2017-12-05T23:37:45.506Z"
  }
}

GET /content/scripts/{uuid}

Gets a single script.

Parameters

Parameter In Type Required Description
uuid path string(uuid) true The identifier for a specific script.
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Success ScriptResponse
404 Not Found The resource was not found. ErrorResponse
422 Unprocessable Entity This is the result of missing required fields, or of invalid data. See the response for more details. ErrorResponse

updateScript

from urllib2 import Request, urlopen

values = """
  {
    "name": "jQuery",
    "description": "The Write Less, Do More, JavaScript Library.",
    "src": "https://code.jquery.com/jquery-3.2.1.min.js",
    "auto_uninstall": true,
    "load_method": "defer",
    "location": "head",
    "visibility": "storefront",
    "kind": "src"
  }
"""

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
request = Request('https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}', data=values, headers=headers)
request.get_method = lambda: 'PUT'

response_body = urlopen(request).read()
print response_body
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");

curl_setopt($ch, CURLOPT_POSTFIELDS, "{
  \"name\": \"jQuery\",
  \"description\": \"The Write Less, Do More, JavaScript Library.\",
  \"src\": \"https://code.jquery.com/jquery-3.2.1.min.js\",
  \"auto_uninstall\": true,
  \"load_method\": \"defer\",
  \"location\": \"head\",
  \"visibility\": \"storefront\",
  \"kind\": \"src\"
}");

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  "Content-Type: application/json",
  "Accept: application/json"
));

$response = curl_exec($ch);
curl_close($ch);

var_dump($response);
require 'rest_client'
require 'json'

values = '{
  "name": "jQuery",
  "description": "The Write Less, Do More, JavaScript Library.",
  "src": "https://code.jquery.com/jquery-3.2.1.min.js",
  "auto_uninstall": true,
  "load_method": "defer",
  "location": "head",
  "visibility": "storefront",
  "kind": "src"
}'

headers = {
  :content_type => 'application/json',
  :accept => 'application/json'
}

response = RestClient.put 'https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}', values, headers
puts response

{
  "data": {
    "uuid": "2bf40be2-e57a-4bc8-860a-5bf45edd3795",
    "name": "jQuery",
    "description": "The Write Less, Do More, JavaScript Library.",
    "src": "https://code.jquery.com/jquery-3.2.1.min.js",
    "auto_uninstall": true,
    "load_method": "defer",
    "location": "head",
    "visibility": "checkout",
    "kind": "src",
    "api_client_id": "d1j42k5q76xsm15fa3g8sp2egytoixo",
    "date_created": "2017-12-05T23:37:45.506Z",
    "date_modified": "2017-12-05T23:37:45.506Z"
  }
}

PUT /content/scripts/{uuid}

Updates a script.

Parameters

Parameter In Type Required Description
uuid path string(uuid) true The identifier for a specific script.
body body ScriptPut true No description
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Success ScriptResponse
404 Not Found The resource was not found. ErrorResponse
422 Unprocessable Entity This is the result of missing required fields, or of invalid data. See the response for more details. ErrorResponse

deleteScript

from urllib2 import Request, urlopen

headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
request = Request('https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}', headers=headers)
request.get_method = lambda: 'DELETE'

response_body = urlopen(request).read()
print response_body;

require 'rest_client'
require 'json'

headers = {
  :content_type => 'application/json',
  :accept => 'application/json'
}

response = RestClient.delete 'https://api.bigcommerce.com/stores/{{store_id}}/v3/content/scripts/{uuid}', headers
puts response

DELETE /content/scripts/{uuid}

Deletes a script.

Parameters

Parameter In Type Required Description
uuid path string(uuid) true The identifier for a specific script.
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
204 No Content An empty response. None
404 Not Found The resource was not found. ErrorResponse
422 Unprocessable Entity This is the result of missing required fields, or of invalid data. See the response for more details. ErrorResponse

Schema

Script

{
  "uuid": "2bf40be2-e57a-4bc8-860a-5bf45edd3795",
  "name": "jQuery",
  "description": "The Write Less, Do More, JavaScript Library.",
  "src": "https://code.jquery.com/jquery-3.2.1.min.js",
  "auto_uninstall": true,
  "load_method": "defer",
  "location": "head",
  "visibility": "storefront",
  "kind": "src",
  "api_client_id": "d1j42k5q76xsm15fa3g8sp2egytoixo",
  "date_created": "2017-12-05T23:37:45.506Z",
  "date_modified": "2017-12-05T23:37:45.506Z"
}

Properties

Name Type Required Description
uuid string(uuid) false The primary identifier.
name string false The user-friendly name.
description string false The user-friendly description.
html string false An html string containing exactly one script tag. Only present if kind is script_tag
src string false The src attribute of the script to load. Only present if kind is src.
auto_uninstall boolean false Whether to uninstall this script when the app associated with it is removed.
load_method string false The load method to use for the script. Values are default, async, or defer.
location string false Where on the page to place the script. Values are head or footer.
visibility string false Which set of pages the script should load on. The values allowed for this parameter are storefront, all_pages, checkout and order_confirmation. Please note that you need to have Checkout content scope to use all_pages and checkout.
kind string false What type of script this is. Values are src - a script tag will be generated with its src attribute set to the value of src; script_tag - The value of html will be injected directly onto the page.
api_client_id string false The client id of the API user that created this script, or blank if created by other means.
date_created string(date-time) false The date on which this object was initially created.
date_modified string(date-time) false The date on which this object was last updated.
Enumerated Values
Property Value
load_method default
load_method async
load_method defer
location head
location footer
visibility storefront
visibility all_pages
visibility checkout
visibility order_confirmation
kind src
kind script_tag

ScriptPost

{
  "name": "jQuery",
  "description": "The Write Less, Do More, JavaScript Library.",
  "src": "https://code.jquery.com/jquery-3.2.1.min.js",
  "auto_uninstall": true,
  "load_method": "defer",
  "location": "head",
  "visibility": "storefront",
  "kind": "src"
}

Properties

Name Type Required Description
name string true The user-friendly name.
description string false The user-friendly description.
html string false An html string containing exactly one script tag. Required if kind is script_tag.
src string false The src attribute of the script to load. Required if kind is src. Must be in https format.
auto_uninstall boolean false Whether to uninstall this script when the app associated with it is removed.
load_method string false The load method to use for the script. Acceptable values are default, async, or defer.
location string false Where on the page to place the script. Acceptable values are head or footer.
visibility string false Which set of pages the script should load on. The values allowed for this parameter are storefront, all_pages, checkout and order_confirmation. Please note that you need to have Checkout content scope to use all_pages and checkout.
kind string false What type of script this is. Acceptable values are src - a script tag will be generated with its src attribute set to the value of src; script_tag - The value of html (which must contain a single script tag) will be injected directly onto the page.
Enumerated Values
Property Value
load_method default
load_method async
load_method defer
location head
location footer
visibility storefront
visibility all_pages
visibility checkout
visibility order_confirmation
kind src
kind html

ScriptPut

{
  "name": "jQuery",
  "description": "The Write Less, Do More, JavaScript Library.",
  "src": "https://code.jquery.com/jquery-3.2.1.min.js",
  "auto_uninstall": true,
  "load_method": "defer",
  "location": "head",
  "visibility": "storefront",
  "kind": "src"
}

Properties

Name Type Required Description
name string false The user-friendly name.
description string false The user-friendly description.
html string false An html string containing exactly one script tag. Required if kind is included and equal to script_tag.
src string false The src attribute of the script to load. Required if kind is included and equal to src. Must be in https format.
auto_uninstall boolean false Whether to uninstall this script when the app associated with it is removed.
load_method string false The load method to use for the script. Acceptable values are default, async, or defer.
location string false Where on the page to place the script. Acceptable values are head or footer.
visibility string false Which set of pages the script should load on. The values allowed for this parameter are storefront, all_pages, checkout and order_confirmation. Please note that you need to have Checkout content scope to use all_pages and checkout.
kind string false What type of script this is. Acceptable values are src - a script tag will be generated with its src attribute set to the value of src; script_tag - The value of html (which must contain a single script tag) will be injected directly onto the page.
Enumerated Values
Property Value
load_method default
load_method async
load_method defer
location head
location footer
visibility storefront
visibility all_pages
visibility checkout
visibility order_confirmation
kind src
kind html

ScriptResponse

{
  "data": {
    "uuid": "2bf40be2-e57a-4bc8-860a-5bf45edd3795",
    "name": "jQuery",
    "description": "The Write Less, Do More, JavaScript Library.",
    "src": "https://code.jquery.com/jquery-3.2.1.min.js",
    "auto_uninstall": true,
    "load_method": "defer",
    "location": "head",
    "visibility": "storefront",
    "kind": "src",
    "api_client_id": "d1j42k5q76xsm15fa3g8sp2egytoixo",
    "date_created": "2017-12-05T23:37:45.506Z",
    "date_modified": "2017-12-05T23:37:45.506Z"
  }
}

Properties

Name Type Required Description
data Script false No description

ScriptsResponse

{
  "data": [
    {
      "uuid": "2bf40be2-e57a-4bc8-860a-5bf45edd3795",
      "name": "jQuery",
      "description": "The Write Less, Do More, JavaScript Library.",
      "src": "https://code.jquery.com/jquery-3.2.1.min.js",
      "auto_uninstall": true,
      "load_method": "defer",
      "location": "head",
      "visibility": "storefront",
      "kind": "src",
      "api_client_id": "d1j42k5q76xsm15fa3g8sp2egytoixo",
      "date_created": "2017-12-05T23:37:45.506Z",
      "date_modified": "2017-12-05T23:37:45.506Z"
    }
  ],
  "meta": {
    "pagination": {
      "total": 0,
      "count": 0,
      "per_page": 0,
      "current_page": 0,
      "total_pages": 0,
      "links": {
        "previous": "string",
        "current": "string",
        "next": "string"
      }
    }
  }
}

Properties

Name Type Required Description
data [Script] false No description
meta CollectionMeta false No description

ErrorResponse

{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string",
  "errors": {
    "property1": "string",
    "property2": "string"
  }
}

Properties

Name Type Required Description
status integer false The HTTP status code.
title string false The error title describing the particular error.
type string false No description
instance string false No description

CollectionMeta

{
  "pagination": {
    "total": 0,
    "count": 0,
    "per_page": 0,
    "current_page": 0,
    "total_pages": 0,
    "links": {
      "previous": "string",
      "current": "string",
      "next": "string"
    }
  }
}

Properties

Name Type Required Description
pagination Pagination false No description

Pagination

{
  "total": 0,
  "count": 0,
  "per_page": 0,
  "current_page": 0,
  "total_pages": 0,
  "links": {
    "previous": "string",
    "current": "string",
    "next": "string"
  }
}

Properties

Name Type Required Description
total integer false Total number of items in the result set.
count integer false Total number of items in the collection response.
per_page integer false The amount of items returned in the collection per page, controlled by the limit parameter.
current_page integer false The page you are currently on within the collection.
total_pages integer false The total number of pages in the collection.
links object false Pagination links for the previous and next parts of the whole collection.
previous string false Link to the previous page returned in the response.
current string false Link to the current page returned in the response.
next string false Link to the next page returned in the response.