Orders

Orders

POST /orders/[playerId]/reservation

Creates a reservation for a product tied to a specific player and establishment. This can be used to hold inventory before full checkout or confirmation.

Endpoint

POST/orders/{playerId}/reservation

Request Body

{
  "productId": "string" // required
  "establishmentId": "string" // required
  "email": "string"
  "denomination": "integer"
  "quantity": "integer"
}
AtributoTipoRequeridoDescripción
productIdstring
establishmentIdstring
emailstringNo
denominationintegerNo
quantityintegerNo

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath

Responses

200

Reservation successfully created.

400

Invalid reservation payload.

500

Failed to reserve product.

DELETE /orders/[playerId]/reservation/[transactionId]

Cancels a previously created reservation by transaction ID. Frees up any reserved stock and removes pending entries.

Endpoint

DELETE/orders/{playerId}/reservation/{transactionId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath
transactionIdstringpath

Responses

200

Reservation cancelled successfully.

400

Invalid cancellation request.

500

Server error while cancelling reservation.

POST /orders/[playerId]/send/[transactionId]

Confirms and processes the shipment of a reserved physical product. Requires address and recipient details to complete dispatch.

Endpoint

POST/orders/{playerId}/send/{transactionId}

Request Body

{
  "addressLine1": "string"
  "country": "string"
  "postalCode": "integer"
  "recipientName": "string"
}
AtributoTipoRequeridoDescripción
addressLine1stringNo
countrystringNo
postalCodeintegerNo
recipientNamestringNo

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath
transactionIdstringpath

Responses

200

Shipping process confirmed.

400

Missing or invalid address information.

500

Error processing shipment.

POST /orders/[playerId]/track/[transactionId]

Registers a tracking number for a dispatched order. Used to update delivery status and notify the player.

Endpoint

POST/orders/{playerId}/track/{transactionId}

Request Body

{
  "trackingNumber": "string" // required
}
AtributoTipoRequeridoDescripción
trackingNumberstring

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath
transactionIdstringpath

Responses

200

Tracking number saved successfully.

400

Invalid tracking data.

500

Failed to register tracking number.

POST /orders/[playerId]/acquisition/[transactionId]

Finalizes the acquisition of a reserved product by marking it as completed. This may trigger reward attribution, stock deduction, or analytics updates.

Endpoint

POST/orders/{playerId}/acquisition/{transactionId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath
transactionIdstringpath

Responses

200

Acquisition completed successfully.

400

Invalid acquisition request.

500

Server error during acquisition.

DELETE /orders/[playerId]/acquisition/[transactionId]

Cancels a product acquisition and optionally processes a refund. Useful in cases of duplicate redemptions, errors, or admin overrides.

Endpoint

DELETE/orders/{playerId}/acquisition/{transactionId}

Request Body

{
  "refund": "boolean"
}
AtributoTipoRequeridoDescripción
refundbooleanNo

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath
transactionIdstringpath

Responses

200

Acquisition cancelled successfully.

400

Invalid cancellation request.

500

Server error during cancellation.

GET /players/[playerId]/orders

Retrieves a list of orders (acquisitions, redemptions, reservations) associated with the player.

Endpoint

GET/players/{playerId}/orders

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath

Responses

200

Orders retrieved successfully.

400

Invalid player ID.

500

Server error while fetching orders.

GET /players/[playerId]/orders/[transactionId]

Retrieves the details of a specific transaction by transaction ID for a player. Useful for auditing, reprocessing, or reviewing delivery history.

Endpoint

GET/players/{playerId}/orders/{transactionId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
playerIdstringpath
transactionIdstringpath

Responses

200

Transaction details retrieved.

500

Failed to retrieve transaction.