younifyd
Menu

Create Shipment For Basket

Create a shipment for a basket.

POST/organizations/{organizationId}/baskets/{basketId}/shipments

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Create Shipment For Basket action (under Shopper Baskets v1).
  3. Fill in the fields below, then reference the result from later steps as {{createShipmentForBasket.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the organization the request is being made by

basketIdstringrequired

The ID of the basket to be modified.

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

localeoneOf

A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.

Request body

Enter the body as JSON in the step's Body field.

adjustedMerchandizeTotalTaxnumber (double)

The total tax on products in the shipment, including item-level price adjustments but not including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only.

adjustedShippingTotalTaxnumber (double)

The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only.

giftboolean

A flag indicating whether the shipment is a gift. It is read only.

giftMessagestring

The gift message.

merchandizeTotalTaxnumber (double)

The total tax on products in the shipment, not including price adjustments or service charges such as shipping. It is read only.

productSubTotalnumber (double)

The total price of all products in the shipment, including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

productTotalnumber (double)

The total price of all products in the shipment including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shipmentIdany

The order-specific ID of the shipment. The default value is 'me'.

Default "me"

shipmentNostring

The shipment number of this shipment. This number is automatically generated. It is read only.

shipmentTotalnumber (double)

The total price of all products in the shipment including item-level adjustments, shipping charges, and tax. It is read only.

shippingAddressany

The shipping address.

shippingMethodobject

Document representing a shipping method.

descriptionstring

The localized description of the shipping method.

externalShippingMethodstring

The external shipping method.

idstringrequired

The shipping method ID.

namestring

The localized name of the shipping method.

pricenumber (double)

The shipping cost total, including shipment level costs, product level fix, and surcharge costs. It is read only.

shippingPromotionsarray<object>3 fields

The array of active customer shipping promotions for this shipping method. This array can be empty.

shippingStatusstring

The shipping status of the shipment.

One ofnot_shippedshipped

shippingTotalnumber (double)

The total price of all shipping charges in the shipment, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shippingTotalTaxnumber (double)

The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only.

taxTotalnumber (double)

The total tax on the shipment, including item-level price adjustments and service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only.

trackingNumberstring

The tracking number of the shipment.

json
{
  "adjustedMerchandizeTotalTax": 4.95,
  "adjustedShippingTotalTax": 0.3,
  "gift": true,
  "giftMessage": "Happy Birthday",
  "merchandizeTotalTax": 4.95,
  "productSubTotal": 99,
  "productTotal": 99,
  "shipmentId": "me",
  "shipmentNo": "string",
  "shipmentTotal": 39.99,
  "shippingAddress": null,
  "shippingMethod": {
    "id": "001",
    "description": "Order received within 7-10 business days",
    "externalShippingMethod": "string",
    "name": "Ground",
    "price": 15,
    "shippingPromotions": [
      {
        "calloutMsg": "$30 Fixed Shipping Amount Above 150",
        "promotionId": "$30FixedShippingAmountAbove150",
        "promotionName": "$30 Fixed Shipping Amount Above 150"
      }
    ]
  }
}

Response

Returns 200 with an object. Read it in later steps with {{createShipmentForBasket.response.data.<field>}}.

adjustedMerchandizeTotalTaxnumber (double)

The total tax on products in the shipment, including item-level price adjustments but not including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only.

adjustedShippingTotalTaxnumber (double)

The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only.

agentBasketboolean

Is the basket created by an agent? It is read only.

basketIdstring

The unique identifier for the basket. It is read only.

billingAddressany

The billing address.

bonusDiscountLineItemsarray<object>

The bonus discount line items.

bonusProductsarray<object>4 fields

The bonus products the customer can choose from.

couponCodestring

The coupon code that triggered the promotion, if applicable.

idstring

The ID of the line item. It is read only.

maxBonusItemsinteger (int32)

The maximum number of bonus items the user can select for this promotion.

promotionIdstring

The ID of the promotion that triggered the creation of the line item.

channelTypestring

The sales channel. It is read only.

One ofstorefrontcallcentermarketplacedssstorepinteresttwitterfacebookadssubscriptionsonlinereservationcustomerservicecenterinstagramcommercetiktoksnapchatgooglewhatsappyoutube

couponItemsarray<object>

The coupon items.

codestringrequired

The coupon code.

couponItemIdany

The coupon item ID. It is read only.

statusCodestring

The status of the coupon item. It is read only.

One ofcoupon_code_already_in_basketcoupon_code_already_redeemedcoupon_code_unknowncoupon_disabledredemption_limit_exceededcustomer_redemption_limit_exceededtimeframe_redemption_limit_exceededno_active_promotioncoupon_already_in_basketno_applicable_promotionappliedadhoc

validboolean

A flag indicating whether the coupon item is valid. A coupon line item is valid if the status code is "applied" or "no_applicable_promotion". It is read only.

creationDatestring (date-time)

The timestamp when the basket was created. It is read only.

currencystring

A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.

customerInfoany

The customer information, if the customer is logged in.

giftCertificateItemsarray<object>

The gift certificate line items.

amountnumber (double)required

The gift certificate item amount.

giftCertificateItemIdany

The item ID. It is read only.

messagestring

The gift certificate message.

recipientEmailstringrequired

The recipient email.

recipientNamestring

The recipient's name.

senderNamestring

The sender's name.

shipmentIdstring

The ID of the shipment this item belongs to.

inventoryReservationExpirystring (date-time)

The expiration datetime of the inventory reservation. It is read only.

lastModifiedstring (date-time)

The timestamp when the basket was last modified. It is read only.

merchandizeTotalTaxnumber (double)

The total products tax in the purchase currency. Merchandise total price represents the sum of the product prices before services (such as shipping) or adjustments from promotions have been added. It is read only.

orderPriceAdjustmentsarray<object>

The order-level price adjustments.

appliedDiscountany

Details describing the discount this price adjustment is based on. For adjustments not based on a discount, this value is null.

couponCodestring

The coupon code of the coupon this price adjustment is based on. For adjustments not based on a coupon, this value is null. It is read only.

createdBystring

The user who created the price adjustment. It is read only.

creationDatestring (date-time)

The timestamp when the price adjustment was created. It is read only.

customboolean

A flag indicating whether this price adjustment was created by custom logic. This flag is set to true unless the price adjustment was created by the promotion engine.

itemTextstring

The text describing the item.

lastModifiedstring (date-time)

The timestamp when the price adjustment was last modified. It is read only.

manualboolean

A flag indicating whether this price adjustment was created by a manual process. If the price adjustment was created by the promotion engine, this value is always false.

pricenumber (double)

The adjustment price. It is read only.

priceAdjustmentIdany

The price adjustment ID. It is read only.

promotionIdstring

The ID of the related promotion. Custom price adjustments can be assigned any promotion ID so long it is not used by a price adjustment belonging to the same item, and is not used by a promotion defined in the promotion engine. If not specified, a promotion ID is generated.

reasonCodestring

The reason for the price adjustment.

orderTotalnumber (double)

The total price, including products, shipping and tax. It is read only.

paymentInstrumentsarray<object>

The payment instruments list.

amountnumber (double)

The payment transaction amount.

authorizationStatusany

The authorization status of the payment transaction. It is read only.

bankRoutingNumberstring

The bank routing number.

maskedGiftCertificateCodestring

The gift certificate code with the last 4 characters not masked.

paymentCardany

The payment card.

paymentInstrumentIdany

The payment instrument ID. It is read only.

paymentMethodIdstring

The payment method ID. It is read only.

productItemsarray<object>

The product items.

adjustedTaxnumber (double)

The tax on the line item, including any adjustments. It is read only.

basePricenumber (double)

The base price of the line item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

bonusDiscountLineItemIdstring

The ID of the bonus discount line item this bonus product relates to. It is read only.

bonusProductLineItemboolean

A flag indicating whether the product item is a bonus.

bundledProductItemsarray<object>

The bundled product items.

giftboolean

Returns true if the item is a gift. It is read only.

giftMessagestring

The gift message.

inventoryIdstring

The inventory list ID associated with this item.

itemIdany

The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only.

itemTextstring

The text describing the item.

optionItemsarray<object>27 fields

The option items.

pricenumber (double)

The price of the line item before applying any adjustments. If the line item is based on net pricing then the net price is returned. If the line item is based on gross pricing then the gross price is returned. It is read only.

priceAdjustmentsarray<object>12 fields

The price adjustments.

priceAfterItemDiscountnumber (double)

The price of the product line item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

priceAfterOrderDiscountnumber (double)

The price of the product line item including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

productIdstring

The ID of the product.

productListItemany

If this product line item was added from a product list, this value is a reference to the corresponding product list item.

productNamestring

The name of the product.

qualifyingProductItemIdstring

Returns the id of the ProductLineItem that qualified the basket for this bonus product. This method is only applicable if the product line item is a bonus product line item, and if the promotion is a product promotion with number of qualifying products granting a bonus-product discount. If these conditions aren't met, the method returns null. If there are multiple product line items that triggered this bonus product, this method returns the last one by position within the order.

quantitynumber (double)

The quantity of the products represented by this item.

shipmentIdstring

The ID of the shipment this item belongs to.

shippingItemIdstring

If the product line item has a related shipping item, this value is its ID. A related shipping item represents a surcharge applied to individual products using a particular shipping method. It is read only.

taxnumber (double)

The tax for the product item, not including price adjustments. It is read only.

taxBasisnumber (double)

The price used to calculate the tax for this product item. It is read only.

taxClassIdstring

The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only.

taxRatenumber (double)

The tax rate, which is the decimal tax rate to be applied to the product represented by this item. It is read only.

productSubTotalnumber (double)

The total price of all products including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

productTotalnumber (double)

The total price of all products including adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shipmentsarray<object>

The shipments.

adjustedMerchandizeTotalTaxnumber (double)

The total tax on products in the shipment, including item-level price adjustments but not including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only.

adjustedShippingTotalTaxnumber (double)

The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only.

giftboolean

A flag indicating whether the shipment is a gift. It is read only.

giftMessagestring

The gift message.

merchandizeTotalTaxnumber (double)

The total tax on products in the shipment, not including price adjustments or service charges such as shipping. It is read only.

productSubTotalnumber (double)

The total price of all products in the shipment, including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

productTotalnumber (double)

The total price of all products in the shipment including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shipmentIdany

The order-specific ID of the shipment. The default value is 'me'.

Default "me"

shipmentNostring

The shipment number of this shipment. This number is automatically generated. It is read only.

shipmentTotalnumber (double)

The total price of all products in the shipment including item-level adjustments, shipping charges, and tax. It is read only.

shippingAddressany

The shipping address.

shippingMethodobject6 fields

Document representing a shipping method.

shippingStatusstring

The shipping status of the shipment.

One ofnot_shippedshipped

shippingTotalnumber (double)

The total price of all shipping charges in the shipment, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shippingTotalTaxnumber (double)

The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only.

taxTotalnumber (double)

The total tax on the shipment, including item-level price adjustments and service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only.

trackingNumberstring

The tracking number of the shipment.

shippingItemsarray<object>

The shipping items.

adjustedTaxnumber (double)

The tax for the shipping item, including price adjustments. It is read only.

basePricenumber (double)

The base price of the shipping item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

itemIdstring

The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a custom price adjustment for it. It is read only.

itemTextstring

The text describing the shipping item.

pricenumber (double)

The price of the line item before applying any adjustments. If the line item is based on net pricing then the net price is returned. If the line item is based on gross pricing then the gross price is returned. It is read only.

priceAdjustmentsarray<object>12 fields

The price adjustments.

priceAfterItemDiscountnumber (double)

The price of the shipping item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shipmentIdany

The identifier of the shipment to which this item belongs.

taxnumber (double)

The tax on the product item, not including adjustments. It is read only.

taxBasisnumber (double)

The price used to calculate the tax for this shipping item. It is read only.

taxClassIdstring

The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only.

taxRatenumber (double)

The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only.

shippingTotalnumber (double)

The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shippingTotalTaxnumber (double)

The total tax on all shipping charges, not including shipping adjustments. It is read only.

sourceCodestring

The source code assigned to the basket. It is read only.

taxTotalnumber (double)

The total tax amount. It is read only.

taxationstring

The taxation policy (gross or net). It is read only.

One ofgrossnet

json
{
  "adjustedMerchandizeTotalTax": 4.95,
  "adjustedShippingTotalTax": 0.3,
  "agentBasket": true,
  "basketId": "e78aa5646a8efebdd9cdd38be7",
  "billingAddress": null,
  "bonusDiscountLineItems": [
    {
      "bonusProducts": [
        {
          "productId": "apple-ipod-classic",
          "productDescription": "Nintendo DS revolutionizes handheld gameplay.",
          "productName": "Nintendo DS Game Console",
          "title": "Nintendo DS Game Console"
        }
      ],
      "couponCode": "5ties",
      "id": "91f4dd8bfa0653d58b7783b04f",
      "maxBonusItems": 0,
      "promotionId": "Buy1Get2"
    }
  ],
  "channelType": "storefront",
  "couponItems": [
    {
      "code": "5ties",
      "couponItemId": null,
      "statusCode": "no_applicable_promotion",
      "valid": true
    }
  ],
  "creationDate": "2015-05-19T15:23:18.000Z",
  "currency": "USD",
  "customerInfo": null,
  "giftCertificateItems": [
    {
      "amount": 20,
      "recipientEmail": "no-reply@salesforce.com",
      "giftCertificateItemId": null,
      "message": "Birthday present.",
      "recipientName": "Daniel Mustermann",
      "senderName": "Max Mustermann",
      "shipmentId": "me"
    }
  ]
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Was this page helpful?