API Overview
Introduction
Welcome to the Anymaster Partner API. If you are a partner who is looking to interact programmatically with Anymaster for order management, this documentation is for you. Our API is designed to provide a simple and powerful interface for you to integrate Anymaster's functionality into your applications.
What you can do using Anymaster Partner API
With the Anymaster Partner API, you can take advantage of the following functionalities:
Order Management: Create and manage partner orders, including getting a list of orders with their basic information.
Availability Management: Control the availability status of orders, switching between "Out of Stock" and "In Stock" states as needed.
Token Management: Use the API to manage user tokens for other API users.
With this range of options, the Partner API allows you to interact with Anymaster's system efficiently and effectively, automating processes that could otherwise be time-consuming and manual.
Authentication
To authenticate with the Anymaster Partner API, call the authorization method using your login and password. This will return a token which you must include in the header of your subsequent API requests. This is to ensure that the data you are accessing remains secure.
Base URL
The base URL for all API requests is https://partner.anymaster.com.
Error Handling
Errors happened during API calls are returned with specific status codes and responses. The error handling for Anymaster Partner API relies on Moleculer framework, which comes with its own standard error codes and messages.
Most common error codes you might encounter are:
200 OK: The request is successful.400 BAD_REQUEST: The request could not be understood or was missing required parameters.401 UNAUTHORIZED: Authentication failed or user doesn't have permissions for the requested operation.403 FORBIDDEN: Authentication succeeded but authenticated user doesn't have access to the requested resource.422 VALIDATION_ERROR: The request contains wrong parameters.404 NOT_FOUND: The resource could not be found.500 INTERNAL_SERVER_ERROR: An error occurred within the Moleculer service.
Whenever an error occurs, the API will return a response with the appropriate status code and a structured error message that you can use for debugging.