Getting Started

Welcome to the Gooten API Documentation.

Before we get started, its important to note that we have libraries for client-side js, android, and ios already built! You should definitely use those!

The Gooten API is organized around REST and allows you to manage orders for printing, manufacturing, and related resources within the Gooten cloud. The endpoints are intuitive and powerful, allowing you to easily make calls to retrieve information or to execute actions.

Our API is designed to have predictable, resource-oriented URLs. We use built-in HTTP features which can be understood by off-the-shelf HTTP clients. Further, we support cross-origin resource sharing (CORS) to allow you to interact securely with our API from a client-side web application (though you should remember that you should never expose your PartnerBillingKey in any public website’s client-side code).

Authentication

You authenticate to the Gooten API by providing your Recipe ID. For the Orders Method you may also need to provide a secret API key (PartnerBillingKey). You can manage and view your API Keys from your account settings page in our Admin Partner Panel.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Error Handling

Anytime an error occurs from an API request, the JSON response returns with HadError=true as well as the reason why. For example, lets say that you tried to submit an order without an postal/zip code. The server’s response would look as follows:

{
    "ErrorReferenceCode": "72f3c717-f204-4b4a-9b14-7c169f346235",
    "Errors": [
        {
            "AttemptedValue": "",
            "CustomState": null,
            "ErrorMessage": "'Postal Code' should not be empty.",
            "PropertyName": "Order.ShipToAddress.PostalCode"
        }
    ],
    "HadError": true
}

Therefore, we recommend checking each response to see if includes a HadError=true value in order to ascertain if an error occurred.

Since all errors are assigned IDs, anytime a user is having an issue that they can’t figure out its possible for us to look up exactly what happened during the request.

In general, 5xx indicates an error on Gooten’s end, 4xx means there was a response validation issue, and 2xx indicates success. Not all errors map cleanly onto HTTP response codes, however.

Please utilize the human-readable message if available and additional response values with more details about the error to assist in solving.

Next Step: Getting user’s location