Skip to content

Order a Prize

Notify LoyaltyGyre that a player has chosen to order a physical prize. This endpoint logs the player’s decision and allows LoyaltyGyre to initiate the prize fulfillment process.

Endpoint

POST /prize/order

Query Parameters

Parameter Type Description
player_id
Required
string / number The unique identifier for the player in the casino's system.
prize_id
Required
string / number The unique identifier for the prize that the player has chosen to order for shipment.
recipient_name
Required
string The name of the prize recipient.
street
Required
string The street address for delivery.
city
Required
string The city for delivery.
state string The state or region for delivery.
postal_code
Required
string The postal code for delivery.
country
Required
string The country for delivery.
phone_number string The recipient's phone number, for contact if necessary.
email string The recipient's email address, if available.
additional_notes string Any additional notes or special instructions for the shipment.

Example Request

cURL
curl -X POST "https://app.loyaltygyre.com/api/prize/order" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
           "player_id": "12345",
           "prize_id": "202",
           "recipient_name": "John Doe",
           "street": "123 Main St",
           "city": "Las Vegas",
           "state": "NV",
           "postal_code": "89109",
           "country": "US",
           "phone_number": "+1-555-0123",
           "email": "[email protected]",
           "additional_notes": "Leave at front desk if recipient is unavailable"
         }'

Responses

200 OK

The order request was successfully recorded, and prize fulfillment is initiated.

Response
{
  "status": "success",
  "message": "Prize order recorded. Awaiting confirmation for shipment."
}
  • message: Indicates that the prize order has been logged and is pending confirmation for shipment by the casino.


400 Bad Request

The request is missing required parameters or contains invalid data.

Response
{
  "status": "error",
  "message": "The given data was invalid.",
  "errors": {
    "recipient_name": [
      {
        "error": "required",
        "message": "The recipient name field is required."
      }
    ],
    "email": [
      {
        "error": "email", 
        "message": "The email field must be a valid email address."
      }
    ]
  }
}


401 Unauthorized

The API key is missing or invalid.

Response
{
  "status": "error",
  "message": "Invalid or missing API key"
}


403 Forbidden

The specified prize is not available in the player’s inventory.

Response
{
  "status": "error",
  "message": "Player does not have the specified prize in inventory"
}


404 Not Found

The specified prize was not found or is unavailable for order.

Response
{
  "status": "error",
  "message": "Prize not found or unavailable for order"
}


500 Internal Server Error

An internal error occurred while processing the request.

Response
{
  "status": "error",
  "message": "An error occurred while recording the prize order."
}