Order Interactions
POST /orders/[playerId]/reservation
This endpoint creates a new reservation record. It checks if a reservation already exists for the given player and product. If not, it creates a new reservation with a unique operation ID.
Endpoint
Request Body
{
"playerId": "string"
"productId": "string"
}| Attribute | Type |
|---|---|
| playerId | string |
| productId | string |
Parameters
| Attribute | Description | Type |
|---|---|---|
| playerId | Unique identifier for the player | string |
Responses
200
Successfully created reservation
{
"operationId": "string"
"transactionId": "string"
"orderType": "string"
"orderStatus": "string"
"playerId": "string"
"productId": "string"
"date": "string"
}400
Reservation already exists for this player and product
500
Internal server error
DELETE /orders/[playerId]/reservation/[transactionId]
This endpoint cancels a reservation identified by the transactionId. It validates the existing reservation record, updates its status to 'Cancelled', and creates a cancellation record.
Endpoint
Parameters
| Attribute | Description | Type |
|---|---|---|
| transactionId | Unique identifier for the operation | string |
| playerId | Unique identifier for the player | string |
Responses
200
Successfully cancelled the reservation
400
Invalid operation or record status/type
500
Internal server error
POST /orders/[playerId]/send/[transactionId]
This endpoint initiates a send process for an existing reservation. It validates the existing reservation record and updates its status to 'Completed'. A new 'Acquisition' record is then created and saved.
Endpoint
Parameters
| Attribute | Description | Type |
|---|---|---|
| transactionId | Unique identifier for the operation | string |
| playerId | Unique identifier for the player | string |
Responses
200
Successfully initiated delivery
{
"operationId": "string"
"transactionId": "string"
"orderType": "string"
"orderStatus": "string"
"playerId": "string"
"productId": "string"
"date": "string"
}400
Invalid operation or record status/type
500
Internal server error
POST /orders/[playerId]/acquisition/[transactionId]
This endpoint initiates a acquisition process for an existing reservation. It validates the existing reservation record and updates its status to 'Completed'. A new 'Acquisition' record is then created and saved.
Endpoint
Parameters
| Attribute | Description | Type |
|---|---|---|
| transactionId | Unique identifier for the operation | string |
| playerId | Unique identifier for the player | string |
Responses
200
Successfully initiated acquisition
{
"operationId": "string"
"transactionId": "string"
"orderType": "string"
"orderStatus": "string"
"playerId": "string"
"productId": "string"
"date": "string"
}400
Invalid operation or record status/type
500
Internal server error
DELETE /orders/[playerId]/acquisition/[transactionId]
This endpoint cancels a acquisition identified by the transactionId. It validates the existing acquisition record, updates its status to 'Cancelled', and creates a cancellation record.
Endpoint
Parameters
| Attribute | Description | Type |
|---|---|---|
| transactionId | Unique identifier for the operation | string |
| playerId | Unique identifier for the player | string |
Responses
200
Successfully cancelled the acquisition
400
Invalid operation or record status/type
500
Internal server error