In this Documentation:
Freight API provides programmatic access to GSS functionality and content.
The API is REST API and uses single token key authentication. Currently, the return format for all endpoints is JSON.
We only support authenticated requests. Every API request needs to contain the following headers:
You can get your API access key by signing in to GoSweetSpot at nzc.gosweetspot.com/ and going to your Administration > Preferences & Settings page, then expanding Advanced Settings and your API access key is at the bottom. Note that API access keys are different for each user and each account. It helps the API identify which client account and user to use.
Presently, we are not enforcing any rate-limiting. If you find that you are hitting our API at the rate of more than 60 calls per minute or 1000 calls per hour, then your usage needs to be reviewed. More often or not, there could be a better way to deal with the problem.
You can create a sandbox account by visiting https://nzc.gosweetspot.com/opensandbox
Customer orders and shipments are two important but different concepts in GoSweetSpot, where a customer order maps one-to-one with an order from an e-commerce system. In contrast, a shipment is one or more packages going to the same destination on the same carrier.
GoSweetSpot dispatches a customer's order as one or more shipments depending on the item's nature, dimensions and weight. e.g. a single order with a large 30kg plant pot and some seed packets might be split into two shipments - 1 bulk carrier shipment for the plant pot and 1 courier shipment for the seed packets.
If you are integrating with an eCommerce, most likely, you will want to create customer orders rather than shipments, and the user will use GoSweetSpot's system to create the shipments from the orders.
Your site does not allow external systems to feed information into it directly.
Your approach will be to publish orders to GSS once the orders are ready for dispatch/labelling. On the GSS system your user would process the order.
At some stage, your system will request the order status update from GSS.
The API interactions would be:
You might have a special requirement to integrate the ticketing directly into your existing system. Using an external system to do one part of the workflow may affect performance and be unacceptable. You can use the GSS API to build the ticketing into your system.
The api interactions would be:
Many open source systems, also have an open API platform that GSS can tap into to build the integration directly from within GSS. We would consider any platform that our customers are using. However, depending on platform popularity, the implementation time frames would be considered. If there are very few users on the platform, it may not be a sufficient business case for us to undertake the integration.
Many open-source systems, also have an open API platform that GSS can tap into to build the integration directly from within GSS. We would consider any platform that our customers are using. However, the implementation time frames would be considered depending on platform popularity. If there are very few users on the platform, it may not be a sufficient business case for us to undertake the integration.
Using this endpoint, you can publish from your ERP or orders system, into the GSS orders queue. Once published, your operators on GSS can search/scan/click on the order number, to populate the order delivery details automatically. This saves time entering the delivery details.
GSS can provide feedback to your site using webhooks for certain action triggers.
Actions that can be subscribed to include:
We allow you to view your most recent API calls to us. To view, use https://nzc.gosweetspot.com/developer/apitrace
This is provided to help you develop/debug your code.
The API is only available to authenticated clients. Clients should authenticate users using an access_key obtained from the Preferences & Settings screen. Once authenticated, you need to request a resource from one of the endpoints using HTTP. Generally, reading any data is done through a request with GET method.
If the user with the access_key has access to multiple sites in the account, a site_id HTTP header with the site id is also required, e.g. site_id: 123456.
Freight API currently returns data in JSON format. Some methods may return [XML] data, however we don't actively test for XML compatibility.
What kind of authentication is required?
Applications must identify themselves to access any resource.
You need to contact your account manager to obtain a test access key.
Every request requires an HTTP header property access_key, as well as support_email. The Support Email should contain the IT-level contact for the organisation. This will be used to contact you, should we find your requests need attention.
If the user with the access_key has access to multiple sites in the account, a site_id HTTP header with the site ID is also required.
Presently, there is no rate limiting on the API. We, however, reserve the right to your enforce limits or block calls at our discretion. We request that you limit your requests to 60 calls per minute. If you expect to call at a higher rate, please contact us.
Backwards Compatibility
We try to make every effort to ensure all our functions are backwards compatible. However, as our system evolves, we cannot guarantee that we will be able to support all old/deprecated functions forever. If your implementation breaks due to a change on our system, it will be your responsibility to update the functionality of your system.
Should I crack on?
Sure, fire away. However, we do suggest you talk to us, before starting so we can understand your requirements and explain how best to use this API.