{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/referralcandy/main/json-schema/referralcandy-post-api-v22-purchase-json-request-schema.json",
  "title": "PostApiV22PurchaseJsonRequest",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/referralcandy-openapi-generated.yml#/components/schemas/PostApiV22PurchaseJsonRequest",
  "type": "object",
  "properties": {
    "first_name": {
      "type": "string",
      "description": "Customer's first name."
    },
    "last_name": {
      "type": "string",
      "description": "Customer's last name."
    },
    "email": {
      "type": "string",
      "description": "Customer's email address."
    },
    "locale": {
      "type": "string",
      "description": "Customer's preferred language."
    },
    "discount_code": {
      "type": "string",
      "description": "Discount code used in the order."
    },
    "accepts_marketing": {
      "type": "string",
      "description": "Whether the customer opted in to marketing (true/false)."
    },
    "order_timestamp": {
      "type": "string",
      "description": "UNIX timestamp of order."
    },
    "browser_ip": {
      "type": "string",
      "description": "IP address of customer when making the purchase."
    },
    "user_agent": {
      "type": "string",
      "description": "User agent string of the customer's web browser."
    },
    "invoice_amount": {
      "type": "string",
      "description": "Total invoice amount for this purchase."
    },
    "currency_code": {
      "type": "string",
      "description": "ISO 4217 currency code used in order invoice."
    },
    "external_reference_id": {
      "type": "string",
      "description": "An ID that can be used to track this purchase externally."
    },
    "referrer_id": {
      "type": "string",
      "description": "Optional referrer identifier."
    },
    "timestamp": {
      "type": "string",
      "description": "UNIX timestamp of API call."
    },
    "accessID": {
      "type": "string",
      "description": "API Access ID."
    },
    "signature": {
      "type": "string",
      "description": "Calculated signature."
    }
  },
  "required": [
    "first_name",
    "email",
    "discount_code",
    "order_timestamp",
    "browser_ip",
    "user_agent",
    "invoice_amount",
    "currency_code",
    "timestamp",
    "accessID",
    "signature"
  ]
}