Skip to main content

πŸ”— 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 FieldRideNDine FieldData TypeDescription
stores.idexternal_merchant_idUUIDID of the chef store in Directus
orders.idexternal_order_idUUIDID of the order in Directus
directus_users.idcustomer.external_idUUIDID of the customer in Directus
products.iditems[].external_product_idUUIDID 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 FieldDirectus FieldCreated WhenDescription
ridendine_merchant_idstores.ridendine_merchant_idWebhook merchant-statusMerchant ID on the RideNDine system
ridendine_order_idorders.ridendine_order_idResponse POST /orders/createOrder ID on the RideNDine system
quote_idorders.quote_idResponse POST /checkout/quoteQuote ID β€” used when creating an order
payment_intent_idorders.payment_intent_idResponse POST /payment/processStripe 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_id must be saved before creating any order.
  • quote_id has a TTL (expiration) β€” see Open Questions item #3.