POST
/
v1
/
order_batches
/
price
curl --request POST \
  --url https://api.ongoody.com/v1/order_batches/price \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "send_method": "direct_send",
  "recipients": [
    {
      "first_name": "Alena",
      "last_name": "Kenter",
      "email": "alena@example.com",
      "mailing_address": {
        "first_name": "Alena",
        "last_name": "Kenter",
        "address_1": "140 E 55th St",
        "address_2": "",
        "city": "New York",
        "state": "NY",
        "postal_code": "10022",
        "country": "US"
      }
    }
  ],
  "cart": {
    "items": [
      {
        "product_id": "ac9be535-7f2b-47d6-9681-c072def35ba2",
        "quantity": 1
      }
    ]
  }
}'
{
  "cart_price": {
    "price_product": 1000,
    "price_shipping": 1000,
    "price_processing_fee": 100,
    "price_pre_tax": 2100,
    "price_est_tax_low": 0,
    "price_est_tax_high": 210,
    "price_est_total_low": 2100,
    "price_est_total_high": 2310
  },
  "total_price": {
    "recipients": 2,
    "est_group_total_low": 4200,
    "est_group_total_high": 4620
  }
}

You can calculate the total price for an order batch before you create it, given a cart, recipients, and send method. To use a specific address, pass the direct_send send method.

Authorizations

Authorization
string
header
required

Your Goody API key.

Body

application/json

Input parameters for an order batch price calculation.

recipients
object[]
required
cart
object
required
send_method
enum<string>
required

The method for sending a order batch. email_and_link sends a gift email to the recipient (specify email for each recipient). link_multiple_custom_list generates a gift link without an automatic email. direct_send ships the product directly to the recipient (specify mailing_address for each recipient). For more information, see Send Methods.

Available options:
email_and_link,
link_multiple_custom_list,
direct_send

Response

200
application/json
Order batch price calculated

The price for an order batch (all in cents).

cart_price_estimate
object

Prices for a single recipient's cart in cents. This represents the price for each recipient in the order batch.

total_price_estimate
object

Total price estimates for the entire order batch in cents. This includes all recipients.