Orders – Submitting an Order

This API request allows you to submit a POST request with the orders endpoint to post new orders to our system.

You can submit orders utilizing the PartnerBillingKey which is essentially submitting an order based on your primary payment method that you have set up in Gooten.

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

You can provide your payment 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 with credit or with a PayPal account.

Gooten will accept orders even if you do not have a payment method connected, but please be aware that orders accepted without a payment method connected will end up in the Payment Issue Status. Once you connect a payment 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

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, expedited or overnight. These values are subject to availability depending on which shipping method selected. If you pass in a value that is not available, an error will be thrown notifying you and you would have to change the shipping type.

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.

You must pass either the ShipType or ShipCarrierMethodId for each item in the order for it to submit properly. You will never need to pass both values and you only need to pass one or the other.

Submitting on Credit

  • 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)
    • CountryCode - required - shipping 2-letter country code
    • PostalCode - required - shipping postal code
    • IsBusinessAddress - optional - a boolean value to label this address as your business address
    • Phone - required - user’s phone
    • Email - required - user’s email
  • BillingAddress object, with the following properties:
    • FirstName - required - the first name of the user
    • LastName - required - the last name of the user
    • Line1 - required - billing address line 1
    • Line2 - optional - billing address line 2
    • City - required - billing city
    • State - optional - billing state (if applicable)
    • CountryCode - required - billing 2-letter country code
    • PostalCode - required - billing postal code
    • IsBusinessAddress - optional - a boolean value to label this address as your business address
    • Phone - required - user’s phone
    • Email - required - user’s email
  • Items an array of objects containing the following properties:
    • Quantity - required - the number of items for this SKU
    • SKU - required - SKU of product variant or print-ready product
    • 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
    • Images - required - list of images, each containing a Url to a publicly-accessible image and optionally an Index to indicate image order, when needed
    • SourceId - optional - a space to put your internal order item id
    • Meta - optional - a map of key/value pairs where you can submit any extra info you want to be attached to the item
  • Payment object, with the following properties:
    • PartnerBillingKey - a private key that should never be shared or used client-side! This is used to charge your payment method that you have set up in Gooten for the submitted orders.
  • IsInTestMode - optional - a boolean which tells Gooten API not to process the payment. This is used for testing and used to submit test orders.
  • SourceId - optional - a space to put your internal order id.
  • IsPartnerSourceIdUnique - optional - a boolean that lets our system know if you want us to block orders where a previous order has been submitted with the same SourceId. This is used to prevent senting duplicate orders into our system.
  • Meta - optional - a map of key/value pairs where you can submit any extra info you want to be attached to the order

The following format can be viewed below:

{
	"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",
		"ShipType": "string",
		"Images": [{
			"Url": "string",
			"SpaceId": "string",
			"Index": "integer",
			"ThumbnailUrl": "string"
		}],
		"AddOns": {
			"necktag_image_url": "string"
		}
		"SourceId": "string",
		"Meta": {
			"Key1": "Value1",
			"Key2": "Value2"
		}
	}],
	"Payment": {
		"PartnerBillingKey": "string"
	},
	"SourceId": "string",
	"IsPartnerSourceIdUnique": "boolean",
	"IsInTestMode": "boolean",
	"Meta": {
		"Key1": "Value1",
		"Key2": "Value2"
	}
}

Let's take a look at an example of the submit order API request below:

After sending the POST request to submit your order, the response will display the order Id for your newly created order. The response will be displayed in the following format:

{
  "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.

Next Topic: Search Orders