Duoplane API
  1. Duoplane API overview
Duoplane API
  • Duoplane API overview
    • Access and authentication
    • Request and response basics
    • Rate limiting
  • API reference
    • Order management
      • Orders
        • The Order object
        • Create an order
        • Get an order
    • Product and inventory management
      • Products
        • The Product object
        • Create a product
        • Get a single product
      • Product Inventories
        • The ProductInventory object
  1. Duoplane API overview

Request and response basics

JSON content type#

API data is returned in JSON format. The Duoplane API expects to receive data as JSON.

Response format#

All API responses will be in the following format:
{
  "metadata": {},
  "data": {} or [],
  "errors": []
}

metadata#

metadata will include:
rate limiting information:
requests_remaining
retry_after_seconds
pagination information (when requesting a list of objects)
total_count
has_next_page

data#

data will include the object or objects that your API call is requesting. If you are requesting a list of objects, data will be an array of objects. If you are requesting a single object, data will be a single object.
Each object withindata will have the following format:
{
  "type": "the_type_of_the_object",
  "id": the_id_of_this_object,
  "attributes": {
   ...
  },
  relationships: {
   ...
  }
}
The components of data are:
id: The unique Duoplane-generated id of this resource.
type: The type of resource. For example, order or product.
attributes: A JSON object representing some of the resources attributes. For example, an attribute of a product is its name.
relationships: A JSON objet describing relationships between this resource and other resources. For example, a relationship of an order is its order_items.

errors#

errors will be an array of error messages. If there are no error messages, errors will be an empty array.

Pagination#

All GET responses that return an array of objects are paginated. When making a GET request, you can specify the following paging parameters to retrieve a different page size or results beyond the first page:
per_page: The maximum number of records to return with each call. The default and maximum value is 250.
page: If the count of records matching the search exceeds the number that are returned in a single response, the page number for subsequent requests.
An example of using paging parameters is:
GET https://app.duoplane.com/api/orders?page=2&per_page=100
To help you decide whether to fetch subsequent pages, each paged response includes the following information in metadata:
total_count: The total number of records that fit your search criteria
has_next_page: A boolean value that tells you whether any more records would be on the next page
Modified at 2024-10-04 03:25:34
Previous
Access and authentication
Next
Rate limiting
Built with