-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1 lines (1 loc) · 50 KB
/
Copy pathopenapi.json
File metadata and controls
1 lines (1 loc) · 50 KB
1
{"openapi":"3.0.0","paths":{"/v1/ping":{"get":{"description":"Returns the marketplace id resolved from the provided API key. Use it to verify that your key works end-to-end.","operationId":"DevApiPingController_ping","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/PingPayload"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Authenticated ping","tags":["Ping"]}},"/v1/products":{"get":{"description":"Returns the marchant's products (paginated). By default only enabled products are returned — set `includeDisabled=true` to also return drafts.","operationId":"ProductsDevApiController_list","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"per_page","required":false,"in":"query","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"_sort","required":false,"in":"query","description":"Column to sort by.","schema":{"example":"createdAt","type":"string","enum":["id","name","price","createdAt"]}},{"name":"_order","required":false,"in":"query","description":"Sort direction","schema":{"example":"desc","type":"string","enum":["asc","desc"]}},{"name":"search","required":false,"in":"query","description":"Full-text search on product name (min 3 characters).","schema":{"example":"burger","type":"string"}},{"name":"collection","required":false,"in":"query","description":"Filter by collection slug.","schema":{"example":"fast-food","type":"string"}},{"name":"includeVariations","required":false,"in":"query","description":"Include variations and combinations (SKUs) in the response.","schema":{"default":false,"example":false,"type":"boolean"}},{"name":"includeDisabled","required":false,"in":"query","description":"Include disabled (draft) products. Defaults to false — only enabled products are returned.","schema":{"default":false,"example":false,"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiPaginatedEnvelopeDto"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DevApiProductDto"}}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"List products","tags":["Products"]}},"/v1/products/{publicId}":{"get":{"description":"Returns a single product (with variations, combinations and gallery). Set `includeDisabled=true` to also resolve drafts.","operationId":"ProductsDevApiController_getByPublicId","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"publicId","required":true,"in":"path","schema":{"example":"6528412905","type":"string"}},{"name":"includeDisabled","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiProductDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Get a product by its public id","tags":["Products"]}},"/v1/products/by-slug/{slug}":{"get":{"description":"Returns a single product looked up by its URL-friendly slug. Set `includeDisabled=true` to also resolve drafts.","operationId":"ProductsDevApiController_getBySlug","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"slug","required":true,"in":"path","schema":{"example":"burger","type":"string"}},{"name":"includeDisabled","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiProductDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Get a product by slug","tags":["Products"]}},"/v1/collections":{"get":{"description":"Returns the marchant's collections (paginated). Supports sorting and search by name.","operationId":"CollectionsDevApiController_list","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"per_page","required":false,"in":"query","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"_sort","required":false,"in":"query","description":"Column to sort by.","schema":{"example":"createdAt","type":"string","enum":["id","name","createdAt"]}},{"name":"_order","required":false,"in":"query","description":"Sort direction","schema":{"example":"desc","type":"string","enum":["asc","desc"]}},{"name":"search","required":false,"in":"query","description":"Full-text search on collection name (min 3 characters).","schema":{"example":"burger","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiPaginatedEnvelopeDto"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DevApiCollectionDto"}}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"List collections","tags":["Collections"]}},"/v1/collections/{publicId}":{"get":{"operationId":"CollectionsDevApiController_getByPublicId","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"publicId","required":true,"in":"path","schema":{"example":"9023748120","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiCollectionDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Get a collection by its public id","tags":["Collections"]}},"/v1/collections/by-slug/{slug}":{"get":{"operationId":"CollectionsDevApiController_getBySlug","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"slug","required":true,"in":"path","schema":{"example":"fast-food","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiCollectionDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Get a collection by slug","tags":["Collections"]}},"/v1/orders":{"get":{"description":"Returns the merchant's orders (paid carts) paginated. Supports search on order publicId, payment reference and customer data.","operationId":"OrdersDevApiController_list","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"per_page","required":false,"in":"query","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"_sort","required":false,"in":"query","description":"Column to sort by.","schema":{"example":"createdAt","type":"string","enum":["id","createdAt","amount"]}},{"name":"_order","required":false,"in":"query","description":"Sort direction","schema":{"example":"desc","type":"string","enum":["asc","desc"]}},{"name":"search","required":false,"in":"query","description":"Full-text search on order publicId, payment reference or customer info.","schema":{"example":"CMD-2024","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiPaginatedEnvelopeDto"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DevApiOrderListItemDto"}}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"List orders","tags":["Orders"]}},"/v1/orders/{publicId}":{"get":{"description":"Returns the order detail (items, totals, payment, delivery).","operationId":"OrdersDevApiController_getByPublicId","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"publicId","required":true,"in":"path","schema":{"example":"ORD-XPK39ZQA01","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiOrderDetailDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Get an order by its public id","tags":["Orders"]}},"/v1/orders/{publicId}/invoice":{"get":{"description":"Streams the order invoice as a PDF. Returns 404 if no invoice has been generated yet.","operationId":"OrdersDevApiController_getInvoice","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"publicId","required":true,"in":"path","schema":{"example":"ORD-XPK39ZQA01","type":"string"}}],"responses":{"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Download the order invoice (PDF)","tags":["Orders"]}},"/v1/carts":{"get":{"description":"Returns the merchant's carts (paginated). DRAFT carts are reserved for internal usage and are never exposed.","operationId":"CartsDevApiController_list","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"example":1,"type":"number"}},{"name":"per_page","required":false,"in":"query","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"_sort","required":false,"in":"query","description":"Column to sort by.","schema":{"example":"createdAt","type":"string","enum":["id","createdAt"]}},{"name":"_order","required":false,"in":"query","description":"Sort direction","schema":{"example":"desc","type":"string","enum":["asc","desc"]}},{"name":"search","required":false,"in":"query","description":"Full-text search on cart publicId or customer info.","schema":{"example":"CMD-2024","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiPaginatedEnvelopeDto"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DevApiCartListItemDto"}}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"List carts","tags":["Carts"]},"post":{"description":"Creates a PENDING_PAYMENT cart with the given customer/items/delivery, generates a payment row, and asks the payment provider for a checkout URL. If the provider call fails, the cart is kept and a 502 PAYMENT_INIT_FAILED is returned — retry via POST /v1/carts/{publicId}/pay.","operationId":"CheckoutDevApiController_create","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiCheckoutCreateDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiCheckoutCreateResponseDto"}}}]}}}},"400":{"description":"Invalid request — malformed parameters or body (`code: BAD_REQUEST`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"422":{"description":"The request is well-formed but cannot be processed (`code: UNPROCESSABLE_ENTITY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"502":{"description":"The payment provider could not be reached (`code: PAYMENT_INIT_FAILED`). `data.cartPublicId` carries the created cart so the payment can be retried.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Create a cart and initiate its payment in one call","tags":["Carts"]}},"/v1/carts/{publicId}":{"get":{"description":"Returns the cart detail (items, totals, delivery info).","operationId":"CartsDevApiController_getByPublicId","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"publicId","required":true,"in":"path","schema":{"example":"CART-XPK39ZQA01","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiCartDetailDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Get a cart by its public id","tags":["Carts"]}},"/v1/carts/preview":{"post":{"description":"Stateless preview. Validates items + delivery area + split config and returns final totals. No cart row is created.","operationId":"CheckoutDevApiController_preview","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiCheckoutPreviewDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiCheckoutPreviewResponseDto"}}}]}}}},"400":{"description":"Invalid request — malformed parameters or body (`code: BAD_REQUEST`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"422":{"description":"The request is well-formed but cannot be processed (`code: UNPROCESSABLE_ENTITY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Compute cart totals without persisting anything","tags":["Carts"]}},"/v1/carts/{publicId}/pay":{"post":{"description":"Only usable when the previous POST /v1/carts call returned 502 PAYMENT_INIT_FAILED — i.e. the cart is in PENDING_PAYMENT with a pending payment row. Re-calls the payment provider with the same payment reference.","operationId":"CheckoutDevApiController_retryPay","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}},{"name":"publicId","required":true,"in":"path","schema":{"example":"CART-XPK39ZQA01","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiCheckoutRetryPayDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiCheckoutRetryPayResponseDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"422":{"description":"The request is well-formed but cannot be processed (`code: UNPROCESSABLE_ENTITY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"502":{"description":"The payment provider could not be reached (`code: PAYMENT_INIT_FAILED`). `data.cartPublicId` carries the created cart so the payment can be retried.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Retry payment initialization for an existing cart","tags":["Carts"]}},"/v1/delivery-areas":{"get":{"description":"Returns every delivery area configured for the marketplace. Use an area `id` as `delivery.deliveryAreaId` when creating a cart with deliveryType = DELIVERY.","operationId":"DeliveryAreasDevApiController_list","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DevApiDeliveryAreaDto"}}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"List delivery areas","tags":["Delivery Areas"]}},"/v1/marketplace":{"get":{"description":"Returns the profile of the marketplace resolved from the API key: slug, business category and payment configuration (pay-on-delivery, split payment).","operationId":"MarketplaceDevApiController_getProfile","parameters":[{"name":"Authorization","in":"header","description":"Developer API key (Bearer xdk_…)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DevApiSuccessEnvelopeDto"},{"properties":{"data":{"$ref":"#/components/schemas/DevApiMarketplaceProfileDto"}}}]}}}},"401":{"description":"Missing or invalid developer API key\n\nMissing or invalid API key (`code: UNAUTHORIZED`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"404":{"description":"The requested resource does not exist (`code: NOT_FOUND`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"429":{"description":"Rate limit exceeded on the burst or sustained window (`code: TOO_MANY_REQUESTS`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}},"500":{"description":"Unexpected server error (`code: INTERNAL_SERVER_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevApiErrorEnvelopeDto"}}}}},"summary":"Get the marketplace profile","tags":["Marketplace"]}}},"info":{"title":"Xèdo Developer API","description":"Public REST API for merchants. Authenticate with a Bearer xdk_… key.","version":"1.0.0","contact":{}},"tags":[],"servers":[{"url":"http://localhost:5022"}],"components":{"securitySchemes":{"developer-api-key":{"scheme":"bearer","bearerFormat":"xdk_…","type":"http","description":"Developer API key issued from the merchant dashboard."}},"schemas":{"DevApiErrorEnvelopeDto":{"type":"object","properties":{"success":{"type":"boolean","example":false},"code":{"type":"string","example":"PRODUCT_NOT_FOUND","description":"Stable machine-readable error code. Safe to switch on in client code."},"message":{"type":"string","example":"Product not found","description":"Human-readable error message, translated when applicable."},"errors":{"type":"object","description":"Field-level validation errors, present when the error stems from input validation.","example":{"name":["name should not be empty"]}},"data":{"type":"object","description":"Contextual data attached to the error. For example, a PAYMENT_INIT_FAILED response carries the `cartPublicId` of the created cart so the payment can be retried via POST /v1/carts/{publicId}/pay.","example":{"cartPublicId":"CART-XPK39ZQA01"}}},"required":["success","code","message"]},"DevApiSuccessEnvelopeDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}},"required":["success","data"]},"PingPayload":{"type":"object","properties":{"marketplaceId":{"type":"number","example":42},"timestamp":{"type":"string","example":"2026-05-26T13:14:15.000Z"}},"required":["marketplaceId","timestamp"]},"DevApiPaginatedEnvelopeDto":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"array"}},"total":{"type":"number","example":42,"description":"Total rows matching the query"},"start":{"type":"number","example":1,"description":"Index (1-based) of the first row returned"},"end":{"type":"number","example":10,"description":"Index (1-based) of the last row returned"}},"required":["success","data","total","start","end"]},"DevApiProductCollectionDto":{"type":"object","properties":{"name":{"type":"string","example":"Fast food"},"slug":{"type":"string","example":"fast-food"}},"required":["name","slug"]},"DevApiProductGalleryMediaDto":{"type":"object","properties":{"id":{"type":"number","example":1},"publicUrl":{"type":"string","example":"https://cdn.xedoapp.com/products/gallery/abc.jpg"},"type":{"type":"string","example":"image","enum":["image","video"]},"altText":{"type":"string","example":"Burger close-up"}},"required":["id","publicUrl","type"]},"DevApiProductVariationOptionDto":{"type":"object","properties":{"publicId":{"type":"string","example":"OPT_ABC123"},"name":{"type":"string","example":"XL"},"priceAdjustment":{"type":"number","example":500},"priceAdjustmentType":{"type":"string","enum":["fixed","percentage"],"example":"fixed"},"galleryMedias":{"type":"array","items":{"$ref":"#/components/schemas/DevApiProductGalleryMediaDto"}}},"required":["publicId","name","galleryMedias"]},"DevApiProductVariationDto":{"type":"object","properties":{"publicId":{"type":"string","example":"VAR_ABC123"},"variationTypeName":{"type":"string","example":"Taille"},"options":{"type":"array","items":{"$ref":"#/components/schemas/DevApiProductVariationOptionDto"}}},"required":["publicId","variationTypeName","options"]},"DevApiProductCombinationDto":{"type":"object","properties":{"publicId":{"type":"string","example":"COMB_ABC123"},"optionPublicIds":{"example":["OPT_ABC123","OPT_DEF456"],"description":"Public ids of the options forming this combination.","type":"array","items":{"type":"string"}},"stockQuantity":{"type":"number","example":10},"priceAdjustment":{"type":"number","example":500},"priceAdjustmentType":{"type":"string","enum":["fixed","percentage"],"example":"fixed"}},"required":["publicId","optionPublicIds","stockQuantity"]},"DevApiProductDto":{"type":"object","properties":{"publicId":{"type":"string","example":"6528412905"},"name":{"type":"string","example":"Burger"},"slug":{"type":"string","example":"burger"},"price":{"type":"number","example":10.5},"description":{"type":"string","example":"Delicious beef burger."},"coverUrl":{"type":"string","example":"https://cdn.xedoapp.com/products/cover/abc.jpg","nullable":true},"enabled":{"type":"boolean","example":true},"collection":{"$ref":"#/components/schemas/DevApiProductCollectionDto"},"createdAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"productSheet":{"type":"string","example":"Nutritional information"},"stockQuantity":{"type":"number","example":100},"trackStock":{"type":"boolean","example":true},"allowBackorder":{"type":"boolean","example":false},"lowStockThreshold":{"type":"number","example":10,"nullable":true},"splitOnlinePaymentPercentage":{"type":"number","example":30,"nullable":true,"description":"Percentage paid online for split payment. Null falls back to the marketplace default."},"galleryMedias":{"description":"Product gallery (image / video). Returned on detail endpoints.","type":"array","items":{"$ref":"#/components/schemas/DevApiProductGalleryMediaDto"}},"variations":{"description":"Variations (e.g. Size, Color) and their options.","type":"array","items":{"$ref":"#/components/schemas/DevApiProductVariationDto"}},"combinations":{"description":"Combinations (SKUs) with per-combination stock and pricing.","type":"array","items":{"$ref":"#/components/schemas/DevApiProductCombinationDto"}}},"required":["publicId","name","slug","price","enabled","collection","createdAt","updatedAt","stockQuantity","trackStock","allowBackorder"]},"DevApiCollectionDto":{"type":"object","properties":{"publicId":{"type":"string","example":"9023748120"},"name":{"type":"string","example":"Fast food"},"slug":{"type":"string","example":"fast-food"},"description":{"type":"string","example":"Quick bites & street food."},"coverUrl":{"type":"string","example":"https://cdn.xedoapp.com/collections/cover/abc.jpg","nullable":true},"createdAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"}},"required":["publicId","name","slug","createdAt","updatedAt"]},"DevApiOrderCustomerDto":{"type":"object","properties":{"firstName":{"type":"string","example":"Jean"},"lastName":{"type":"string","example":"Kouassi"},"email":{"type":"string","example":"jean@example.com"},"phone":{"type":"string","example":"+225 07 12 34 56 78"}}},"DevApiOrderPaymentDto":{"type":"object","properties":{"reference":{"type":"string","example":"PAY-2024-001"},"amount":{"type":"number","example":125000},"onlineAmount":{"type":"number","example":37500,"nullable":true,"description":"Online portion amount (split payment only)."},"status":{"type":"string","enum":["pending","processing","success","failed"],"example":"success"},"method":{"type":"string","enum":["external_wallet","loyalty_card","pay_on_delivery","split_payment"],"example":"external_wallet"}},"required":["reference","amount","status","method"]},"DevApiOrderListItemDto":{"type":"object","properties":{"id":{"type":"number","example":1,"description":"Order internal id"},"publicId":{"type":"string","example":"ORD-XPK39ZQA01","description":"Public id (cart publicId)."},"customer":{"$ref":"#/components/schemas/DevApiOrderCustomerDto"},"itemsCount":{"type":"number","example":5},"orderAmount":{"type":"number","example":125000},"deliveryCost":{"type":"number","example":1000},"payment":{"$ref":"#/components/schemas/DevApiOrderPaymentDto"},"deliveryType":{"type":"string","enum":["DELIVERY","PICKUP"],"nullable":true},"orderStatus":{"type":"string","enum":["PREPARING","IN_DELIVERY","DELIVERED","READY_FOR_PICKUP","PICKED_UP"],"nullable":true},"meta":{"type":"object","description":"Developer-supplied metadata attached at cart creation.","nullable":true,"example":{"internalOrderId":"ORD-12345"}},"createdAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"}},"required":["id","publicId","customer","itemsCount","orderAmount","deliveryCost","payment","createdAt","updatedAt"]},"DevApiOrderItemCombinationDto":{"type":"object","properties":{"sku":{"type":"string","example":"SKU-XL-RED"},"optionNames":{"example":["XL","Red"],"type":"array","items":{"type":"string"}},"priceAdjustment":{"type":"number","example":500},"priceAdjustmentType":{"type":"string","enum":["fixed","percentage"],"example":"fixed"}},"required":["sku","optionNames"]},"DevApiOrderItemDto":{"type":"object","properties":{"id":{"type":"number","example":1,"description":"Cart item internal id"},"productId":{"type":"number","example":283},"name":{"type":"string","example":"Samsung Galaxy A54"},"slug":{"type":"string","example":"samsung-galaxy-a54"},"price":{"type":"number","example":125000},"quantity":{"type":"number","example":1},"lineTotal":{"type":"number","example":125000},"coverUrl":{"type":"string","example":"https://cdn.xedoapp.com/products/cover/abc.jpg","nullable":true},"combinationPublicId":{"type":"string","example":"COMB_ABC123"},"combination":{"$ref":"#/components/schemas/DevApiOrderItemCombinationDto"}},"required":["id","productId","name","slug","price","quantity","lineTotal"]},"DevApiOrderTotalsDto":{"type":"object","properties":{"subtotal":{"type":"number","example":125000},"deliveryFees":{"type":"number","example":1000},"total":{"type":"number","example":126000}},"required":["subtotal","deliveryFees","total"]},"DevApiOrderDeliveryInfoDto":{"type":"object","properties":{"areaId":{"type":"number","example":1},"areaName":{"type":"string","example":"Cocody, Angré 7ème tranche"},"deliveryCost":{"type":"number","example":1000}},"required":["areaId","areaName","deliveryCost"]},"DevApiOrderDeliveryDto":{"type":"object","properties":{"deliveryType":{"type":"string","enum":["DELIVERY","PICKUP"],"example":"DELIVERY"},"deliveryInfo":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DevApiOrderDeliveryInfoDto"}]},"additionalDetails":{"type":"string","example":"Appeler 30 minutes avant la livraison","nullable":true},"orderStatus":{"type":"string","enum":["PREPARING","IN_DELIVERY","DELIVERED","READY_FOR_PICKUP","PICKED_UP"],"example":"PREPARING"}},"required":["deliveryType","orderStatus"]},"DevApiOrderDetailDto":{"type":"object","properties":{"id":{"type":"number","example":1,"description":"Order internal id"},"publicId":{"type":"string","example":"ORD-XPK39ZQA01"},"status":{"type":"string","enum":["DRAFT","PENDING_PAYMENT","ABANDONED","PAYMENT_FAILED","PAYMENT_COMPLETED"],"example":"PAYMENT_COMPLETED"},"customer":{"$ref":"#/components/schemas/DevApiOrderCustomerDto"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DevApiOrderItemDto"}},"totals":{"$ref":"#/components/schemas/DevApiOrderTotalsDto"},"payment":{"$ref":"#/components/schemas/DevApiOrderPaymentDto"},"delivery":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DevApiOrderDeliveryDto"}]},"meta":{"type":"object","description":"Developer-supplied metadata attached at cart creation.","nullable":true,"example":{"internalOrderId":"ORD-12345"}},"createdAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"}},"required":["id","publicId","status","customer","items","totals","payment","createdAt","updatedAt"]},"DevApiCartCustomerDto":{"type":"object","properties":{"firstName":{"type":"string","example":"Jean"},"lastName":{"type":"string","example":"Kouassi"},"email":{"type":"string","example":"jean@example.com"},"phone":{"type":"string","example":"+225 07 12 34 56 78"}}},"DevApiCartListItemDto":{"type":"object","properties":{"id":{"type":"number","example":1,"description":"Cart internal id"},"publicId":{"type":"string","example":"CART-XPK39ZQA01"},"customer":{"$ref":"#/components/schemas/DevApiCartCustomerDto"},"itemsCount":{"type":"number","example":5},"cartAmount":{"type":"number","example":125000},"deliveryCost":{"type":"number","example":1000},"status":{"type":"string","enum":["PENDING_PAYMENT","ABANDONED","PAYMENT_FAILED","PAYMENT_COMPLETED"]},"deliveryType":{"type":"string","enum":["DELIVERY","PICKUP"],"nullable":true},"orderStatus":{"type":"string","enum":["PREPARING","IN_DELIVERY","DELIVERED","READY_FOR_PICKUP","PICKED_UP"],"nullable":true},"meta":{"type":"object","description":"Developer-supplied metadata attached at cart creation.","nullable":true,"example":{"internalOrderId":"ORD-12345"}},"createdAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"}},"required":["id","publicId","customer","itemsCount","cartAmount","deliveryCost","status","createdAt","updatedAt"]},"DevApiCartItemCombinationDto":{"type":"object","properties":{"sku":{"type":"string","example":"SKU-XL-RED"},"optionNames":{"example":["XL","Red"],"type":"array","items":{"type":"string"}},"priceAdjustment":{"type":"number","example":500},"priceAdjustmentType":{"type":"string","enum":["fixed","percentage"],"example":"fixed"}},"required":["sku","optionNames"]},"DevApiCartItemDto":{"type":"object","properties":{"id":{"type":"number","example":1,"description":"Cart item internal id"},"productId":{"type":"number","example":283},"name":{"type":"string","example":"Samsung Galaxy A54"},"slug":{"type":"string","example":"samsung-galaxy-a54"},"price":{"type":"number","example":125000},"quantity":{"type":"number","example":1},"lineTotal":{"type":"number","example":125000},"coverUrl":{"type":"string","example":"https://cdn.xedoapp.com/products/cover/abc.jpg","nullable":true},"combinationPublicId":{"type":"string","example":"COMB_ABC123"},"combination":{"$ref":"#/components/schemas/DevApiCartItemCombinationDto"}},"required":["id","productId","name","slug","price","quantity","lineTotal"]},"DevApiCartTotalsDto":{"type":"object","properties":{"subtotal":{"type":"number","example":125000},"deliveryFees":{"type":"number","example":1000},"total":{"type":"number","example":126000}},"required":["subtotal","deliveryFees","total"]},"DevApiCartDeliveryInfoDto":{"type":"object","properties":{"areaId":{"type":"number","example":1},"areaName":{"type":"string","example":"Cocody, Angré 7ème tranche"},"deliveryCost":{"type":"number","example":1000}},"required":["areaId","areaName","deliveryCost"]},"DevApiCartDeliveryDto":{"type":"object","properties":{"deliveryType":{"type":"string","enum":["DELIVERY","PICKUP"],"example":"DELIVERY"},"deliveryInfo":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DevApiCartDeliveryInfoDto"}]},"additionalDetails":{"type":"string","example":"Appeler 30 minutes avant","nullable":true},"orderStatus":{"type":"string","enum":["PREPARING","IN_DELIVERY","DELIVERED","READY_FOR_PICKUP","PICKED_UP"],"example":"PREPARING"}},"required":["deliveryType","orderStatus"]},"DevApiCartDetailDto":{"type":"object","properties":{"id":{"type":"number","example":1,"description":"Cart internal id"},"publicId":{"type":"string","example":"CART-XPK39ZQA01"},"status":{"type":"string","enum":["PENDING_PAYMENT","ABANDONED","PAYMENT_FAILED","PAYMENT_COMPLETED"]},"customer":{"$ref":"#/components/schemas/DevApiCartCustomerDto"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DevApiCartItemDto"}},"totals":{"$ref":"#/components/schemas/DevApiCartTotalsDto"},"delivery":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DevApiCartDeliveryDto"}]},"meta":{"type":"object","description":"Developer-supplied metadata attached at cart creation.","nullable":true,"example":{"internalOrderId":"ORD-12345"}},"createdAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"}},"required":["id","publicId","status","customer","items","totals","createdAt","updatedAt"]},"DevApiCheckoutPreviewResponseDto":{"type":"object","properties":{"subtotal":{"type":"number","example":250000},"deliveryCost":{"type":"number","example":1000},"total":{"type":"number","example":251000},"onlineAmount":{"type":"number","example":150000,"nullable":true,"description":"Set only when paymentMethod = split_payment."},"onDeliveryAmount":{"type":"number","example":101000,"nullable":true,"description":"Set only when paymentMethod = split_payment."}},"required":["subtotal","deliveryCost","total"]},"DevApiCheckoutItemDto":{"type":"object","properties":{"publicProductId":{"type":"string","example":"9023748120"},"quantity":{"type":"number","example":2,"minimum":1},"combinationPublicId":{"type":"string","example":"COMB_ABC123"}},"required":["publicProductId","quantity"]},"DevApiCheckoutDeliveryDto":{"type":"object","properties":{"deliveryType":{"type":"string","enum":["DELIVERY","PICKUP"],"example":"DELIVERY"},"deliveryAreaId":{"type":"number","example":1,"description":"Required when deliveryType = DELIVERY."}},"required":["deliveryType"]},"DevApiCheckoutPreviewDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DevApiCheckoutItemDto"}},"delivery":{"$ref":"#/components/schemas/DevApiCheckoutDeliveryDto"},"paymentMethod":{"type":"string","enum":["external_wallet","split_payment"],"example":"external_wallet"}},"required":["items","delivery","paymentMethod"]},"DevApiCheckoutTotalsDto":{"type":"object","properties":{"subtotal":{"type":"number","example":250000},"deliveryCost":{"type":"number","example":1000},"total":{"type":"number","example":251000},"onlineAmount":{"type":"number","example":150000,"nullable":true},"onDeliveryAmount":{"type":"number","example":101000,"nullable":true}},"required":["subtotal","deliveryCost","total"]},"DevApiCheckoutPaymentDto":{"type":"object","properties":{"reference":{"type":"string","example":"PAY-XPK39ZQA01"},"status":{"type":"string","example":"pending"}},"required":["reference","status"]},"DevApiCheckoutCreateResponseDto":{"type":"object","properties":{"publicId":{"type":"string","example":"CART-XPK39ZQA01"},"status":{"type":"string","example":"PENDING_PAYMENT"},"totals":{"$ref":"#/components/schemas/DevApiCheckoutTotalsDto"},"payment":{"$ref":"#/components/schemas/DevApiCheckoutPaymentDto"},"checkoutUrl":{"type":"string","example":"https://checkout.moneroo.io/abc-def"}},"required":["publicId","status","totals","payment","checkoutUrl"]},"DevApiCheckoutCustomerDto":{"type":"object","properties":{"firstName":{"type":"string","example":"Jean"},"lastName":{"type":"string","example":"Kouassi"},"email":{"type":"string","example":"jean@example.com"},"phone":{"type":"string","example":"+225 07 12 34 56 78"}},"required":["firstName","lastName","email","phone"]},"DevApiCheckoutCreateDto":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/DevApiCheckoutCustomerDto"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DevApiCheckoutItemDto"}},"delivery":{"$ref":"#/components/schemas/DevApiCheckoutDeliveryDto"},"paymentMethod":{"type":"string","enum":["external_wallet","split_payment"],"example":"external_wallet"},"returnUrl":{"type":"string","example":"https://my-app.com/after-checkout","description":"URL to redirect the customer to after the payment provider checkout. Must be HTTPS."},"additionalDetails":{"type":"string","example":"Appeler 30 min avant"},"meta":{"type":"object","description":"Free-form JSON payload returned as-is in every cart/order response. Use it to attach your own identifiers (e.g. internalOrderId).","example":{"internalOrderId":"ORD-12345","source":"mobile-app"}}},"required":["customer","items","delivery","paymentMethod","returnUrl"]},"DevApiCheckoutRetryPayResponseDto":{"type":"object","properties":{"payment":{"$ref":"#/components/schemas/DevApiCheckoutPaymentDto"},"checkoutUrl":{"type":"string","example":"https://checkout.moneroo.io/abc-def"}},"required":["payment","checkoutUrl"]},"DevApiCheckoutRetryPayDto":{"type":"object","properties":{"returnUrl":{"type":"string","example":"https://my-app.com/after-checkout"}},"required":["returnUrl"]},"DevApiDeliveryAreaDto":{"type":"object","properties":{"id":{"type":"number","example":1,"description":"Identifier to pass as `delivery.deliveryAreaId` when creating a cart."},"name":{"type":"string","example":"Cocody"},"deliveryCost":{"type":"number","example":1000,"description":"Delivery cost for this area."}},"required":["id","name","deliveryCost"]},"DevApiBusinessCategoryDto":{"type":"object","properties":{"id":{"type":"number","example":3},"name":{"type":"string","example":"Restauration"}},"required":["id","name"]},"DevApiMarketplaceProfileDto":{"type":"object","properties":{"slug":{"type":"string","example":"ma-boutique"},"enabled":{"type":"boolean","example":true},"businessCategory":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/DevApiBusinessCategoryDto"}]},"whatsappPhoneNumber":{"type":"string","example":"+225 07 12 34 56 78","nullable":true},"enablePayOnDelivery":{"type":"boolean","example":true},"enableSplitPayment":{"type":"boolean","example":true},"defaultOnlineSplitPaymentPercentage":{"type":"number","example":30,"nullable":true,"description":"Default percentage paid online for split payment. Null if split payment is disabled."},"splitPaymentDeliveryCostHandling":{"type":"string","enum":["online","on_delivery"],"example":"on_delivery","description":"Whether the delivery cost is paid online or on delivery in a split payment."},"createdAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-05-26T13:14:15.000Z"}},"required":["slug","enabled","enablePayOnDelivery","enableSplitPayment","splitPaymentDeliveryCostHandling","createdAt","updatedAt"]}}}}