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
Request Body
{
"productId": "string" // required
"establishmentId": "string" // required
"email": "string"
"denomination": "integer"
"quantity": "integer"
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
productId | string | Sí | |
establishmentId | string | Sí | |
string | No | ||
denomination | integer | No | |
quantity | integer | No |
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí |
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
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí | |
transactionId | string | path | Sí |
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
Request Body
{
"addressLine1": "string"
"country": "string"
"postalCode": "integer"
"recipientName": "string"
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
addressLine1 | string | No | |
country | string | No | |
postalCode | integer | No | |
recipientName | string | No |
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí | |
transactionId | string | path | Sí |
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
Request Body
{
"trackingNumber": "string" // required
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
trackingNumber | string | Sí |
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí | |
transactionId | string | path | Sí |
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
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí | |
transactionId | string | path | Sí |
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
Request Body
{
"refund": "boolean"
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
refund | boolean | No |
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí | |
transactionId | string | path | Sí |
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
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí |
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
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
playerId | string | path | Sí | |
transactionId | string | path | Sí |
Responses
200
Transaction details retrieved.
500
Failed to retrieve transaction.