v1

latestOpenAPI 3.0.22026-07-2441902.6 MB
Retail Experience Cloud Bridge

Get order by cart ID

Read the order associated with the given cart, once the cart has been converted into an order by the provider.

This is a database-only lookup: it resolves the persisted cart-to-order relation and reads the order, without calling any external provider. It works for a cart regardless of its current status.

A successful request returns the order associated with the cart.

get/erc/ecommerce/cart/{cart_id}/order

Path parameters

cart_idstring required
Example:Z2NwLXVzLWNlbnRyYWwxOjAxSk5QN1I4WEdFNjE3SjVWOUhHQjNSSzk3

The ID of the cart.

Query parameters

brandstring
Example:Brand A

The brand of the provider you want to filter by. Only used as a fallback filter when the cart's persisted brand is not available.

Response

The order associated with the provided cart ID.

idstring required

The ID of the order

order_numberstring required

The number of the order (usually the order identifier that the customer knows)

customer_idstring

The ID of the customer that created this order

brandstring

The brand associated with the order

purchase_datetimestring date-time

The timestamp date when the order was created

delivery_type'UNKNOWN' | 'LOCAL_DELIVERY' | 'LOCAL_PICKUP' | 'SHIPPING'

Represents the type of delivery for a given order

items_numberinteger

The number of order items

statusstring

The status of the order. Each integration has its own set of possible status values

cancellation_statusstring

The cancellation status of the order

fulfillment_statusstring

The fulfillment status of the order

payment_statusstring

The payment status of the order

delivery_statusstring

The delivery status of the order

return_statusstring

The return status of the order

custom_fieldsobject

The custom fields associated with the provider

is_refundableboolean

Indicates whether the current order is refundable

is_returnableboolean

Indicates whether the current order is returnable

is_cancellableboolean

Indicates whether the current order can be cancelled

is_change_shipping_address_allowedboolean

Indicates whether the shipping address of the order can be changed

tagsstring[]

The list of tags associated with the order

Example response

{
  "id": "order456",
  "order_number": "#Y34DHR",
  "customer_id": "customer123",
  "brand": "brand",
  "purchase_datetime": "2021-09-14T12:16:50.078Z",
  "delivery_type": "SHIPPING",
  "shipping_address": {
    "first_name": "John",
    "last_name": "Doe",
    "phone_number": "+351910000000",
    "address": "Lisbon",
    "zip_code": "20000000",
    "city": "Lisbon",
    "region_code": "PT-11",
    "country_code": "PT"
  },
  "billing_address": {
    "first_name": "John",
    "last_name": "Doe",
    "phone_number": "+351910000000",
    "address": "Lisbon",
    "zip_code": "20000000",
    "city": "Lisbon",
    "region_code": "PT-11",
    "country_code": "PT"
  },
  "items_number": 3,
  "price_summary": {
    "original_total_amount": {
      "value": 10.5,
      "currency": "EUR"
    },
    "discounts_amount": {
      "value": 10.5,
      "currency": "EUR"
    },
    "shipping_amount": {
      "value": 10.5,
      "currency": "EUR"
    },
    "taxes_amount": {
      "value": 10.5,
      "currency": "EUR"
    },
    "final_total_amount": {
      "value": 10.5,
      "currency": "EUR"
    },
    "net_payment_amount": {
      "value": 10.5,
      "currency": "EUR"
    },
    "total_outstanding_amount": {
      "value": 10.5,
      "currency": "EUR"
    },
    "total_refunded_amount": {
      "value": 10.5,
      "currency": "EUR"
    }
  },
  "payment_details": {
    "card_brand": "Visa",
    "card_brand_image_url": "https://external-integration.url.com/payment_card_brand_icon.svg",
    "card_number": "**** **** **** *567"
  },
  "order_extra_info": {
    "highlighted_item_image_url": "https://external-integration.url.com/payment_card_brand_icon.jpg"
  },
  "status": "CONFIRMED",
  "cancellation_status": "CANCELLATION_REQUESTED",
  "fulfillment_status": "FULFILLED",
  "payment_status": "PAID",
  "delivery_status": "DELIVERED",
  "return_status": "RETURN_IN_PROGRESS",
  "is_refundable": true,
  "is_returnable": true,
  "is_cancellable": true,
  "tags": [
    "priority",
    "gift"
  ],
  "_links": {
    "self": {
      "href": "http://api-docs.talkdesk.org/erc/ecommerce/cart/Z2NwLXVzLWNlbnRyYWwxOjAxSk5QN1I4WEdFNjE3SjVWOUhHQjNSSzk3/order"
    }
  }
}