Skip to content

Using the Order Consolidation API

The Order Consolidation API works alongside Nylas ExtractAI to let you retrieve order, shipment, and return information for your users’ e-commerce purchases.

This page explains how to use the Order Consolidation API.

After you activate ExtractAI, Nylas automatically starts inspecting users’ incoming messages to determine if they contain information about e-commerce orders, shipments, or returns. If they do, you can query the Order Consolidation API to get the relevant messages.

Make a GET /v3/grants/<NYLAS_GRANT_ID>/consolidated-order request to get a list of orders for a specific grant.

If the user hasn’t received any messages that contain order information, the Order Consolidation API returns an empty response.

Make a GET /v3/grants/<NYLAS_GRANT_ID>/consolidated-shipment request to get a list of shipments for a specific grant.

If the user hasn’t received any messages that contain tracking information, the Order Consolidation API returns an empty response.

Make a GET /v3/grants/<NYLAS_GRANT_ID>/consolidated-return request to get a list of returns for a specific grant. If Nylas can link a return to its original order (for example, if the message containing the return information includes the original order number) it returns that information in the order_provider_message_ids field.

If the user hasn’t received any messages that contain return information, the Order Consolidation API returns an empty response.