Most Recent Order for the Provided Customer ID

👍

Access and Registration

Authentication

Scope

erc-ecommerce-connections-orders:read

Body Response - Schema

200 OK (the customer's most recent order found for the provided customer ID)

Represents the customer's most recent order resource

ParameterTypeDescriptionRequired
idstringThe ID of the order. Example: order456yes
customer_idstringThe ID of the customer that created this order.
Example: customer123
no
status_infoarray[object]The list of possible status information states/steps for the order. "status_info" subdivides into:

1 - "generic_type" (string) - the generic type of the state/step.
Allowed values:
UNKNOWN,CONFIRMED,ON_ITS_WAY,OUT_FOR_DELIVERY,DELIVERED" Example:
IN_TRANSIT. Required.

2 - "detailed_type" (string) - the detailed type of the state/step.
Allowed values:
UNKNOWN,
ATTEMPTED_DELIVERY,
READY_FOR_PICKUP,
PICKED_UP, CONFIRMED
IN_TRANSIT,
OUT_FOR_DELIVERY,
DELIVERED, FAILURE.
Example: IN_TRANSIT

3 - "status_date_time" (string) - The timestamp date when the status info state/step was 'reached'. Example:
2021-10-23T12:16:50.078Z
no
status_info_current_indexintegerThe current state/step index of the order status in the 'status_info' list. Example: 3no
order_numberstringThe number of the order (usually the order identifier that the customer knows).
Example: #Y34DHR
yes
purchase_datetimestringThe timestamp date when the order was created.
Example:
2021-09-14T12:16:50.078Z
no
tracking_infoobjectThe tracking information associated with the order delivery. "tracking_info" subdivides into:

1 - "tracking_number" (string) - the tracking number associated with the order delivery.
Example:
#USPS 123456789. Required.

2 - "external_url" (string
)
- the URL of the external system where we can get more tracking details (ex: the URL of the carrier). Example:
https://external.url.com/
no
delivery_typestringThe type of delivery associated with the order.
Allowed values:
UNKNOWN,
LOCAL_DELIVERY,
LOCAL_PICKUP, SHIPPING
Example: SHIPPING
no
shipping_addressesarray[object]The address to which the order will be/was shipped.
"shipping_address" subdivides into:

1 - "id" (string) - The address identifier. Example: address1234

2 - "first_name" (string) - the first name of the person associated with the address. Example: John

3 - "last_name" (string) - the last name of the person associated with the address. Example: Doe

4 - "phone_number" (string) - the phone number of the person associated with the address. Example:
+351910000000

5 - "address" (string) - the first line of the address. Example: Lisbon

6 - "zip_code" (string) - the zip-code of the address. Example:
20000000

7 - "city" (string) - the city of the address.
Example: Lisbon

8 - "region_code" (string) - the region (country subdivision) code according to ISO 3166-2 standard. Example: PT-11

9 - "country_code" (string) - the country code of the address, according the ISO 3166-1 alpha-2 codes. Example:
PT

10 - "default" (boolean) - define if address is default. Example: true
no
highlighted_itemobjectThe highlighted/main item of the order. "highlighted_item" subdivides into:

1 - "id" (string) - the ID of the item. Example:
orderItem789. Required.

2 - " name (string) - the name of the item.
Example: Order Item 789

3 - " description (string) - the description of the item. Example:
description of order Item 789

4 - "brand (string) - the brand of the item. Example: Brand 123

5 - "price (object) - the price of the item. Required.
5.1 - "value" (number
)
- the amount of money. Example:
10.5. Required.
5.2 - "currency" (string) - the currency of the money amount. Example: EUR. Required.

6 - "image_url (string
)
- the URL of the item image/picture. Example:
https://external-integration.url.com/order_item_icon.png

7 - "quantity (integer) - the quantity of the item. > = 1 <= 100
Example: 10

8 - "sku (string) - the sku of the item. Example:
Sku 123
no
deliverable_quantityintegerThe quantity of order items that are yet to be delivered/processed
> = 1 <= 100
Example: > 10
no
deliveriesarray[object]List of deliveries where the item is inserted. "deliveries" subdivides into:

1 - "id" (object) - the ID of the order delivery.
Example:
orderDelivery123. Required.

2 - "delivery_quantity" (integer) - the quantity of items associated with the delivery. > = 1 <= 100 Example: 10

3 - "latest_status_info" (object) - the latest delivery status information.
3.1 - "type" (string) - the type of the state/step.
Allowed values:
UNKNOWN,
ATTEMPTED_DELIVERY,
READY_FOR_PICKUP,
PICKED_UP, CONFIRMED
IN_TRANSIT, OUT_FOR_DELIVERY,
DELIVERED, FAILURE. Example:
IN_TRANSIT. Required.
3.2 - "status_date_time" (string) - the timestamp date when the status info state/step was 'reached'. Example:
2021-10-23T12:16:50.078Z

4 - "tracking_info" (object) - the tracking information associated with the order delivery.
4.1 - "tracking_number" (string) - the tracking number associated with the order delivery.
Example:
#USPS 123456789. Required.
4.2 - "external_url" (string) - the URL of the external system where we can get more tracking details (ex: the URL of the carrier). Example:
https://external.url.com/

5 - "last_update" (string
)
- the timestamp date when the order delivery was last updated. Example:
2021-09-14T12:16:50.078Z
no
custom_fieldsobjectThe custom fields associated with the provider
_linksobject"_links" subdivides into:

1 - "self" (object) - required.
1.1 - "href" (string
)
- http://api-docs.talkdesk.org/erc/ecommerce/customers/customer123/most-recent-order
no

400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 405 (method not supported)

ParameterTypeDescriptionRequired
codestringn/ayes
messagestringn/ayes
descriptionstringn/ano
fieldsarray[object]"fields" subdivides into:

"name" (string)

"description" (string)
yes (name and description)

❗️

API Availability

The Retail Experience Cloud - Retail Ecommerce Integration is only available for customers enrolled in Talkdesk's Early Access (EA) program. To enter the EA program, contact a Customer Success Manager.

The Retail Experience Cloud - Retail Ecommerce Integration has been in EA since March 2022.

🚧

Troubleshooting

If you have any questions regarding the usage of this API, or if you’re having any technical issues, please open a ticket using this form.

Language
Authorization
Header
Click Try It! to start a request and see the response here!