Introduction
Getting started
Quick start
ShedsForSale.com provides the production environment that can be used by partners to import or export products.
Authentication
To authenticate via the API, you must provide your partner API key in the headers as x-api-key. In addition, a valid API key and Secret key are required to authenticate against the customer account. Keep these keys secure. Please contact us at dev@shedsforsale.com in order to get a partner, access, and secret keys assigned to be able to connect to the API.
Locations and manufacturers
A location and manufacturer are both required for all products. API endpoints are provided to receive an account's available locations and manufacturers. However, you may find it easier to direct users to limit an API key set to a particular location and manufacturer. If a location and manufacturer are set, it will override whatever is sent to the API and the product will be set to have that location and/or manufacturer.
In order to require that your users do this, we provide an option to require it. Just send requireLocation: true and/or requireManufacturer: true and an error will be thrown if the API key set does not have those options enabled.
Testing your integration
You will be provided with an API Key and a Secret Key that should be sent with all requests in the Authorization header as Basic Auth. The API Key will serve as the username, and the Secret Key as the password.
Likewise, all accounts that wish to connect with the API will also be required to create an API Key and Secret Key for use with the integration. These will be sent in the body of all requests as apiKey and secretKey, respectively.
401 Unauthorized?
To provide less information to potential bad actors, when an account API key or Secret key are incorrect the only information returned will be 401 Unauthorized. No additional debugging information will be provided. If the partner API key is incorrect, a 403 Forbidden error will be returned.
