Skip to main content

Create a shipping group for an order

POST 

https://useast.api.elasticpath.com/v2/orders/:orderID/shipping-groups

Create a new shipping group for an order

Request

Path Parameters

    orderID stringrequired

    The ID of the order

Body

Shipping group details

    data object
    typestringrequired

    Possible values: [shipping_group]

    shipping_typestring

    The shipping type for this group

    tracking_referencestring

    Tracking reference for the shipment

    address object
    first_namestring
    last_namestring
    phone_numberstring
    company_namestring
    line_1string
    line_2string
    citystring
    postcodestring
    countystring
    countrystring
    regionstring
    instructionsstring
    delivery_estimate object
    startstring<date-time>
    endstring<date-time>

Responses

Shipping group created

Schema
    data object
    typestring

    Possible values: [shipping_group]

    idstring
    relationstring
    cart_idstring
    order_idstring
    shipping_typestring
    tracking_referencestring
    address object
    first_namestringrequired

    First name of the shipping recipient.

    last_namestringrequired

    Last name of the shipping recipient.

    phone_numberstringrequired

    Phone number of the shipping recipient.

    company_namestringrequired

    Company of the shipping recipient.

    line_1stringrequired

    First line of the shipping address.

    line_2stringrequired

    Second line of the shipping address.

    citystringrequired

    City of the shipping address.

    postcodestringrequired

    Post code of the shipping address.

    countystringrequired

    County of the shipping address.

    countrystringrequired

    Country of the shipping address.

    regionstring

    State, province, or region of the shipping address.

    instructionsstringrequired

    Delivery instructions.

    delivery_estimate object
    startstring<date-time>
    endstring<date-time>
    createdAtstring<date-time>
    updatedAtstring<date-time>
    relationships object
    cart object

    Relationship data entry

    typestring

    The type of related resource.

    idstring<uuid>

    The ID of the related resource.

    order object

    Relationship data entry

    typestring

    The type of related resource.

    idstring<uuid>

    The ID of the related resource.

    discounts object[]
  • Array [
  • amount objectrequired
    amountintegerrequired

    Amount in minor currency units (e.g., cents).

    currencystringrequired

    ISO 4217 currency code (e.g., "USD").

    includes_taxbooleanrequired

    Whether the amount includes tax.

    codestring

    The discount code used, if applicable.

    idstringrequired

    Unique identifier for the discount.

    promotion_sourcestring

    The source or origin of the promotion, if applicable.

    is_cart_discountboolean

    Indicates whether the discount applies to the entire cart.

    ordinalinteger

    Order in which the discount was applied.

  • ]
  • meta object
    shipping_display_price object
    total objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    base objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    tax object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    fees object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    discount object
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    total_display_price object
    with_tax objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    without_tax objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    tax objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    discount objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    balance_owing objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    paid objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    authorized objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    without_discount objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    shipping objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

    shipping_discount objectrequired
    amountnumber

    The raw total.

    currencystring

    The currency set for this amount.

    formattedstring

    The formatted total based on the amount and currency.

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://useast.api.elasticpath.com/v2/orders/:orderID/shipping-groups");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"shipping_group\",\n \"shipping_type\": \"string\",\n \"tracking_reference\": \"string\",\n \"address\": {\n \"first_name\": \"string\",\n \"last_name\": \"string\",\n \"phone_number\": \"string\",\n \"company_name\": \"string\",\n \"line_1\": \"string\",\n \"line_2\": \"string\",\n \"city\": \"string\",\n \"postcode\": \"string\",\n \"county\": \"string\",\n \"country\": \"string\",\n \"region\": \"string\",\n \"instructions\": \"string\"\n },\n \"delivery_estimate\": {\n \"start\": \"2024-07-29T15:51:28.071Z\",\n \"end\": \"2024-07-29T15:51:28.071Z\"\n }\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://useast.api.elasticpath.com
Auth
Parameters
— pathrequired
Body
{
  "data": {
    "type": "shipping_group",
    "shipping_type": "string",
    "tracking_reference": "string",
    "address": {
      "first_name": "string",
      "last_name": "string",
      "phone_number": "string",
      "company_name": "string",
      "line_1": "string",
      "line_2": "string",
      "city": "string",
      "postcode": "string",
      "county": "string",
      "country": "string",
      "region": "string",
      "instructions": "string"
    },
    "delivery_estimate": {
      "start": "2024-07-29T15:51:28.071Z",
      "end": "2024-07-29T15:51:28.071Z"
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!