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

getBasket - Gets a basket.

Request

Gets a basket.

Path
basketIdstringrequired

The ID of the basket to be modified.

Query
c_marketplaceCheckPricesAndQuantitiesboolean

A boolean telling if the SH02 should be called and recover shipment errors if needed

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.

curl -i -X GET \
  'https://mydefaultshortcode.api.commercecloud.salesforce.com/basket/{basketId}?c_marketplaceCheckPricesAndQuantities=true&siteId=string'

Responses

Success, the response body contains the retrieved basket.

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": [ {} ] }

getCustomerBaskets - Gets the baskets of a customer.

Request

Gets the baskets of a customer. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.

Path
customerIdstringrequired

The customer ID.

Query
c_marketplaceCheckPricesAndQuantitiesboolean

A boolean telling if the SH02 should be called and recover shipment errors if needed.

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.

curl -i -X GET \
  'https://mydefaultshortcode.api.commercecloud.salesforce.com/customers/{customerId}/baskets?c_marketplaceCheckPricesAndQuantities=true&siteId=string'

Responses

Success.

Bodyapplication/json
basketsArray of objects

The list of baskets for a customer

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

updateBasket - Updates a basket.

Request

Updates a basket. Only the currency of the basket, source code, the custom properties of the basket, and the shipping items will be considered.

Path
basketIdstringrequired

The ID of the basket to be modified.

Query
c_updatePricesboolean

A boolean telling if the SH02 should be called and update product line items if needed

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 PATCH \
  'https://mydefaultshortcode.api.commercecloud.salesforce.com/baskets/{basketId}?c_updatePrices=true&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 updated basket.

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": [ {} ] }

Checkout

Operations

Order

Operations

Products and offers

Operations

Shop

Operations