ShopWired's API
The ShopWired API provides a comprehensive set of tools to help you build e-commerce solutions, integrate third-party services, and customise websites for ShopWired users.
ShopWired's API endpoints are documented through the ReadMe website at https://shopwired.readme.io
ShopWired's API can be accessed through two types of authentication methods:
Read more about API authentication
The API is accessible through the dedicated API domain, https://api.ecommerceapi.uk
. The API version number must be specified in requests; the current version number is v1
. For example:
GET https://api.ecommerceapi.uk/v1/orders
AI assistant
AI assistant
ShopWired offers an advanced AI-powered assistant, designed to provide instant support and guidance on every aspect of the ShopWired API. Powered by GPT technology, this AI has been trained on the entire API help guide, including all endpoint documentation, usage examples, and best practices.
The AI can provide comprehensive, real-time assistance helping with:
- Understanding API endpoints – Get detailed explanations of each API endpoint, including request and response structures, parameters, and authentication methods
- Code examples – Request example code in multiple languages for common API tasks such as creating, retrieving, updating, or deleting resources
- Troubleshooting – Receive guidance on resolving common API errors and issues
- Best practices – Learn about recommended approaches for integrating with the ShopWired API
- Webhooks and authentication – Get help with configuring webhooks, verifying signatures, and handling authentication
The AI can be accessed at https://tinyurl.com/shopwired-api-ai
API requirements
API requirements
The ShopWired API adheres to REST principles and supports the following features:
- HTTP Authentication: All requests require valid authentication
- HTTP Verbs: Use standard methods such as
GET
,POST
,PUT
, andDELETE
- JSON Responses: All responses are provided in
JSON
format - HTTPS Only: All requests must be sent over
HTTPS
; non-secure HTTP requests will be rejected - Content-Type:
PUT
andPOST
requests must specifyapplication/json
as theContent-Type
Error Handling
Error Handling
The ShopWired API uses standard HTTP status codes to indicate success or failure:
- 2xx: Successful requests
- 4xx: Client errors (e.g., invalid parameters, authentication errors)
- 5xx: Server errors
Common status codes
200 OK
– Successful request201 Created
– Resource created successfully204 No Content
– Request successful but no content is returned400 Bad Request
– Incorrect API usage401 Unauthorized
– Invalid or missing authentication credentials404 Not Found
– The requested resource does not exist405 Method Not Allowed
– The HTTP method is not supported415 Unsupported Media Type
– Missing or incorrectContent-Type
422 Unprocessable Entity
– Validation errors429 Too Many Requests
– Rate limit exceeded500 Internal Server Error
– Server-side error
Example error response
{
"code": 2,
"message": "Invalid protocol"
}
Pagination
Pagination
Most list endpoints support pagination using the following query parameters:
count
: The number of records to retrieve (default: 50, max: 100)offset
: The number of records to skip
Example request:
GET /products?count=50&offset=100
Embedding related objects
Embedding related objects
Use the embed
query parameter to include related objects within a response.
For example, to include parent categories when listing categories:
GET /categories?embed=parents
Rate limiting
Rate limiting
ShopWired uses the for rate limiting:
- Bucket Size: 40 requests
- Leak Rate: 2 requests per second
- Burst Capability: Temporary bursts of requests are allowed as long as the average rate remains at 2 requests per second
To avoid 429 Too Many Requests
errors:
- Monitor the
x-rate-limit-limit
value in the response header - Monitor the
x-rate-limit-remaining
value in the response header - Ensure your app does not reach an
x-rate-limit-remaining
value of0
by preventing your app from consistently exceeding 2 requests per second - Handle
429
responses with appropriate retry logic once thex-rate-limit-remaining
value is positive
Best practices
Best practices
- Always authenticate your requests
- Use HTTPS to ensure security
- Handle errors gracefully by checking response codes
- Use pagination to manage large datasets
- Apply
fields
andembed
parameters to optimise responses