Introduction

Comprehensive Order Management System API for inventory, orders, and fulfillment

The MasonHub REST API enables you to programmatically manage your entire supply chain operations, from catalog management to order fulfillment and everything in between.

Endpoints

Core Resources

Fulfillment Operations

Integration Tools

  • Callbacks & Events: Real-time webhooks for order and shipment events
  • DataFactory: Testing utilities for simulating operations and generating test data

Authentication

You can generate an API key through your MasonHub dashboard. API keys are associated with your account and provide access to all MasonHub API endpoints.

Bearer Token Authentication

The MasonHub API uses JWT Bearer tokens for authentication. Include your token in the Authorization header of all requests.

Bearer tokens begin with the eyJ prefix and are used for all API operations. Keep your bearer tokens secret.

All API endpoints require HTTPS with a valid JWT Bearer token. Requests over HTTP or without authentication will be rejected.

Using Your Token

Include the bearer token in the Authorization header:

curl -X GET "https://app.masonhub.co/{account}/api/v1/orders" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Base URLs

https://sandbox.masonhub.co/{account_slug}/api/v1/

Use for development and testing

API Design Principles

The MasonHub API follows consistent design principles:

Search-First Design

GET methods use search parameters for composability and flexible data retrieval

Batch Operations

All methods accept/return arrays for efficient bulk operations

Flexible Responses

Use list_type=detail|summary for appropriate response detail levels

RESTful Design

Standard GET, POST, PUT, DELETE operations (No PATCH)

Data Formats

Date and Time

All timestamps use RFC3339 format for consistency:

2024-01-15T10:30:00Z

Pagination

Standard pagination parameters across all list endpoints:

ParameterTypeDescriptionDefault
limitintegerNumber of results [1..100]30
offsetintegerPagination offset0

Response Format

All responses follow a consistent structure:

{
  "limit": 30,
  "offset": 0,
  "list_type": "detail",
  "data": [
    // Array of results
  ]
}