HTTP API
Base path: /market/mk20
{id} is the deal identifier (ULID).
Authentication
All Market 2.0 API routes require auth except /info/*.
Auth details are documented in: Architecture: Authentication and Authorization
API Compatibility
Market 2.0 APIs are expected to evolve conservatively, with backward compatibility as a primary consideration.
Swagger and OpenAPI Specs
Use the running storage provider spec first for integration and debugging.
Running provider endpoints:
GET /market/mk20/info/GET /market/mk20/info/swagger.yamlGET /market/mk20/info/swagger.json
Source tree specs:
Version note:
A running provider may be on a different Curio version than this documentation.
If behavior differs, use that provider's
/info/swagger.*as the operational reference.
Endpoint Map
POST /dealGET /status/{id}POST /update/{id}GET /productsGET /sourcesGET /contractsPOST /uploads/{id}GET /uploads/{id}PUT /uploads/{id}/{chunkNum}POST /uploads/finalize/{id}PUT /upload/{id}POST /upload/{id}
Endpoint Details
POST /deal
POST /dealCreates a deal.
Request:
Body:
mk20.DealJSON.
Success:
200Ok
Error codes:
400ErrBadProposal401ErrUnAuthorized404ErrDealNotFound422ErrUnsupportedDataSource423ErrUnsupportedProduct424ErrProductNotEnabled425ErrProductValidationFailed426ErrDealRejectedByMarket429ErrServiceOverloaded430ErrMalformedDataSource440ErrMarketNotEnabled441ErrDurationTooShort500ErrServerInternalError503ErrServiceMaintenance
Response note:
Error body is plain text:
Reason: <text>.
GET /status/{id}
GET /status/{id}Returns deal status by product.
Success:
200mk20.DealProductStatusResponse
Error codes:
400invalid/missing id401ErrUnAuthorized404ErrDealNotFound500ErrServerInternalError
POST /update/{id}
POST /update/{id}Updates an existing deal in supported update paths. The update path can fill missing data or add product fields that are not already present. Existing data and existing product fields are not replaced.
Request:
Body:
mk20.DealJSON.
Success:
200Ok
Error codes:
400ErrBadProposal401ErrUnAuthorized404ErrDealNotFound422ErrUnsupportedDataSource423ErrUnsupportedProduct424ErrProductNotEnabled425ErrProductValidationFailed426ErrDealRejectedByMarket429ErrServiceOverloaded430ErrMalformedDataSource440ErrMarketNotEnabled441ErrDurationTooShort500ErrServerInternalError503ErrServiceMaintenance
GET /products
GET /productsReturns enabled products for this provider.
Success:
200{ "products": [...] }
Error codes:
401ErrUnAuthorized500ErrServerInternalError
GET /sources
GET /sourcesReturns enabled data source types for this provider.
Success:
200{ "sources": [...] }
Error codes:
401ErrUnAuthorized500ErrServerInternalError
GET /contracts
GET /contractsReturns allowlisted DDO market contracts for this provider.
Success:
200{ "contracts": [...] }
Error codes:
401ErrUnAuthorized404no supported contracts found500ErrServerInternalError
POST /uploads/{id}
POST /uploads/{id}Starts chunked upload session.
Request:
Body:
StartUpload(raw_size,chunk_size).
Success:
200UploadStartCodeOk
Error codes:
400UploadStartCodeBadRequest401ErrUnAuthorized404UploadStartCodeDealNotFound409UploadStartCodeAlreadyStarted500UploadStartCodeServerError
GET /uploads/{id}
GET /uploads/{id}Returns chunked upload progress.
Success:
200UploadStatusCodeOk
Error codes:
400invalid/missing id401ErrUnAuthorized404UploadStatusCodeDealNotFound425UploadStatusCodeUploadNotStarted500UploadStatusCodeServerError
PUT /uploads/{id}/{chunkNum}
PUT /uploads/{id}/{chunkNum}Uploads one chunk.
Success:
200UploadOk
Error codes:
400UploadBadRequest401ErrUnAuthorized404UploadNotFound409UploadChunkAlreadyUploaded429UploadRateLimit500UploadServerError
POST /uploads/finalize/{id}
POST /uploads/finalize/{id}Finalizes chunked upload. Body may be empty or full mk20.Deal.
Success:
200Ok
Error codes:
400ErrBadProposal401ErrUnAuthorized404ErrDealNotFound422ErrUnsupportedDataSource423ErrUnsupportedProduct424ErrProductNotEnabled425ErrProductValidationFailed426ErrDealRejectedByMarket429ErrServiceOverloaded430ErrMalformedDataSource440ErrMarketNotEnabled441ErrDurationTooShort500ErrServerInternalError503ErrServiceMaintenance
PUT /upload/{id}
PUT /upload/{id}Uploads full payload in serial flow.
Success:
200UploadOk
Error codes:
400UploadBadRequest401ErrUnAuthorized404UploadStartCodeDealNotFound500UploadServerError
POST /upload/{id}
POST /upload/{id}Finalizes serial upload. Body may be empty or full mk20.Deal.
Success:
200Ok
Error codes:
400ErrBadProposal401ErrUnAuthorized404ErrDealNotFound422ErrUnsupportedDataSource423ErrUnsupportedProduct424ErrProductNotEnabled425ErrProductValidationFailed426ErrDealRejectedByMarket429ErrServiceOverloaded430ErrMalformedDataSource440ErrMarketNotEnabled441ErrDurationTooShort500ErrServerInternalError503ErrServiceMaintenance
Operational Notes
Upload finalize endpoints accept an empty body when the deal already has data details. If the accepted deal omitted data details, finalize must include a full deal payload so MK20 can bind the uploaded piece to the deal.
Provider policies for products, sources, and contracts affect acceptance behavior.
When behavior differs from docs, trust the running provider
/info/swagger.*.
Last updated