API Documentation

Orders - Submitting an Order

The POST orders endpoint is used to post new orders to the system.

You can submit orders utilizing the PartnerBillingKey which is essentially submitting an order on credit.

When you have a billing method connected and you have orders submitted using the PartnerBillingKey, our system will charge you using your connected billing method and push your orders to production.

You can connect a billing method by adding your payment information under the Billing tab in the Settings of the Gooten Admin. You have the option to provide a payment method of credit or with a PayPal account.

Gooten will accept orders even if you do not have a billing method connected, but please be aware that orders accepted without a billing method connected will end up in the Payment Issue Status. Once you connect a billing method, orders in this status will be pushed forward.

Note that there are places within the order and each item to put ancillary information. For instance, both the order object and item object have SourceId to store your internal ID, as well as Meta to store any other properties you wish to save against the order/items.

Avoiding Duplicate Orders

Before getting to the different types of payment methods we support, know that we have a special method that will help you make sure you never submit the same order twice. What a relief!

How it works:

  1. You pass in your internal order ID into the SourceId field
  2. At the root of the order object, you set IsPartnerSourceIdUnique to true

And that’s it. If you already have an order with that SourceId in our system, we will block the order submission.

Selecting a Shipping Method

There are two ways of specifying shipping methods for items.

Item.ShipType is by far the easiest. Pass in a string value of standard, expeditedor overnight and subject to availability, that method will just be selected. If you pass in a value that is not available, an error will be thrown notifying you.

Item.ShipCarrierMethodId offers a more granular selection. In order to get an integer value to pass into that field, please see the documentation for finding shipping options.

Either ShipType or ShipCarrierMethodId need to be passed for each item in the order; you never need to pass both.

Submitting on Credit

  • IsInTestMode - optional - a boolean which tells Gooten API not to process the payment (used for testing)
  • ShipToAddress object, with the following properties:
    • FirstName - required - the first name of the user
    • LastName - required - the last name of the user
    • Line1 - required - shipping address line 1
    • Line2 - optional - shipping address line 2
    • City - required - shipping city
    • State - optional - shipping state (if applicable)
    • PostalCode - required - shipping postal code
    • CountryCode - required - shipping 2-letter country code
    • Email - required - user’s email
    • Phone - required - user’s phone
  • BillingAddress object, with the following properties:
    • FirstName - required - the first name of the user
    • LastName - required - the last name of the user
    • PostalCode - required - shipping postal code
    • CountryCode - required - shipping 2-letter country code
  • Items an array of objects containing the following properties:
    • SKU - required - SKU of product variant
    • ShipCarrierMethodId - required if ShipType not used - Id of shipping carrier method from the /shippingprices endpoint
    • ShipType - required if ShipCarrierMethodId not used - a type of shipping, with accepted values: standard, expedited, or overnight
    • Quantity - required - the number of items with this SKU
    • Images - required - list of images, each containing a Url to a publicly-accessible image and optionally an Index to indicate image order, when needed
    • Meta - optional - a map of key/value pairs where you can submit any extra info you want to be attached to the item
    • SourceId - optional - a space to put your internal order item id
  • Payment object, with the following properties:
    • PartnerBillingKey - a private key that should never be shared or used client-side!
  • Meta - optional - a map of key/value pairs where you can submit any extra info you want to be attached to the order
  • SourceId - optional - a space to put your internal order id
  • IsPartnerSourceIdUnique - optional - a boolean that sets if you want us to block orders where a previous order has been submitted with the same SourceId
{
  "ShipToAddress": {
    "FirstName": "string",
    "LastName": "string",
    "Line1": "string",
    "Line2": "string",
    "City": "string",
    "State": "string",
    "CountryCode": "string",
    "PostalCode": "string",
    "IsBusinessAddress": "boolean",
    "Phone": "string",
    "Email": "string"
  },
  "BillingAddress": {
    "FirstName": "string",
    "LastName": "string",
    "Line1": "string",
    "Line2": "string",
    "City": "string",
    "State": "string",
    "CountryCode": "string",
    "PostalCode": "string",
    "IsBusinessAddress": "boolean",
    "Phone": "string",
    "Email": "string"
  },
  "Items": [
    {
      "Quantity": "integer",
      "SKU": "string",
      "ShipCarrierMethodId": "integer",
      "ShipType": "string",
      "Images": [
        {
          "Url": "string",
          "Index": "integer",
          "ThumbnailUrl": "string",
          "ManipCommand": "string",
          "SpaceId": "string"
        }
      ],
      "SourceId": "string",
      "Meta": {
        "Key": "string",
        "Value": "string"
      },
      "AddOns": {
        "Key": "string",
        "Value": "string"
      }
    }
  ],
  "Payment": {
    "BraintreeEncryptedCCNumber": "string",
    "BraintreeEncryptedCCExpDate": "string",
    "BraintreeEncryptedCCV": "string",
    "BraintreePaymentNonce": "string",
    "PartnerBillingKey": "string",
    "Total": "decimal",
    "CurrencyCode": "string"
  },
  "SourceId": "string",
  "IsPreSubmit": "boolean",
  "CouponCode": "string",
  "Meta": {
    "Key": "string",
    "Value": "string"
  }
}

This yields the response:

{
  "Id": "string"
}

If you're using Shopify, Etsy, or WooCommerce, these platforms have a built-in checkout function. This function will charge your customers and then our system will charge you when the order is fully synced and pushed to production.

If you have a custom website, you must build your own checkout using any method that you prefer as Gooten does not collect payments from your customers.