Mirakl Connector SFCC APIs

General Notes

Authentication

You must authenticate with Salesforce Authentication System to make API calls.

Languages
Servers
Commerce Cloud API server
https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v1/organizations/{organizationId}/
Commerce Cloud API server
https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/
Commerce Cloud API server
https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/v1/organizations/{organizationId}/
Commerce Cloud API server
https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/v1/organizations/{organizationId}/
Commerce Cloud API server
https://{shortCode}.api.commercecloud.salesforce.com /checkout/shopper-baskets/v1/organizations/{organizationId}/
Commerce Cloud API server
https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/v1/organizations/{organizationId}/
Commerce Cloud API server
https://{shortCode}.api.commercecloud.salesforce.com/

Basket

Operations

Checkout

Operations

getBasketShippingMethods - Get the allowed shipping methods for a basket.

Request

Get the allowed shipping methods for the current basket by making a call to the SH02 API.

Query
c_shipmentIdstringrequired

The identifier of the shipment.

localestringnon-empty

The user locale.

siteIdstringnon-empty

The identifier of the site.

curl -i -X GET \
  'https://mydefaultshortcode.api.commercecloud.salesforce.com/baskets/shipping-methods?c_shipmentId=string&locale=string&siteId=string'

Responses

OK

Bodyapplication/json
expectedShipmentsArray of objectsrequired

List of expected shipments with available shipping methods.

Response
application/json
{ "expectedShipments": [ {} ] }

updateBillingAddressForBasket - Sets the billing address of a basket.

Request

Sets the billing address of a basket.

Path
basketIdstringrequired

The ID of the basket to be modified.

Query
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.

Bodyapplication/jsonrequired

Request body containing the basket to update

adjustedMerchandizeTotalTaxnumber

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

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.

billingAddressobject

The billing address.

bonusDiscountLineItemsArray of objects

The bonus discount line items.

channelTypestring

The sales channel. It is read only.

couponItemsArray of objects

The coupon items.

creationDatestring(date-time)

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

currencystring

The ISO 4217 mnemonic code of the currency.

customerInfoobject

The customer information, if the customer is logged in.

giftCertificateItemsArray of objects

The gift certificate line items.

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

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.

notesobject

The notes.

orderPriceAdjustmentsArray of objects

The order-level price adjustments.

orderTotalnumber

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

paymentInstrumentsArray of objects

The payment instruments list.

productItemsArray of objects

The product items.

productSubTotalnumber

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

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.

shipmentArray of objects

The shipments.

shippingItemsArray of objects

The shipping items.

shippingTotalnumber

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

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

The total tax amount. It is read only.

taxationstring

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

curl -i -X PUT \
  'https://mydefaultshortcode.api.commercecloud.salesforce.com/baskets/{basketId}/billing-address?siteId=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "shipment": [
      "object"
    ],
    "giftCertificateItems": [
      "object"
    ],
    "bonusDiscountLineItems": [
      "object"
    ],
    "productTotal": 0,
    "sourceCode": "string",
    "lastModified": "2023-03-28T09:34:42Z",
    "agentBasket": true,
    "productSubTotal": 0,
    "couponItems": [
      "object"
    ],
    "shippingItems": [
      "object"
    ],
    "shippingTotal": 0,
    "customerInfo": "object",
    "merchandizeTotalTax": 0,
    "shippingTotalTax": 0,
    "taxation": "string",
    "paymentInstruments": [
      "object"
    ],
    "notes": "object",
    "inventoryReservationExpiry": "2023-03-28T09:34:42Z",
    "taxTotal": 0,
    "orderTotal": 0,
    "currency": "string",
    "adjustedShippingTotalTax": 0,
    "adjustedMerchandizeTotalTax": 0,
    "basketId": "string",
    "billingAddress": "object",
    "creationDate": "2023-03-28T09:34:42Z",
    "productItems": [
      "object"
    ],
    "orderPriceAdjustments": [
      "object"
    ],
    "channelType": "string"
  }'

Responses

Success, the response body contains the basket with the added billing address

Bodyapplication/json
productItemsArray of objects

List of the product items of the basket

shipmentsArray of objects

List of the shipment items of the basket

Response
application/json
{ "productItems": [ {} ], "shipments": [ {} ] }

updateShippingMethodForShipment - Sets a shipping method for a specific shipment of a basket

Request

Sets a shipping method for a specific shipment of a basket

Path
basketIdstringrequired

The ID of the basket to be modified.

shipmentIdstringrequired

The ID of the shipment to be modified.

Query
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.

Bodyapplication/jsonrequired

Request body containing marketplace data

c_marketplaceDataArray of objects

Marketplace-specific data

idstring

Identifier for the marketplace data

curl -i -X PUT \
  'https://mydefaultshortcode.api.commercecloud.salesforce.com/baskets/{basketId}/shipments/{shipmentId}/shipping-method?siteId=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "string",
    "c_marketplaceData": [
      {
        "offers": [
          {
            "id": "string"
          }
        ],
        "selectedShippingMethod": "string"
      }
    ]
  }'

Responses

Success, the response body contains the basket with the added shipping method.

Bodyapplication/json
productItemsArray of objects

List of the product items of the basket

shipmentsArray of objects

List of the shipment items of the basket

Response
application/json
{ "productItems": [ {} ], "shipments": [ {} ] }

Order

Operations

Products and offers

Operations

Shop

Operations