π ID Mapping
The mapping table for ID fields between COOCO's Directus system and RideNDine's system. This is the reference document to ensure both systems always link correctly to each other.
π€ COOCO Sends to RideNDineβ
When COOCO calls the RideNDine API, these fields are mapped from Directus to the RideNDine payload:
| Directus Field | RideNDine Field | Data Type | Description |
|---|---|---|---|
stores.id | external_merchant_id | UUID | ID of the chef store in Directus |
orders.id | external_order_id | UUID | ID of the order in Directus |
directus_users.id | customer.external_id | UUID | ID of the customer in Directus |
products.id | items[].external_product_id | UUID | ID of the menu item in Directus |
note
The external_* fields are how COOCO identifies its own objects on the RideNDine system. RideNDine stores them and returns them when cross-referencing is needed.
π₯ RideNDine Returns to COOCOβ
After RideNDine creates a record, these fields are saved back into Directus:
| RideNDine Field | Directus Field | Created When | Description |
|---|---|---|---|
ridendine_merchant_id | stores.ridendine_merchant_id | Webhook merchant-status | Merchant ID on the RideNDine system |
ridendine_order_id | orders.ridendine_order_id | Response POST /orders/create | Order ID on the RideNDine system |
quote_id | orders.quote_id | Response POST /checkout/quote | Quote ID β used when creating an order |
payment_intent_id | orders.payment_intent_id | Response POST /payment/process | Stripe PaymentIntent ID |
π ID Flow Diagramβ
COOCO Directus RideNDine
βββββββββββββββββ βββββββββββββββββ
stores.id β external_merchant_id
β ridendine_merchant_id β stores.ridendine_merchant_id
orders.id β external_order_id
β ridendine_order_id β orders.ridendine_order_id
β quote_id β orders.quote_id
β payment_intent_id β orders.payment_intent_id
directus_users.id β customer.external_id
products.id β items[].external_product_id
β οΈ Important Notesβ
caution
- All IDs from COOCO's side are UUID β needs confirmation from RideNDine regarding length / charset constraints (item #25 in checklist).
ridendine_merchant_idmust be saved before creating any order.quote_idhas a TTL (expiration) β see Open Questions item #3.