API tokens in MachShip are created in MachShip on specific users and inherit all of that user's permissions, company access, and test mode settings.
When setting up integrations, it's best practice to create a new user for that integration so any actions taken by that API key are easily trackable back to that user and appropriate permissions can be provided.
It is advisable to setup a production and sandbox user for each integration - though it's not required.
You can opt to use a single user, and change that users mode from test to production when you're ready to go live.
Creating a user for use with the API is the same as creating any other user.
1. Navigate to Admin and select Create User
You will need to set:
Consider setting the username to something description to the integration.
For example, it may be Bills.Warehouse.Integration or similar.
2. Select the appropriate Test Mode setting
The test mode setting on a user provides a sandbox environment for development and testing.
Consignments created by test mode users are not billed, and not sent to the carriers on manifest.
The test mode options are best described as: - User is in test mode - this is a test user and would only create test consignments - Enabled to see test consignments - this is a production user, but able to see test consignments - Disabled from seeing test consignments - this is a production user, and not able to see test consignments.
3. Role Assignment
Choose a role that matches your API requirements:
4. Save Your New User Click SAVE to create your new user.
Important: Token values are only displayed once at creation. Store them securely as they cannot be retrieved later.
MachShip uses a hierarchical company structure. For example:
- Surefoot Enterprises
- Surefoot Melbourne
- Surefoot Sydney
User access follows this hierarchy:
This hierarchy directly affects API access - tokens inherit the same visibility rules as their associated user.
The outcome of this is, if you want your user to view a company, ensure your user is at that company level or above.
Each user is assigned a role that defines their permissions. Common roles include:
Dispatch:
View Only:
Admin:
API tokens inherit all permissions from their associated users role:
Permission Errors
Access Limitations
Best Practices