Skip to main content
POST
/
api
/
v4.0
/
integrations
/
orders
Track Order
curl --request POST \
  --url https://api.gameball.co/api/v4.0/integrations/orders \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "customerId": "cust_123456789",
  "orderId": "ORD12345",
  "orderDate": "2024-10-16T08:13:29.290Z",
  "totalPaid": 250.75,
  "email": "john.doe@example.com",
  "mobile": "+1234567890",
  "totalPrice": 300,
  "totalDiscount": 50,
  "totalShipping": 10,
  "totalTax": 15,
  "lineItems": [
    {
      "productId": "PROD98765",
      "quantity": 2,
      "price": 100,
      "sku": "SKU98765",
      "tags": [
        "electronics",
        "smartphone"
      ],
      "category": [
        "mobile phones"
      ],
      "weight": 0.5,
      "vendor": "TechVendor",
      "collection": [
        "latest gadgets"
      ],
      "title": "Smartphone XYZ",
      "taxes": 7.5,
      "discount": 25,
      "extra": {
        "subClass": "SUBCLASS123"
      }
    }
  ],
  "redemption": {
    "pointsHoldReference": "HOLD123",
    "couponsLockReference": "LOCK123",
    "couponCodes": [
      "DISCOUNT10"
    ]
  },
  "extra": {
    "paymentMethod": "CREDIT CARD"
  },
  "merchant": {
    "uniqueId": "MERCH001",
    "name": "TechGadgetStore",
    "branch": {
      "uniqueId": "BRANCH001",
      "name": "Downtown Branch"
    }
  },
  "guest": false,
  "channel": "pos",
  "cartId": "CART98765",
  "cashbackConfigurations": {
    "returnWindow": 7
  }
}
'
{
  "customerId": "cust_123456789",
  "redeemedPoints": 1000,
  "rewardedPoints": 101,
  "lineItems": [
    {
      "productId": "PROD98765",
      "quantity": 2,
      "decimalPoints": 91.25,
      "points": 91,
      "score": 0
    }
  ]
}
Create orders in Gameball to award points for customer purchases. This API is used to track orders and reward customers for their completed purchases.
Security: Provide both apikey and secretkey headers.

Authorizations

apikey
string
header
required

Body

application/json
customerId
string
required

Unique identifier for the customer that you can reference across the customer's whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.

Example:

"cust_123456789"

orderId
string
required

Unique identifier for the order on your system. This ID is case-sensitive.

Example:

"ORD12345"

orderDate
string<date-time>
required

Timestamp of when the order was placed.

Example:

"2024-10-16T08:13:29.290Z"

totalPaid
number
required

The actual amount paid by the customer for the order, accounting for any discounts or coupons applied. Unlike totalPrice, which reflects the original cost of the order, totalPaid represents the final amount the customer paid at checkout after all adjustments. This value is used for reward calculations in Gameball to determine the points or benefits earned from the order. Example: A customer purchases items worth $120, including taxes and shipping. If a $20 coupon is applied, the totalPaid becomes $100, reflecting the discounted amount the customer paid.

Example:

250.75

email
string

Customer's email address. Note: This is required if your account uses email-based channel merging.

Example:

"john.doe@example.com"

mobile
string

Customer's mobile number. Note: This is required if your account uses mobile-based channel merging.

Example:

"+1234567890"

totalPrice
number

The total cost of the order, including all item prices, shipping, taxes, and tips. This value does not account for any discounts or coupons applied and is not used for calculations in Gameball; it is solely saved as historical data linked to the order. Must be a positive value. Example: A customer purchases items worth $120, including taxes and shipping. Even if a $20 coupon is applied, the totalPrice remains $120 as it represents the original cost of the order before any discounts are applied.

Example:

300

totalDiscount
number

Total discount applied to the order.

Example:

50

totalShipping
number

Total shipping cost associated with the order.

Example:

10

totalTax
number

Total tax amount for the order.

Example:

15

lineItems
object[]

An array containing details about each product in the order. If not provided, the calculation will only consider the total order values.

redemption
object

Redemption details for the order, including points held for redemption.

extra
object

Key-value pairs containing any extra information about the order. The values must be of type string or number. Example: If your business offers gift options, you might want to include a personalized gift message with the order. Additionally, specific delivery instructions can be recorded to ensure smooth delivery and provide a personalized experience.

Example:
{ "paymentMethod": "CREDIT CARD" }
merchant
object

This object contains details about the specific merchant involved in the transaction, which is particularly important for businesses managing multiple merchants or branches under the same Gameball account. This object can provide identifying information about both the main merchant and any associated branch where the transaction took place.

guest
boolean
default:false

Indicates whether the customer is a guest (not signed up). Set this to true for guest users; otherwise, they are treated as registered customers by default.

Example:

false

channel
enum<string>

The channel through which the order was placed helps track the origin of the order, particularly useful for systems that support multiple sales or communication channels. By identifying the channel, you can gain valuable insights into customer behavior, optimize channel-specific strategies, and ensure efficient handling of orders across platforms. Possible values: mobile - The order was placed through your mobile application. pos - The order was placed in person using a Point of Sale (POS) system, such as at a physical store or outlet. web - The order was placed through your website. callcenter - The order was placed over the phone by contacting a customer service representative or a call center.

Available options:
mobile,
pos,
web,
callcenter
Example:

"pos"

cartId
string

Identifier for the shopping cart associated with the order.

Example:

"CART98765"

cashbackConfigurations
object

This object contains configurations related to the cashback settings.

Response

200 - application/json

Order tracked successfully

customerId
string

Unique identifier for the customer that you can reference across the customer's whole lifetime. Could be a database ID, random string, email or anything that uniquely identifies the customer.

Example:

"cust_123456789"

redeemedPoints
number

Points redeemed by the customer for this order, if applicable. Example: If a customer has accumulated 500 points and decides to redeem 100 points for a discount on their current order, the redeemedPoints value for that transaction will be 100. This helps track how many points were used in the transaction and what benefits were applied to the order based on the customer's redeemed points.

Example:

1000

rewardedPoints
number

The total number of points rewarded to the customer for making this order. These points are typically awarded based on your configured cashback rewards. Example: If the store rewards 10 points for every $1 spent, and a customer places an order worth $50, the rewardedPoints for this order would be 500 points.

Example:

101

lineItems
object[]

Details about each product or service in the order, including points rewarded.