object OrdersApproveOrderById402Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersApproveOrderById403Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Unsupported operation for this reward.",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersApproveOrderById404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersApproveOrderById422Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Order failed: validation failure",
      "payload": {
        "some_field": {
          "some_sub_field": "Something went wrong with this parameter"
        }
      }
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersApproveOrderById429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersApproveOrderById500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersApproveOrderByIdResponse
{
  "type": "object",
  "required": [
    "order"
  ],
  "properties": {
    "order": {
      "type": "object",
      "required": [
        "id",
        "created_at",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "description": "Tremendous ID of the order"
        },
        "reward": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the reward"
            },
            "value": {
              "type": "object",
              "example": {
                "denomination": 50,
                "currency_code": "USD"
              },
              "required": [
                "denomination",
                "currency_code"
              ],
              "properties": {
                "denomination": {
                  "type": "number",
                  "format": "double",
                  "description": "Amount of the reward"
                },
                "currency_code": {
                  "enum": [
                    "USD",
                    "CAD",
                    "EUR",
                    "AED",
                    "AFN",
                    "ALL",
                    "AMD",
                    "ARS",
                    "AUD",
                    "AZN",
                    "BAM",
                    "BDT",
                    "BGN",
                    "BHD",
                    "BIF",
                    "BND",
                    "BOB",
                    "BRL",
                    "BWP",
                    "BYR",
                    "BZD",
                    "CDF",
                    "CHF",
                    "CLP",
                    "CNY",
                    "COP",
                    "CRC",
                    "CVE",
                    "CZK",
                    "DJF",
                    "DKK",
                    "DOP",
                    "DZD",
                    "EEK",
                    "EGP",
                    "ERN",
                    "ETB",
                    "GBP",
                    "GEL",
                    "GHS",
                    "GNF",
                    "GTQ",
                    "HKD",
                    "HNL",
                    "HRK",
                    "HUF",
                    "IDR",
                    "ILS",
                    "INR",
                    "IQD",
                    "IRR",
                    "ISK",
                    "JMD",
                    "JOD",
                    "JPY",
                    "KES",
                    "KHR",
                    "KRW",
                    "KWD",
                    "KZT",
                    "LBP",
                    "LKR",
                    "LTL",
                    "LVL",
                    "MAD",
                    "MDL",
                    "MGA",
                    "MKD",
                    "MMK",
                    "MOP",
                    "MUR",
                    "MXN",
                    "MYR",
                    "MZN",
                    "NAD",
                    "NGN",
                    "NIO",
                    "NOK",
                    "NPR",
                    "NZD",
                    "OMR",
                    "PAB",
                    "PEN",
                    "PHP",
                    "PKR",
                    "PLN",
                    "PYG",
                    "QAR",
                    "RON",
                    "RSD",
                    "RUB",
                    "RWF",
                    "SAR",
                    "SDG",
                    "SEK",
                    "SGD",
                    "SOS",
                    "SYP",
                    "THB",
                    "TND",
                    "TOP",
                    "TRY",
                    "TTD",
                    "TWD",
                    "TZS",
                    "UAH",
                    "UGX",
                    "UYU",
                    "UZS",
                    "VEF",
                    "VND",
                    "XAF",
                    "XOF",
                    "YER",
                    "ZAR",
                    "ZMK"
                  ],
                  "type": "string",
                  "example": "USD",
                  "description": "Currency of the reward"
                }
              }
            },
            "delivery": {
              "type": "object",
              "required": [
                "method",
                "status"
              ],
              "properties": {
                "method": {
                  "enum": [
                    "EMAIL",
                    "LINK",
                    "PHONE"
                  ],
                  "type": "string",
                  "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
                },
                "status": {
                  "enum": [
                    "SCHEDULED",
                    "FAILED",
                    "SUCCEEDED",
                    "PENDING"
                  ],
                  "type": "string",
                  "description": "Current status of the delivery of the reward:\n\n* `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon.\n* `FAILED` - Delivery of reward failed (e.g. email bounced).\n* `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened).\n* `PENDING` - Delivery is pending but not yet scheduled.\n"
                }
              },
              "description": "Details on how the reward is delivered to the recipient.\n"
            },
            "order_id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the order this reward is part of."
            },
            "recipient": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "John Doe Jr.",
                  "description": "Name of the recipient"
                },
                "email": {
                  "type": "string",
                  "example": "john.doe@example.com",
                  "description": "Email address of the recipient"
                },
                "phone": {
                  "type": "string",
                  "example": "123-456-7890",
                  "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
                }
              },
              "description": "Details of the recipient of the reward"
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Date the reward was created"
            },
            "deliver_at": {
              "type": "string",
              "format": "date",
              "example": "2023-12-31",
              "pattern": "YYYY-MM-DD",
              "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
            },
            "custom_fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "SOMEIDSOMEID",
                    "pattern": "[A-Z0-9]{4,20}",
                    "description": "Tremendous ID of the custom field"
                  },
                  "label": {
                    "type": "string",
                    "example": "harry_potter_house",
                    "description": "Label of the custom field"
                  },
                  "value": {
                    "type": "string",
                    "example": "Hufflepuff",
                    "nullable": true,
                    "description": "Value of the custom field"
                  }
                },
                "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
              }
            }
          },
          "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
        },
        "status": {
          "enum": [
            "CANCELED",
            "CART",
            "EXECUTED",
            "FAILED",
            "PENDING APPROVAL",
            "PENDING INTERNAL PAYMENT APPROVAL"
          ],
          "type": "string",
          "description": "Execution status of a given order\n\n<table>\n  <thead>\n    <tr>\n      <th>\n        Status\n      </th>\n      <th>\n        Description\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>\n        <code>\n          CANCELED\n        </code>\n      </td>\n      <td>\n        The order and all of its rewards were canceled.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          CART\n        </code>\n      </td>\n      <td>\n        The order has been created, but hasn't yet been processed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          EXECUTED\n        </code>\n      </td>\n      <td>\n        The order has been executed. Payment has been handled and rewards are being delivered (if applicable).\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          FAILED\n        </code>\n      </td>\n      <td>\n        The order could not be processed due to an error. E.g. due to insufficient funds in the account.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but needs approval to be executed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING INTERNAL PAYMENT APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but it is under review and requires approval from our team.\n      </td>\n    </tr>\n\n  </tbody>\n</table>\n"
        },
        "payment": {
          "type": "object",
          "properties": {
            "fees": {
              "type": "number",
              "format": "double",
              "example": 2.5,
              "minimum": 0,
              "description": "Fees for the order (in USD)"
            },
            "total": {
              "type": "number",
              "format": "double",
              "example": 52.5,
              "minimum": 0,
              "description": "Total price of the order including fees (in USD)"
            },
            "refund": {
              "type": "object",
              "required": [
                "total"
              ],
              "properties": {
                "total": {
                  "type": "number",
                  "format": "double",
                  "example": 52.5,
                  "minimum": 0,
                  "description": "Total amount of the order refunds (in USD)"
                }
              },
              "description": "Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards).\nNote that this property will only appear for canceled orders or orders with canceled rewards.\n"
            },
            "channel": {
              "enum": [
                "UI",
                "API",
                "EMBED",
                "DECIPHER",
                "QUALTRICS",
                "TYPEFORM",
                "SURVEY MONKEY"
              ],
              "type": "string",
              "description": "Name of the channel in which the order was created"
            },
            "subtotal": {
              "type": "number",
              "format": "double",
              "example": 50,
              "minimum": 0,
              "description": "Total price of the order before fees (in USD)"
            }
          },
          "description": "Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards.\nNote that this property will only appear for processed orders (`status` is `EXECUTED`)."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date the order has been created"
        },
        "invoice_id": {
          "type": "string",
          "example": "2E59A82B-0001",
          "description": "The ID for the invoice associated with this order"
        },
        "campaign_id": {
          "type": "string",
          "example": "IVM0I3WNJJL0",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
        },
        "external_id": {
          "type": "string",
          "example": "Your-Individual-Identifier-for-This-Order",
          "nullable": true,
          "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
        }
      },
      "description": "An order wraps around the fulfilment of one or more rewards."
    }
  }
}
object OrdersCreateOrder201Response
{
  "type": "object",
  "required": [
    "order"
  ],
  "properties": {
    "order": {
      "type": "object",
      "required": [
        "id",
        "created_at",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "description": "Tremendous ID of the order"
        },
        "reward": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the reward"
            },
            "value": {
              "type": "object",
              "example": {
                "denomination": 50,
                "currency_code": "USD"
              },
              "required": [
                "denomination",
                "currency_code"
              ],
              "properties": {
                "denomination": {
                  "type": "number",
                  "format": "double",
                  "description": "Amount of the reward"
                },
                "currency_code": {
                  "enum": [
                    "USD",
                    "CAD",
                    "EUR",
                    "AED",
                    "AFN",
                    "ALL",
                    "AMD",
                    "ARS",
                    "AUD",
                    "AZN",
                    "BAM",
                    "BDT",
                    "BGN",
                    "BHD",
                    "BIF",
                    "BND",
                    "BOB",
                    "BRL",
                    "BWP",
                    "BYR",
                    "BZD",
                    "CDF",
                    "CHF",
                    "CLP",
                    "CNY",
                    "COP",
                    "CRC",
                    "CVE",
                    "CZK",
                    "DJF",
                    "DKK",
                    "DOP",
                    "DZD",
                    "EEK",
                    "EGP",
                    "ERN",
                    "ETB",
                    "GBP",
                    "GEL",
                    "GHS",
                    "GNF",
                    "GTQ",
                    "HKD",
                    "HNL",
                    "HRK",
                    "HUF",
                    "IDR",
                    "ILS",
                    "INR",
                    "IQD",
                    "IRR",
                    "ISK",
                    "JMD",
                    "JOD",
                    "JPY",
                    "KES",
                    "KHR",
                    "KRW",
                    "KWD",
                    "KZT",
                    "LBP",
                    "LKR",
                    "LTL",
                    "LVL",
                    "MAD",
                    "MDL",
                    "MGA",
                    "MKD",
                    "MMK",
                    "MOP",
                    "MUR",
                    "MXN",
                    "MYR",
                    "MZN",
                    "NAD",
                    "NGN",
                    "NIO",
                    "NOK",
                    "NPR",
                    "NZD",
                    "OMR",
                    "PAB",
                    "PEN",
                    "PHP",
                    "PKR",
                    "PLN",
                    "PYG",
                    "QAR",
                    "RON",
                    "RSD",
                    "RUB",
                    "RWF",
                    "SAR",
                    "SDG",
                    "SEK",
                    "SGD",
                    "SOS",
                    "SYP",
                    "THB",
                    "TND",
                    "TOP",
                    "TRY",
                    "TTD",
                    "TWD",
                    "TZS",
                    "UAH",
                    "UGX",
                    "UYU",
                    "UZS",
                    "VEF",
                    "VND",
                    "XAF",
                    "XOF",
                    "YER",
                    "ZAR",
                    "ZMK"
                  ],
                  "type": "string",
                  "example": "USD",
                  "description": "Currency of the reward"
                }
              }
            },
            "delivery": {
              "type": "object",
              "required": [
                "method",
                "status"
              ],
              "properties": {
                "method": {
                  "enum": [
                    "EMAIL",
                    "LINK",
                    "PHONE"
                  ],
                  "type": "string",
                  "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
                },
                "status": {
                  "enum": [
                    "SCHEDULED",
                    "FAILED",
                    "SUCCEEDED",
                    "PENDING"
                  ],
                  "type": "string",
                  "description": "Current status of the delivery of the reward:\n\n* `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon.\n* `FAILED` - Delivery of reward failed (e.g. email bounced).\n* `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened).\n* `PENDING` - Delivery is pending but not yet scheduled.\n"
                }
              },
              "description": "Details on how the reward is delivered to the recipient.\n"
            },
            "order_id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the order this reward is part of."
            },
            "recipient": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "John Doe Jr.",
                  "description": "Name of the recipient"
                },
                "email": {
                  "type": "string",
                  "example": "john.doe@example.com",
                  "description": "Email address of the recipient"
                },
                "phone": {
                  "type": "string",
                  "example": "123-456-7890",
                  "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
                }
              },
              "description": "Details of the recipient of the reward"
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Date the reward was created"
            },
            "deliver_at": {
              "type": "string",
              "format": "date",
              "example": "2023-12-31",
              "pattern": "YYYY-MM-DD",
              "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
            },
            "custom_fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "SOMEIDSOMEID",
                    "pattern": "[A-Z0-9]{4,20}",
                    "description": "Tremendous ID of the custom field"
                  },
                  "label": {
                    "type": "string",
                    "example": "harry_potter_house",
                    "description": "Label of the custom field"
                  },
                  "value": {
                    "type": "string",
                    "example": "Hufflepuff",
                    "nullable": true,
                    "description": "Value of the custom field"
                  }
                },
                "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
              }
            }
          },
          "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
        },
        "status": {
          "enum": [
            "CANCELED",
            "CART",
            "EXECUTED",
            "FAILED",
            "PENDING APPROVAL",
            "PENDING INTERNAL PAYMENT APPROVAL"
          ],
          "type": "string",
          "description": "Execution status of a given order\n\n<table>\n  <thead>\n    <tr>\n      <th>\n        Status\n      </th>\n      <th>\n        Description\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>\n        <code>\n          CANCELED\n        </code>\n      </td>\n      <td>\n        The order and all of its rewards were canceled.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          CART\n        </code>\n      </td>\n      <td>\n        The order has been created, but hasn't yet been processed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          EXECUTED\n        </code>\n      </td>\n      <td>\n        The order has been executed. Payment has been handled and rewards are being delivered (if applicable).\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          FAILED\n        </code>\n      </td>\n      <td>\n        The order could not be processed due to an error. E.g. due to insufficient funds in the account.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but needs approval to be executed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING INTERNAL PAYMENT APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but it is under review and requires approval from our team.\n      </td>\n    </tr>\n\n  </tbody>\n</table>\n"
        },
        "payment": {
          "type": "object",
          "properties": {
            "fees": {
              "type": "number",
              "format": "double",
              "example": 2.5,
              "minimum": 0,
              "description": "Fees for the order (in USD)"
            },
            "total": {
              "type": "number",
              "format": "double",
              "example": 52.5,
              "minimum": 0,
              "description": "Total price of the order including fees (in USD)"
            },
            "refund": {
              "type": "object",
              "required": [
                "total"
              ],
              "properties": {
                "total": {
                  "type": "number",
                  "format": "double",
                  "example": 52.5,
                  "minimum": 0,
                  "description": "Total amount of the order refunds (in USD)"
                }
              },
              "description": "Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards).\nNote that this property will only appear for canceled orders or orders with canceled rewards.\n"
            },
            "channel": {
              "enum": [
                "UI",
                "API",
                "EMBED",
                "DECIPHER",
                "QUALTRICS",
                "TYPEFORM",
                "SURVEY MONKEY"
              ],
              "type": "string",
              "description": "Name of the channel in which the order was created"
            },
            "subtotal": {
              "type": "number",
              "format": "double",
              "example": 50,
              "minimum": 0,
              "description": "Total price of the order before fees (in USD)"
            }
          },
          "description": "Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards.\nNote that this property will only appear for processed orders (`status` is `EXECUTED`)."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date the order has been created"
        },
        "invoice_id": {
          "type": "string",
          "example": "2E59A82B-0001",
          "description": "The ID for the invoice associated with this order"
        },
        "campaign_id": {
          "type": "string",
          "example": "IVM0I3WNJJL0",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
        },
        "external_id": {
          "type": "string",
          "example": "Your-Individual-Identifier-for-This-Order",
          "nullable": true,
          "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
        }
      },
      "description": "An order wraps around the fulfilment of one or more rewards."
    }
  }
}
object OrdersCreateOrder202Response
{
  "type": "object",
  "required": [
    "order"
  ],
  "properties": {
    "order": {
      "type": "object",
      "required": [
        "id",
        "created_at",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "description": "Tremendous ID of the order"
        },
        "status": {
          "enum": [
            "CANCELED",
            "CART",
            "EXECUTED",
            "FAILED",
            "PENDING APPROVAL",
            "PENDING INTERNAL PAYMENT APPROVAL"
          ],
          "type": "string",
          "description": "Execution status of a given order\n\n<table>\n  <thead>\n    <tr>\n      <th>\n        Status\n      </th>\n      <th>\n        Description\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>\n        <code>\n          CANCELED\n        </code>\n      </td>\n      <td>\n        The order and all of its rewards were canceled.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          CART\n        </code>\n      </td>\n      <td>\n        The order has been created, but hasn't yet been processed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          EXECUTED\n        </code>\n      </td>\n      <td>\n        The order has been executed. Payment has been handled and rewards are being delivered (if applicable).\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          FAILED\n        </code>\n      </td>\n      <td>\n        The order could not be processed due to an error. E.g. due to insufficient funds in the account.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but needs approval to be executed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING INTERNAL PAYMENT APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but it is under review and requires approval from our team.\n      </td>\n    </tr>\n\n  </tbody>\n</table>\n"
        },
        "payment": {
          "type": "object",
          "properties": {
            "fees": {
              "type": "number",
              "format": "double",
              "example": 2.5,
              "minimum": 0,
              "description": "Fees for the order (in USD)"
            },
            "total": {
              "type": "number",
              "format": "double",
              "example": 52.5,
              "minimum": 0,
              "description": "Total price of the order including fees (in USD)"
            },
            "refund": {
              "type": "object",
              "required": [
                "total"
              ],
              "properties": {
                "total": {
                  "type": "number",
                  "format": "double",
                  "example": 52.5,
                  "minimum": 0,
                  "description": "Total amount of the order refunds (in USD)"
                }
              },
              "description": "Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards).\nNote that this property will only appear for canceled orders or orders with canceled rewards.\n"
            },
            "channel": {
              "enum": [
                "UI",
                "API",
                "EMBED",
                "DECIPHER",
                "QUALTRICS",
                "TYPEFORM",
                "SURVEY MONKEY"
              ],
              "type": "string",
              "description": "Name of the channel in which the order was created"
            },
            "subtotal": {
              "type": "number",
              "format": "double",
              "example": 50,
              "minimum": 0,
              "description": "Total price of the order before fees (in USD)"
            }
          },
          "description": "Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards.\nNote that this property will only appear for processed orders (`status` is `EXECUTED`)."
        },
        "rewards": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "SOMEIDSOMEID",
                "pattern": "[A-Z0-9]{4,20}",
                "description": "Tremendous ID of the reward"
              },
              "value": {
                "type": "object",
                "example": {
                  "denomination": 50,
                  "currency_code": "USD"
                },
                "required": [
                  "denomination",
                  "currency_code"
                ],
                "properties": {
                  "denomination": {
                    "type": "number",
                    "format": "double",
                    "description": "Amount of the reward"
                  },
                  "currency_code": {
                    "enum": [
                      "USD",
                      "CAD",
                      "EUR",
                      "AED",
                      "AFN",
                      "ALL",
                      "AMD",
                      "ARS",
                      "AUD",
                      "AZN",
                      "BAM",
                      "BDT",
                      "BGN",
                      "BHD",
                      "BIF",
                      "BND",
                      "BOB",
                      "BRL",
                      "BWP",
                      "BYR",
                      "BZD",
                      "CDF",
                      "CHF",
                      "CLP",
                      "CNY",
                      "COP",
                      "CRC",
                      "CVE",
                      "CZK",
                      "DJF",
                      "DKK",
                      "DOP",
                      "DZD",
                      "EEK",
                      "EGP",
                      "ERN",
                      "ETB",
                      "GBP",
                      "GEL",
                      "GHS",
                      "GNF",
                      "GTQ",
                      "HKD",
                      "HNL",
                      "HRK",
                      "HUF",
                      "IDR",
                      "ILS",
                      "INR",
                      "IQD",
                      "IRR",
                      "ISK",
                      "JMD",
                      "JOD",
                      "JPY",
                      "KES",
                      "KHR",
                      "KRW",
                      "KWD",
                      "KZT",
                      "LBP",
                      "LKR",
                      "LTL",
                      "LVL",
                      "MAD",
                      "MDL",
                      "MGA",
                      "MKD",
                      "MMK",
                      "MOP",
                      "MUR",
                      "MXN",
                      "MYR",
                      "MZN",
                      "NAD",
                      "NGN",
                      "NIO",
                      "NOK",
                      "NPR",
                      "NZD",
                      "OMR",
                      "PAB",
                      "PEN",
                      "PHP",
                      "PKR",
                      "PLN",
                      "PYG",
                      "QAR",
                      "RON",
                      "RSD",
                      "RUB",
                      "RWF",
                      "SAR",
                      "SDG",
                      "SEK",
                      "SGD",
                      "SOS",
                      "SYP",
                      "THB",
                      "TND",
                      "TOP",
                      "TRY",
                      "TTD",
                      "TWD",
                      "TZS",
                      "UAH",
                      "UGX",
                      "UYU",
                      "UZS",
                      "VEF",
                      "VND",
                      "XAF",
                      "XOF",
                      "YER",
                      "ZAR",
                      "ZMK"
                    ],
                    "type": "string",
                    "example": "USD",
                    "description": "Currency of the reward"
                  }
                }
              },
              "delivery": {
                "type": "object",
                "required": [
                  "method",
                  "status"
                ],
                "properties": {
                  "link": {
                    "type": "string",
                    "example": "https://testflight.tremendous.com/rewards/payout/z67jic92r",
                    "description": "Link to redeem the reward at. You need to deliver this link to the recipient.\n\nOnly available for rewards for which the `method` for delivery is set to `LINK`.\n"
                  },
                  "method": {
                    "enum": [
                      "EMAIL",
                      "LINK",
                      "PHONE"
                    ],
                    "type": "string",
                    "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
                  },
                  "status": {
                    "enum": [
                      "SCHEDULED",
                      "FAILED",
                      "SUCCEEDED",
                      "PENDING"
                    ],
                    "type": "string",
                    "description": "Current status of the delivery of the reward:\n\n* `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon.\n* `FAILED` - Delivery of reward failed (e.g. email bounced).\n* `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened).\n* `PENDING` - Delivery is pending but not yet scheduled.\n"
                  }
                },
                "description": "Details on how the reward is delivered to the recipient.\n"
              },
              "order_id": {
                "type": "string",
                "example": "SOMEIDSOMEID",
                "pattern": "[A-Z0-9]{4,20}",
                "description": "Tremendous ID of the order this reward is part of."
              },
              "recipient": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "John Doe Jr.",
                    "description": "Name of the recipient"
                  },
                  "email": {
                    "type": "string",
                    "example": "john.doe@example.com",
                    "description": "Email address of the recipient"
                  },
                  "phone": {
                    "type": "string",
                    "example": "123-456-7890",
                    "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
                  }
                },
                "description": "Details of the recipient of the reward"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Date the reward was created"
              },
              "deliver_at": {
                "type": "string",
                "format": "date",
                "example": "2023-12-31",
                "pattern": "YYYY-MM-DD",
                "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "SOMEIDSOMEID",
                      "pattern": "[A-Z0-9]{4,20}",
                      "description": "Tremendous ID of the custom field"
                    },
                    "label": {
                      "type": "string",
                      "example": "harry_potter_house",
                      "description": "Label of the custom field"
                    },
                    "value": {
                      "type": "string",
                      "example": "Hufflepuff",
                      "nullable": true,
                      "description": "Value of the custom field"
                    }
                  },
                  "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
                }
              }
            },
            "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
          },
          "minItems": 1
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date the order has been created"
        },
        "invoice_id": {
          "type": "string",
          "example": "2E59A82B-0001",
          "description": "The ID for the invoice associated with this order"
        },
        "campaign_id": {
          "type": "string",
          "example": "IVM0I3WNJJL0",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
        },
        "external_id": {
          "type": "string",
          "example": "Your-Individual-Identifier-for-This-Order",
          "nullable": true,
          "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
        }
      },
      "description": "An order wraps around the fulfilment of one or more rewards."
    }
  }
}
object OrdersCreateOrder400Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Order failed: validation failure",
      "payload": {
        "some_field": {
          "some_sub_field": "Something went wrong with this parameter"
        }
      }
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersCreateOrder401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersCreateOrder402Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersCreateOrder422Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Order failed: validation failure",
      "payload": {
        "some_field": {
          "some_sub_field": "Something went wrong with this parameter"
        }
      }
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersCreateOrder429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersCreateOrder500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersCreateOrderRequest
{
  "type": "object",
  "required": [
    "payment",
    "reward"
  ],
  "properties": {
    "reward": {
      "type": "object",
      "properties": {
        "value": {
          "type": "object",
          "example": {
            "denomination": 50,
            "currency_code": "USD"
          },
          "required": [
            "denomination",
            "currency_code"
          ],
          "properties": {
            "denomination": {
              "type": "number",
              "format": "double",
              "description": "Amount of the reward"
            },
            "currency_code": {
              "enum": [
                "USD",
                "CAD",
                "EUR",
                "AED",
                "AFN",
                "ALL",
                "AMD",
                "ARS",
                "AUD",
                "AZN",
                "BAM",
                "BDT",
                "BGN",
                "BHD",
                "BIF",
                "BND",
                "BOB",
                "BRL",
                "BWP",
                "BYR",
                "BZD",
                "CDF",
                "CHF",
                "CLP",
                "CNY",
                "COP",
                "CRC",
                "CVE",
                "CZK",
                "DJF",
                "DKK",
                "DOP",
                "DZD",
                "EEK",
                "EGP",
                "ERN",
                "ETB",
                "GBP",
                "GEL",
                "GHS",
                "GNF",
                "GTQ",
                "HKD",
                "HNL",
                "HRK",
                "HUF",
                "IDR",
                "ILS",
                "INR",
                "IQD",
                "IRR",
                "ISK",
                "JMD",
                "JOD",
                "JPY",
                "KES",
                "KHR",
                "KRW",
                "KWD",
                "KZT",
                "LBP",
                "LKR",
                "LTL",
                "LVL",
                "MAD",
                "MDL",
                "MGA",
                "MKD",
                "MMK",
                "MOP",
                "MUR",
                "MXN",
                "MYR",
                "MZN",
                "NAD",
                "NGN",
                "NIO",
                "NOK",
                "NPR",
                "NZD",
                "OMR",
                "PAB",
                "PEN",
                "PHP",
                "PKR",
                "PLN",
                "PYG",
                "QAR",
                "RON",
                "RSD",
                "RUB",
                "RWF",
                "SAR",
                "SDG",
                "SEK",
                "SGD",
                "SOS",
                "SYP",
                "THB",
                "TND",
                "TOP",
                "TRY",
                "TTD",
                "TWD",
                "TZS",
                "UAH",
                "UGX",
                "UYU",
                "UZS",
                "VEF",
                "VND",
                "XAF",
                "XOF",
                "YER",
                "ZAR",
                "ZMK"
              ],
              "type": "string",
              "example": "USD",
              "description": "Currency of the reward"
            }
          }
        },
        "delivery": {
          "type": "object",
          "properties": {
            "method": {
              "enum": [
                "EMAIL",
                "LINK",
                "PHONE"
              ],
              "type": "string",
              "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
            }
          },
          "description": "Details on how the reward is delivered to the recipient.\n"
        },
        "language": {
          "type": "string",
          "example": "de",
          "description": "Set this to translate the redemption experience for this reward. Pass a 2-letter [ISO-639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the desired language. Defaults to `en`.\n"
        },
        "products": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}"
          },
          "minItems": 1,
          "description": "List of IDs of product (different gift cards, charity, etc.) that will be available\nto the recipient to choose from.\n\nProviding a `products` array will override the products made available by the campaign\nspecified using the `campaign_id` property unless the `products` array is empty. It will\n_not_ override other campaign attributes, like the message and customization of the look and feel.\n"
        },
        "recipient": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "example": "John Doe Jr.",
              "description": "Name of the recipient"
            },
            "email": {
              "type": "string",
              "example": "john.doe@example.com",
              "description": "Email address of the recipient"
            },
            "phone": {
              "type": "string",
              "example": "123-456-7890",
              "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
            }
          },
          "description": "Details of the recipient of the reward"
        },
        "deliver_at": {
          "type": "string",
          "format": "date",
          "example": "2023-12-31",
          "pattern": "YYYY-MM-DD",
          "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
        },
        "campaign_id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
        },
        "custom_fields": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "SOMEIDSOMEID",
                "pattern": "[A-Z0-9]{4,20}",
                "description": "Tremendous ID of the custom field"
              },
              "label": {
                "type": "string",
                "example": "harry_potter_house",
                "description": "Label of the custom field"
              },
              "value": {
                "type": "string",
                "example": "Hufflepuff",
                "nullable": true,
                "description": "Value of the custom field"
              }
            },
            "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
          }
        }
      },
      "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
    },
    "payment": {
      "type": "object",
      "required": [
        "funding_source_id"
      ],
      "properties": {
        "funding_source_id": {
          "type": "string",
          "description": "Tremendous ID of the funding source that will be used to pay for the order. Use `balance` to use your Tremendous's balance."
        }
      }
    },
    "external_id": {
      "type": "string",
      "example": "Your-Individual-Identifier-for-This-Order",
      "nullable": true,
      "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
    }
  }
}
object OrdersCreateOrderResponse
{
  "type": "object",
  "required": [
    "order"
  ],
  "properties": {
    "order": {
      "type": "object",
      "required": [
        "id",
        "created_at",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "description": "Tremendous ID of the order"
        },
        "status": {
          "enum": [
            "CANCELED",
            "CART",
            "EXECUTED",
            "FAILED",
            "PENDING APPROVAL",
            "PENDING INTERNAL PAYMENT APPROVAL"
          ],
          "type": "string",
          "description": "Execution status of a given order\n\n<table>\n  <thead>\n    <tr>\n      <th>\n        Status\n      </th>\n      <th>\n        Description\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>\n        <code>\n          CANCELED\n        </code>\n      </td>\n      <td>\n        The order and all of its rewards were canceled.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          CART\n        </code>\n      </td>\n      <td>\n        The order has been created, but hasn't yet been processed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          EXECUTED\n        </code>\n      </td>\n      <td>\n        The order has been executed. Payment has been handled and rewards are being delivered (if applicable).\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          FAILED\n        </code>\n      </td>\n      <td>\n        The order could not be processed due to an error. E.g. due to insufficient funds in the account.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but needs approval to be executed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING INTERNAL PAYMENT APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but it is under review and requires approval from our team.\n      </td>\n    </tr>\n\n  </tbody>\n</table>\n"
        },
        "payment": {
          "type": "object",
          "properties": {
            "fees": {
              "type": "number",
              "format": "double",
              "example": 2.5,
              "minimum": 0,
              "description": "Fees for the order (in USD)"
            },
            "total": {
              "type": "number",
              "format": "double",
              "example": 52.5,
              "minimum": 0,
              "description": "Total price of the order including fees (in USD)"
            },
            "refund": {
              "type": "object",
              "required": [
                "total"
              ],
              "properties": {
                "total": {
                  "type": "number",
                  "format": "double",
                  "example": 52.5,
                  "minimum": 0,
                  "description": "Total amount of the order refunds (in USD)"
                }
              },
              "description": "Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards).\nNote that this property will only appear for canceled orders or orders with canceled rewards.\n"
            },
            "channel": {
              "enum": [
                "UI",
                "API",
                "EMBED",
                "DECIPHER",
                "QUALTRICS",
                "TYPEFORM",
                "SURVEY MONKEY"
              ],
              "type": "string",
              "description": "Name of the channel in which the order was created"
            },
            "subtotal": {
              "type": "number",
              "format": "double",
              "example": 50,
              "minimum": 0,
              "description": "Total price of the order before fees (in USD)"
            }
          },
          "description": "Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards.\nNote that this property will only appear for processed orders (`status` is `EXECUTED`)."
        },
        "rewards": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "SOMEIDSOMEID",
                "pattern": "[A-Z0-9]{4,20}",
                "description": "Tremendous ID of the reward"
              },
              "value": {
                "type": "object",
                "example": {
                  "denomination": 50,
                  "currency_code": "USD"
                },
                "required": [
                  "denomination",
                  "currency_code"
                ],
                "properties": {
                  "denomination": {
                    "type": "number",
                    "format": "double",
                    "description": "Amount of the reward"
                  },
                  "currency_code": {
                    "enum": [
                      "USD",
                      "CAD",
                      "EUR",
                      "AED",
                      "AFN",
                      "ALL",
                      "AMD",
                      "ARS",
                      "AUD",
                      "AZN",
                      "BAM",
                      "BDT",
                      "BGN",
                      "BHD",
                      "BIF",
                      "BND",
                      "BOB",
                      "BRL",
                      "BWP",
                      "BYR",
                      "BZD",
                      "CDF",
                      "CHF",
                      "CLP",
                      "CNY",
                      "COP",
                      "CRC",
                      "CVE",
                      "CZK",
                      "DJF",
                      "DKK",
                      "DOP",
                      "DZD",
                      "EEK",
                      "EGP",
                      "ERN",
                      "ETB",
                      "GBP",
                      "GEL",
                      "GHS",
                      "GNF",
                      "GTQ",
                      "HKD",
                      "HNL",
                      "HRK",
                      "HUF",
                      "IDR",
                      "ILS",
                      "INR",
                      "IQD",
                      "IRR",
                      "ISK",
                      "JMD",
                      "JOD",
                      "JPY",
                      "KES",
                      "KHR",
                      "KRW",
                      "KWD",
                      "KZT",
                      "LBP",
                      "LKR",
                      "LTL",
                      "LVL",
                      "MAD",
                      "MDL",
                      "MGA",
                      "MKD",
                      "MMK",
                      "MOP",
                      "MUR",
                      "MXN",
                      "MYR",
                      "MZN",
                      "NAD",
                      "NGN",
                      "NIO",
                      "NOK",
                      "NPR",
                      "NZD",
                      "OMR",
                      "PAB",
                      "PEN",
                      "PHP",
                      "PKR",
                      "PLN",
                      "PYG",
                      "QAR",
                      "RON",
                      "RSD",
                      "RUB",
                      "RWF",
                      "SAR",
                      "SDG",
                      "SEK",
                      "SGD",
                      "SOS",
                      "SYP",
                      "THB",
                      "TND",
                      "TOP",
                      "TRY",
                      "TTD",
                      "TWD",
                      "TZS",
                      "UAH",
                      "UGX",
                      "UYU",
                      "UZS",
                      "VEF",
                      "VND",
                      "XAF",
                      "XOF",
                      "YER",
                      "ZAR",
                      "ZMK"
                    ],
                    "type": "string",
                    "example": "USD",
                    "description": "Currency of the reward"
                  }
                }
              },
              "delivery": {
                "type": "object",
                "required": [
                  "method",
                  "status"
                ],
                "properties": {
                  "link": {
                    "type": "string",
                    "example": "https://testflight.tremendous.com/rewards/payout/z67jic92r",
                    "description": "Link to redeem the reward at. You need to deliver this link to the recipient.\n\nOnly available for rewards for which the `method` for delivery is set to `LINK`.\n"
                  },
                  "method": {
                    "enum": [
                      "EMAIL",
                      "LINK",
                      "PHONE"
                    ],
                    "type": "string",
                    "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
                  },
                  "status": {
                    "enum": [
                      "SCHEDULED",
                      "FAILED",
                      "SUCCEEDED",
                      "PENDING"
                    ],
                    "type": "string",
                    "description": "Current status of the delivery of the reward:\n\n* `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon.\n* `FAILED` - Delivery of reward failed (e.g. email bounced).\n* `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened).\n* `PENDING` - Delivery is pending but not yet scheduled.\n"
                  }
                },
                "description": "Details on how the reward is delivered to the recipient.\n"
              },
              "order_id": {
                "type": "string",
                "example": "SOMEIDSOMEID",
                "pattern": "[A-Z0-9]{4,20}",
                "description": "Tremendous ID of the order this reward is part of."
              },
              "recipient": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "John Doe Jr.",
                    "description": "Name of the recipient"
                  },
                  "email": {
                    "type": "string",
                    "example": "john.doe@example.com",
                    "description": "Email address of the recipient"
                  },
                  "phone": {
                    "type": "string",
                    "example": "123-456-7890",
                    "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
                  }
                },
                "description": "Details of the recipient of the reward"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Date the reward was created"
              },
              "deliver_at": {
                "type": "string",
                "format": "date",
                "example": "2023-12-31",
                "pattern": "YYYY-MM-DD",
                "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "SOMEIDSOMEID",
                      "pattern": "[A-Z0-9]{4,20}",
                      "description": "Tremendous ID of the custom field"
                    },
                    "label": {
                      "type": "string",
                      "example": "harry_potter_house",
                      "description": "Label of the custom field"
                    },
                    "value": {
                      "type": "string",
                      "example": "Hufflepuff",
                      "nullable": true,
                      "description": "Value of the custom field"
                    }
                  },
                  "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
                }
              }
            },
            "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
          },
          "minItems": 1
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date the order has been created"
        },
        "invoice_id": {
          "type": "string",
          "example": "2E59A82B-0001",
          "description": "The ID for the invoice associated with this order"
        },
        "campaign_id": {
          "type": "string",
          "example": "IVM0I3WNJJL0",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
        },
        "external_id": {
          "type": "string",
          "example": "Your-Individual-Identifier-for-This-Order",
          "nullable": true,
          "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
        }
      },
      "description": "An order wraps around the fulfilment of one or more rewards."
    }
  }
}
object OrdersGetList401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersGetList429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersGetList500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersGetListResponse
{
  "type": "object",
  "required": [
    "orders",
    "total_count"
  ],
  "properties": {
    "orders": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "created_at",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}",
            "description": "Tremendous ID of the order"
          },
          "reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "SOMEIDSOMEID",
                "pattern": "[A-Z0-9]{4,20}",
                "description": "Tremendous ID of the reward"
              },
              "value": {
                "type": "object",
                "example": {
                  "denomination": 50,
                  "currency_code": "USD"
                },
                "required": [
                  "denomination",
                  "currency_code"
                ],
                "properties": {
                  "denomination": {
                    "type": "number",
                    "format": "double",
                    "description": "Amount of the reward"
                  },
                  "currency_code": {
                    "enum": [
                      "USD",
                      "CAD",
                      "EUR",
                      "AED",
                      "AFN",
                      "ALL",
                      "AMD",
                      "ARS",
                      "AUD",
                      "AZN",
                      "BAM",
                      "BDT",
                      "BGN",
                      "BHD",
                      "BIF",
                      "BND",
                      "BOB",
                      "BRL",
                      "BWP",
                      "BYR",
                      "BZD",
                      "CDF",
                      "CHF",
                      "CLP",
                      "CNY",
                      "COP",
                      "CRC",
                      "CVE",
                      "CZK",
                      "DJF",
                      "DKK",
                      "DOP",
                      "DZD",
                      "EEK",
                      "EGP",
                      "ERN",
                      "ETB",
                      "GBP",
                      "GEL",
                      "GHS",
                      "GNF",
                      "GTQ",
                      "HKD",
                      "HNL",
                      "HRK",
                      "HUF",
                      "IDR",
                      "ILS",
                      "INR",
                      "IQD",
                      "IRR",
                      "ISK",
                      "JMD",
                      "JOD",
                      "JPY",
                      "KES",
                      "KHR",
                      "KRW",
                      "KWD",
                      "KZT",
                      "LBP",
                      "LKR",
                      "LTL",
                      "LVL",
                      "MAD",
                      "MDL",
                      "MGA",
                      "MKD",
                      "MMK",
                      "MOP",
                      "MUR",
                      "MXN",
                      "MYR",
                      "MZN",
                      "NAD",
                      "NGN",
                      "NIO",
                      "NOK",
                      "NPR",
                      "NZD",
                      "OMR",
                      "PAB",
                      "PEN",
                      "PHP",
                      "PKR",
                      "PLN",
                      "PYG",
                      "QAR",
                      "RON",
                      "RSD",
                      "RUB",
                      "RWF",
                      "SAR",
                      "SDG",
                      "SEK",
                      "SGD",
                      "SOS",
                      "SYP",
                      "THB",
                      "TND",
                      "TOP",
                      "TRY",
                      "TTD",
                      "TWD",
                      "TZS",
                      "UAH",
                      "UGX",
                      "UYU",
                      "UZS",
                      "VEF",
                      "VND",
                      "XAF",
                      "XOF",
                      "YER",
                      "ZAR",
                      "ZMK"
                    ],
                    "type": "string",
                    "example": "USD",
                    "description": "Currency of the reward"
                  }
                }
              },
              "delivery": {
                "type": "object",
                "required": [
                  "method",
                  "status"
                ],
                "properties": {
                  "method": {
                    "enum": [
                      "EMAIL",
                      "LINK",
                      "PHONE"
                    ],
                    "type": "string",
                    "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
                  },
                  "status": {
                    "enum": [
                      "SCHEDULED",
                      "FAILED",
                      "SUCCEEDED",
                      "PENDING"
                    ],
                    "type": "string",
                    "description": "Current status of the delivery of the reward:\n\n* `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon.\n* `FAILED` - Delivery of reward failed (e.g. email bounced).\n* `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened).\n* `PENDING` - Delivery is pending but not yet scheduled.\n"
                  }
                },
                "description": "Details on how the reward is delivered to the recipient.\n"
              },
              "order_id": {
                "type": "string",
                "example": "SOMEIDSOMEID",
                "pattern": "[A-Z0-9]{4,20}",
                "description": "Tremendous ID of the order this reward is part of."
              },
              "recipient": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "John Doe Jr.",
                    "description": "Name of the recipient"
                  },
                  "email": {
                    "type": "string",
                    "example": "john.doe@example.com",
                    "description": "Email address of the recipient"
                  },
                  "phone": {
                    "type": "string",
                    "example": "123-456-7890",
                    "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
                  }
                },
                "description": "Details of the recipient of the reward"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Date the reward was created"
              },
              "deliver_at": {
                "type": "string",
                "format": "date",
                "example": "2023-12-31",
                "pattern": "YYYY-MM-DD",
                "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
              },
              "custom_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "SOMEIDSOMEID",
                      "pattern": "[A-Z0-9]{4,20}",
                      "description": "Tremendous ID of the custom field"
                    },
                    "label": {
                      "type": "string",
                      "example": "harry_potter_house",
                      "description": "Label of the custom field"
                    },
                    "value": {
                      "type": "string",
                      "example": "Hufflepuff",
                      "nullable": true,
                      "description": "Value of the custom field"
                    }
                  },
                  "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
                }
              }
            },
            "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
          },
          "status": {
            "enum": [
              "CANCELED",
              "CART",
              "EXECUTED",
              "FAILED",
              "PENDING APPROVAL",
              "PENDING INTERNAL PAYMENT APPROVAL"
            ],
            "type": "string",
            "description": "Execution status of a given order\n\n<table>\n  <thead>\n    <tr>\n      <th>\n        Status\n      </th>\n      <th>\n        Description\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>\n        <code>\n          CANCELED\n        </code>\n      </td>\n      <td>\n        The order and all of its rewards were canceled.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          CART\n        </code>\n      </td>\n      <td>\n        The order has been created, but hasn't yet been processed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          EXECUTED\n        </code>\n      </td>\n      <td>\n        The order has been executed. Payment has been handled and rewards are being delivered (if applicable).\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          FAILED\n        </code>\n      </td>\n      <td>\n        The order could not be processed due to an error. E.g. due to insufficient funds in the account.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but needs approval to be executed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING INTERNAL PAYMENT APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but it is under review and requires approval from our team.\n      </td>\n    </tr>\n\n  </tbody>\n</table>\n"
          },
          "payment": {
            "type": "object",
            "properties": {
              "fees": {
                "type": "number",
                "format": "double",
                "example": 2.5,
                "minimum": 0,
                "description": "Fees for the order (in USD)"
              },
              "total": {
                "type": "number",
                "format": "double",
                "example": 52.5,
                "minimum": 0,
                "description": "Total price of the order including fees (in USD)"
              },
              "refund": {
                "type": "object",
                "required": [
                  "total"
                ],
                "properties": {
                  "total": {
                    "type": "number",
                    "format": "double",
                    "example": 52.5,
                    "minimum": 0,
                    "description": "Total amount of the order refunds (in USD)"
                  }
                },
                "description": "Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards).\nNote that this property will only appear for canceled orders or orders with canceled rewards.\n"
              },
              "channel": {
                "enum": [
                  "UI",
                  "API",
                  "EMBED",
                  "DECIPHER",
                  "QUALTRICS",
                  "TYPEFORM",
                  "SURVEY MONKEY"
                ],
                "type": "string",
                "description": "Name of the channel in which the order was created"
              },
              "subtotal": {
                "type": "number",
                "format": "double",
                "example": 50,
                "minimum": 0,
                "description": "Total price of the order before fees (in USD)"
              }
            },
            "description": "Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards.\nNote that this property will only appear for processed orders (`status` is `EXECUTED`)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date the order has been created"
          },
          "invoice_id": {
            "type": "string",
            "example": "2E59A82B-0001",
            "description": "The ID for the invoice associated with this order"
          },
          "campaign_id": {
            "type": "string",
            "example": "IVM0I3WNJJL0",
            "pattern": "[A-Z0-9]{4,20}",
            "nullable": true,
            "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
          },
          "external_id": {
            "type": "string",
            "example": "Your-Individual-Identifier-for-This-Order",
            "nullable": true,
            "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
          }
        },
        "description": "An order wraps around the fulfilment of one or more rewards."
      }
    },
    "total_count": {
      "type": "integer",
      "example": 1,
      "description": "The total number of orders across all pages"
    }
  }
}
object OrdersGetOrderById401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersGetOrderById404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersGetOrderById429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersGetOrderById500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersGetOrderByIdResponse
{
  "type": "object",
  "required": [
    "order"
  ],
  "properties": {
    "order": {
      "type": "object",
      "required": [
        "id",
        "created_at",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "description": "Tremendous ID of the order"
        },
        "reward": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the reward"
            },
            "value": {
              "type": "object",
              "example": {
                "denomination": 50,
                "currency_code": "USD"
              },
              "required": [
                "denomination",
                "currency_code"
              ],
              "properties": {
                "denomination": {
                  "type": "number",
                  "format": "double",
                  "description": "Amount of the reward"
                },
                "currency_code": {
                  "enum": [
                    "USD",
                    "CAD",
                    "EUR",
                    "AED",
                    "AFN",
                    "ALL",
                    "AMD",
                    "ARS",
                    "AUD",
                    "AZN",
                    "BAM",
                    "BDT",
                    "BGN",
                    "BHD",
                    "BIF",
                    "BND",
                    "BOB",
                    "BRL",
                    "BWP",
                    "BYR",
                    "BZD",
                    "CDF",
                    "CHF",
                    "CLP",
                    "CNY",
                    "COP",
                    "CRC",
                    "CVE",
                    "CZK",
                    "DJF",
                    "DKK",
                    "DOP",
                    "DZD",
                    "EEK",
                    "EGP",
                    "ERN",
                    "ETB",
                    "GBP",
                    "GEL",
                    "GHS",
                    "GNF",
                    "GTQ",
                    "HKD",
                    "HNL",
                    "HRK",
                    "HUF",
                    "IDR",
                    "ILS",
                    "INR",
                    "IQD",
                    "IRR",
                    "ISK",
                    "JMD",
                    "JOD",
                    "JPY",
                    "KES",
                    "KHR",
                    "KRW",
                    "KWD",
                    "KZT",
                    "LBP",
                    "LKR",
                    "LTL",
                    "LVL",
                    "MAD",
                    "MDL",
                    "MGA",
                    "MKD",
                    "MMK",
                    "MOP",
                    "MUR",
                    "MXN",
                    "MYR",
                    "MZN",
                    "NAD",
                    "NGN",
                    "NIO",
                    "NOK",
                    "NPR",
                    "NZD",
                    "OMR",
                    "PAB",
                    "PEN",
                    "PHP",
                    "PKR",
                    "PLN",
                    "PYG",
                    "QAR",
                    "RON",
                    "RSD",
                    "RUB",
                    "RWF",
                    "SAR",
                    "SDG",
                    "SEK",
                    "SGD",
                    "SOS",
                    "SYP",
                    "THB",
                    "TND",
                    "TOP",
                    "TRY",
                    "TTD",
                    "TWD",
                    "TZS",
                    "UAH",
                    "UGX",
                    "UYU",
                    "UZS",
                    "VEF",
                    "VND",
                    "XAF",
                    "XOF",
                    "YER",
                    "ZAR",
                    "ZMK"
                  ],
                  "type": "string",
                  "example": "USD",
                  "description": "Currency of the reward"
                }
              }
            },
            "delivery": {
              "type": "object",
              "required": [
                "method",
                "status"
              ],
              "properties": {
                "method": {
                  "enum": [
                    "EMAIL",
                    "LINK",
                    "PHONE"
                  ],
                  "type": "string",
                  "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
                },
                "status": {
                  "enum": [
                    "SCHEDULED",
                    "FAILED",
                    "SUCCEEDED",
                    "PENDING"
                  ],
                  "type": "string",
                  "description": "Current status of the delivery of the reward:\n\n* `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon.\n* `FAILED` - Delivery of reward failed (e.g. email bounced).\n* `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened).\n* `PENDING` - Delivery is pending but not yet scheduled.\n"
                }
              },
              "description": "Details on how the reward is delivered to the recipient.\n"
            },
            "order_id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the order this reward is part of."
            },
            "recipient": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "John Doe Jr.",
                  "description": "Name of the recipient"
                },
                "email": {
                  "type": "string",
                  "example": "john.doe@example.com",
                  "description": "Email address of the recipient"
                },
                "phone": {
                  "type": "string",
                  "example": "123-456-7890",
                  "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
                }
              },
              "description": "Details of the recipient of the reward"
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Date the reward was created"
            },
            "deliver_at": {
              "type": "string",
              "format": "date",
              "example": "2023-12-31",
              "pattern": "YYYY-MM-DD",
              "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
            },
            "custom_fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "SOMEIDSOMEID",
                    "pattern": "[A-Z0-9]{4,20}",
                    "description": "Tremendous ID of the custom field"
                  },
                  "label": {
                    "type": "string",
                    "example": "harry_potter_house",
                    "description": "Label of the custom field"
                  },
                  "value": {
                    "type": "string",
                    "example": "Hufflepuff",
                    "nullable": true,
                    "description": "Value of the custom field"
                  }
                },
                "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
              }
            }
          },
          "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
        },
        "status": {
          "enum": [
            "CANCELED",
            "CART",
            "EXECUTED",
            "FAILED",
            "PENDING APPROVAL",
            "PENDING INTERNAL PAYMENT APPROVAL"
          ],
          "type": "string",
          "description": "Execution status of a given order\n\n<table>\n  <thead>\n    <tr>\n      <th>\n        Status\n      </th>\n      <th>\n        Description\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>\n        <code>\n          CANCELED\n        </code>\n      </td>\n      <td>\n        The order and all of its rewards were canceled.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          CART\n        </code>\n      </td>\n      <td>\n        The order has been created, but hasn't yet been processed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          EXECUTED\n        </code>\n      </td>\n      <td>\n        The order has been executed. Payment has been handled and rewards are being delivered (if applicable).\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          FAILED\n        </code>\n      </td>\n      <td>\n        The order could not be processed due to an error. E.g. due to insufficient funds in the account.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but needs approval to be executed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING INTERNAL PAYMENT APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but it is under review and requires approval from our team.\n      </td>\n    </tr>\n\n  </tbody>\n</table>\n"
        },
        "payment": {
          "type": "object",
          "properties": {
            "fees": {
              "type": "number",
              "format": "double",
              "example": 2.5,
              "minimum": 0,
              "description": "Fees for the order (in USD)"
            },
            "total": {
              "type": "number",
              "format": "double",
              "example": 52.5,
              "minimum": 0,
              "description": "Total price of the order including fees (in USD)"
            },
            "refund": {
              "type": "object",
              "required": [
                "total"
              ],
              "properties": {
                "total": {
                  "type": "number",
                  "format": "double",
                  "example": 52.5,
                  "minimum": 0,
                  "description": "Total amount of the order refunds (in USD)"
                }
              },
              "description": "Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards).\nNote that this property will only appear for canceled orders or orders with canceled rewards.\n"
            },
            "channel": {
              "enum": [
                "UI",
                "API",
                "EMBED",
                "DECIPHER",
                "QUALTRICS",
                "TYPEFORM",
                "SURVEY MONKEY"
              ],
              "type": "string",
              "description": "Name of the channel in which the order was created"
            },
            "subtotal": {
              "type": "number",
              "format": "double",
              "example": 50,
              "minimum": 0,
              "description": "Total price of the order before fees (in USD)"
            }
          },
          "description": "Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards.\nNote that this property will only appear for processed orders (`status` is `EXECUTED`)."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date the order has been created"
        },
        "invoice_id": {
          "type": "string",
          "example": "2E59A82B-0001",
          "description": "The ID for the invoice associated with this order"
        },
        "campaign_id": {
          "type": "string",
          "example": "IVM0I3WNJJL0",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
        },
        "external_id": {
          "type": "string",
          "example": "Your-Individual-Identifier-for-This-Order",
          "nullable": true,
          "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
        }
      },
      "description": "An order wraps around the fulfilment of one or more rewards."
    }
  }
}
object OrdersRejectById401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersRejectById403Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Unsupported operation for this reward.",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersRejectById404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersRejectById422Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Order failed: validation failure",
      "payload": {
        "some_field": {
          "some_sub_field": "Something went wrong with this parameter"
        }
      }
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersRejectById429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersRejectById500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrdersRejectByIdResponse
{
  "type": "object",
  "required": [
    "order"
  ],
  "properties": {
    "order": {
      "type": "object",
      "required": [
        "id",
        "created_at",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "description": "Tremendous ID of the order"
        },
        "reward": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the reward"
            },
            "value": {
              "type": "object",
              "example": {
                "denomination": 50,
                "currency_code": "USD"
              },
              "required": [
                "denomination",
                "currency_code"
              ],
              "properties": {
                "denomination": {
                  "type": "number",
                  "format": "double",
                  "description": "Amount of the reward"
                },
                "currency_code": {
                  "enum": [
                    "USD",
                    "CAD",
                    "EUR",
                    "AED",
                    "AFN",
                    "ALL",
                    "AMD",
                    "ARS",
                    "AUD",
                    "AZN",
                    "BAM",
                    "BDT",
                    "BGN",
                    "BHD",
                    "BIF",
                    "BND",
                    "BOB",
                    "BRL",
                    "BWP",
                    "BYR",
                    "BZD",
                    "CDF",
                    "CHF",
                    "CLP",
                    "CNY",
                    "COP",
                    "CRC",
                    "CVE",
                    "CZK",
                    "DJF",
                    "DKK",
                    "DOP",
                    "DZD",
                    "EEK",
                    "EGP",
                    "ERN",
                    "ETB",
                    "GBP",
                    "GEL",
                    "GHS",
                    "GNF",
                    "GTQ",
                    "HKD",
                    "HNL",
                    "HRK",
                    "HUF",
                    "IDR",
                    "ILS",
                    "INR",
                    "IQD",
                    "IRR",
                    "ISK",
                    "JMD",
                    "JOD",
                    "JPY",
                    "KES",
                    "KHR",
                    "KRW",
                    "KWD",
                    "KZT",
                    "LBP",
                    "LKR",
                    "LTL",
                    "LVL",
                    "MAD",
                    "MDL",
                    "MGA",
                    "MKD",
                    "MMK",
                    "MOP",
                    "MUR",
                    "MXN",
                    "MYR",
                    "MZN",
                    "NAD",
                    "NGN",
                    "NIO",
                    "NOK",
                    "NPR",
                    "NZD",
                    "OMR",
                    "PAB",
                    "PEN",
                    "PHP",
                    "PKR",
                    "PLN",
                    "PYG",
                    "QAR",
                    "RON",
                    "RSD",
                    "RUB",
                    "RWF",
                    "SAR",
                    "SDG",
                    "SEK",
                    "SGD",
                    "SOS",
                    "SYP",
                    "THB",
                    "TND",
                    "TOP",
                    "TRY",
                    "TTD",
                    "TWD",
                    "TZS",
                    "UAH",
                    "UGX",
                    "UYU",
                    "UZS",
                    "VEF",
                    "VND",
                    "XAF",
                    "XOF",
                    "YER",
                    "ZAR",
                    "ZMK"
                  ],
                  "type": "string",
                  "example": "USD",
                  "description": "Currency of the reward"
                }
              }
            },
            "delivery": {
              "type": "object",
              "required": [
                "method",
                "status"
              ],
              "properties": {
                "method": {
                  "enum": [
                    "EMAIL",
                    "LINK",
                    "PHONE"
                  ],
                  "type": "string",
                  "description": "How to deliver the reward to the recipient.\n\n<table>\n  <thead>\n    <tr>\n      <th>Delivery Method</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>EMAIL</code></td>\n      <td>Deliver the reward to the recipient by email</td>\n    </tr>\n    <tr>\n      <td><code>LINK</code></td>\n      <td>\n        <p>Deliver the reward to the recipient via a link.</p>\n        <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be  delivered to the recipient out-of-band.</p>\n      </td>\n    </tr>\n    <tr>\n      <td><code>PHONE</code></td>\n      <td>Deliver the reward to the recipient by SMS</td>\n    </tr>\n  </tbody>\n</table>\n"
                },
                "status": {
                  "enum": [
                    "SCHEDULED",
                    "FAILED",
                    "SUCCEEDED",
                    "PENDING"
                  ],
                  "type": "string",
                  "description": "Current status of the delivery of the reward:\n\n* `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon.\n* `FAILED` - Delivery of reward failed (e.g. email bounced).\n* `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened).\n* `PENDING` - Delivery is pending but not yet scheduled.\n"
                }
              },
              "description": "Details on how the reward is delivered to the recipient.\n"
            },
            "order_id": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "description": "Tremendous ID of the order this reward is part of."
            },
            "recipient": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "John Doe Jr.",
                  "description": "Name of the recipient"
                },
                "email": {
                  "type": "string",
                  "example": "john.doe@example.com",
                  "description": "Email address of the recipient"
                },
                "phone": {
                  "type": "string",
                  "example": "123-456-7890",
                  "description": "Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +)."
                }
              },
              "description": "Details of the recipient of the reward"
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Date the reward was created"
            },
            "deliver_at": {
              "type": "string",
              "format": "date",
              "example": "2023-12-31",
              "pattern": "YYYY-MM-DD",
              "description": "Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored."
            },
            "custom_fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "SOMEIDSOMEID",
                    "pattern": "[A-Z0-9]{4,20}",
                    "description": "Tremendous ID of the custom field"
                  },
                  "label": {
                    "type": "string",
                    "example": "harry_potter_house",
                    "description": "Label of the custom field"
                  },
                  "value": {
                    "type": "string",
                    "example": "Hufflepuff",
                    "nullable": true,
                    "description": "Value of the custom field"
                  }
                },
                "description": "Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).)"
              }
            }
          },
          "description": "A single reward, sent to a recipient. A reward is always part of an order.\n\nEither `products` or `campaign_id` must be specified.\n"
        },
        "status": {
          "enum": [
            "CANCELED",
            "CART",
            "EXECUTED",
            "FAILED",
            "PENDING APPROVAL",
            "PENDING INTERNAL PAYMENT APPROVAL"
          ],
          "type": "string",
          "description": "Execution status of a given order\n\n<table>\n  <thead>\n    <tr>\n      <th>\n        Status\n      </th>\n      <th>\n        Description\n      </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>\n        <code>\n          CANCELED\n        </code>\n      </td>\n      <td>\n        The order and all of its rewards were canceled.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          CART\n        </code>\n      </td>\n      <td>\n        The order has been created, but hasn't yet been processed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          EXECUTED\n        </code>\n      </td>\n      <td>\n        The order has been executed. Payment has been handled and rewards are being delivered (if applicable).\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          FAILED\n        </code>\n      </td>\n      <td>\n        The order could not be processed due to an error. E.g. due to insufficient funds in the account.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but needs approval to be executed.\n      </td>\n    </tr>\n    <tr>\n      <td>\n        <code>\n          PENDING INTERNAL PAYMENT APPROVAL\n        </code>\n      </td>\n      <td>\n        The order has been created but it is under review and requires approval from our team.\n      </td>\n    </tr>\n\n  </tbody>\n</table>\n"
        },
        "payment": {
          "type": "object",
          "properties": {
            "fees": {
              "type": "number",
              "format": "double",
              "example": 2.5,
              "minimum": 0,
              "description": "Fees for the order (in USD)"
            },
            "total": {
              "type": "number",
              "format": "double",
              "example": 52.5,
              "minimum": 0,
              "description": "Total price of the order including fees (in USD)"
            },
            "refund": {
              "type": "object",
              "required": [
                "total"
              ],
              "properties": {
                "total": {
                  "type": "number",
                  "format": "double",
                  "example": 52.5,
                  "minimum": 0,
                  "description": "Total amount of the order refunds (in USD)"
                }
              },
              "description": "Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards).\nNote that this property will only appear for canceled orders or orders with canceled rewards.\n"
            },
            "channel": {
              "enum": [
                "UI",
                "API",
                "EMBED",
                "DECIPHER",
                "QUALTRICS",
                "TYPEFORM",
                "SURVEY MONKEY"
              ],
              "type": "string",
              "description": "Name of the channel in which the order was created"
            },
            "subtotal": {
              "type": "number",
              "format": "double",
              "example": 50,
              "minimum": 0,
              "description": "Total price of the order before fees (in USD)"
            }
          },
          "description": "Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards.\nNote that this property will only appear for processed orders (`status` is `EXECUTED`)."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date the order has been created"
        },
        "invoice_id": {
          "type": "string",
          "example": "2E59A82B-0001",
          "description": "The ID for the invoice associated with this order"
        },
        "campaign_id": {
          "type": "string",
          "example": "IVM0I3WNJJL0",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "description": "ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.)\nthat the recipient can choose from.\n"
        },
        "external_id": {
          "type": "string",
          "example": "Your-Individual-Identifier-for-This-Order",
          "nullable": true,
          "description": "Reference for this order, supplied by the customer.\n\nWhen set, `external_id` makes order idempotent. All requests that use the same `external_id`\nafter the initial order creation, will result in a response that returns the data of the\ninitially created order. The response will have a `201` response code. These responses\n**fail** to create any further orders.\n\nIt also allows for retrieving by `external_id` instead of `id` only.\n"
        }
      },
      "description": "An order wraps around the fulfilment of one or more rewards."
    }
  }
}
object Organization
{
  "type": "object",
  "required": [
    "name",
    "website"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "example": "ACME Inc.",
      "description": "Name of the organization"
    },
    "status": {
      "enum": [
        "PENDING",
        "APPROVED",
        "REJECTED"
      ],
      "type": "string",
      "example": "APPROVED",
      "readOnly": true,
      "description": "Status of the organization. Organizations need to be approved to be able to use them to send out rewards."
    },
    "website": {
      "type": "string",
      "format": "uri",
      "example": "https://www.example.com/some-org",
      "description": "URL of the website of that organization"
    },
    "created_at": {
      "type": "string",
      "format": "date",
      "example": "2021-08-02",
      "readOnly": true,
      "description": "Timestamp of when the organization has been created.\n\n*This field is only returned when creating an organization.* It is not returned anymore when retrieving or listing organizations.\n"
    }
  },
  "description": "Organizations are a way to separate different parts of your business within the same Tremendous account.\nYour root Tremendous account is an organization itself and can have multiple sub-organizations.\n\nYou can assign users in your Tremendous team as members to any organization. Users can be members of multiple\norganizations at once.\n\nEach organizations can have it's own API key.\n"
}
object OrganizationsCreateApiKey401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateApiKey404Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateApiKey429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateApiKey500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateApiKeyResponse
{
  "type": "object",
  "properties": {
    "api_key": {
      "type": "string",
      "example": "TEST_02feed72c2f6ab8dadc7f6156d1106828aabf81e5c4d38ea94d62817717ea261",
      "description": "The new API key"
    }
  }
}
object OrganizationsCreateNewOrganization400Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Order failed: validation failure",
      "payload": {
        "some_field": {
          "some_sub_field": "Something went wrong with this parameter"
        }
      }
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateNewOrganization401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateNewOrganization429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateNewOrganization500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsCreateNewOrganizationRequest
{
  "type": "object",
  "required": [
    "name",
    "website"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "ACME Inc.",
      "description": "Name of the organization"
    },
    "phone": {
      "type": "string",
      "example": "123-456-7890",
      "description": "Phone number of the organization. For non-US phone numbers, specify the country code (prefixed with +)."
    },
    "website": {
      "type": "string",
      "format": "uri",
      "example": "https://www.example.com/some-org",
      "description": "URL of the website of that organization"
    },
    "with_api_key": {
      "type": "boolean",
      "example": true,
      "description": "Default value is `false`. Set to true to also generate an API key associated to the new organization."
    },
    "copy_settings": {
      "type": "object",
      "properties": {
        "users": {
          "type": "boolean",
          "default": false,
          "example": false,
          "description": "Copy over the users from the current organization to the new organization. Defaults to `false`."
        },
        "campaigns": {
          "type": "boolean",
          "default": false,
          "example": false,
          "description": "Copy over the campaigns from the current organization to the new organization. Defaults to `false`."
        },
        "custom_fields": {
          "type": "boolean",
          "default": false,
          "example": false,
          "description": "Copy over the custom fields from the current organization to the new organization. Defaults to `false`."
        },
        "order_approvals": {
          "type": "boolean",
          "default": false,
          "example": false,
          "description": "Copy over the order approvals settings from the current organization to the new organization. Defaults to `false`."
        },
        "payment_methods": {
          "type": "boolean",
          "default": false,
          "example": false,
          "description": "Copy over the payment methods from the current organization to the new organization. Defaults to `false`."
        },
        "fraud_prevention": {
          "type": "boolean",
          "default": false,
          "example": false,
          "description": "Copy over the fraud prevention settings and rules from the current organization to the new organization. Defaults to `false`."
        },
        "security_settings": {
          "type": "boolean",
          "default": true,
          "example": true,
          "description": "Copy over the security settings from the current organization to the new organization. Defaults to `true`."
        }
      },
      "description": "A list of the settings that you wish to copy over to the new organization."
    }
  }
}
object OrganizationsCreateNewOrganizationResponse
{
  "type": "object",
  "properties": {
    "organization": {
      "type": "object",
      "required": [
        "name",
        "website"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}"
        },
        "name": {
          "type": "string",
          "example": "ACME Inc.",
          "description": "Name of the organization"
        },
        "status": {
          "enum": [
            "PENDING",
            "APPROVED",
            "REJECTED"
          ],
          "type": "string",
          "example": "APPROVED",
          "description": "Status of the organization. Organizations need to be approved to be able to use them to send out rewards."
        },
        "api_key": {
          "type": "string",
          "description": "The API key for the created organization.\nThis property is only returned when `with_api_key` is set to `true`.\n"
        },
        "website": {
          "type": "string",
          "format": "uri",
          "example": "https://www.example.com/some-org",
          "description": "URL of the website of that organization"
        },
        "created_at": {
          "type": "string",
          "format": "date",
          "example": "2021-08-02",
          "description": "Timestamp of when the organization has been created.\n\n*This field is only returned when creating an organization.* It is not returned anymore when retrieving or listing organizations.\n"
        }
      },
      "description": "Organizations are a way to separate different parts of your business within the same Tremendous account.\nYour root Tremendous account is an organization itself and can have multiple sub-organizations.\n\nYou can assign users in your Tremendous team as members to any organization. Users can be members of multiple\norganizations at once.\n\nEach organizations can have it's own API key.\n"
    }
  }
}
object OrganizationsGetList401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsGetList429Response
{
  "type": "object",
  "example": {
    "errors": {
      "message": "Too many requests",
      "payload": {}
    }
  },
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsGetList500Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
object OrganizationsGetListResponse
{
  "type": "object",
  "properties": {
    "organizations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "website"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}"
          },
          "name": {
            "type": "string",
            "example": "ACME Inc.",
            "description": "Name of the organization"
          },
          "status": {
            "enum": [
              "PENDING",
              "APPROVED",
              "REJECTED"
            ],
            "type": "string",
            "example": "APPROVED",
            "description": "Status of the organization. Organizations need to be approved to be able to use them to send out rewards."
          },
          "website": {
            "type": "string",
            "format": "uri",
            "example": "https://www.example.com/some-org",
            "description": "URL of the website of that organization"
          },
          "created_at": {
            "type": "string",
            "format": "date",
            "example": "2021-08-02",
            "description": "Timestamp of when the organization has been created.\n\n*This field is only returned when creating an organization.* It is not returned anymore when retrieving or listing organizations.\n"
          }
        },
        "description": "Organizations are a way to separate different parts of your business within the same Tremendous account.\nYour root Tremendous account is an organization itself and can have multiple sub-organizations.\n\nYou can assign users in your Tremendous team as members to any organization. Users can be members of multiple\norganizations at once.\n\nEach organizations can have it's own API key.\n"
      }
    }
  }
}
object OrganizationsGetOrganization401Response
{
  "type": "object",
  "required": [
    "errors"
  ],
  "properties": {
    "errors": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Error message"
        },
        "payload": {
          "type": "object",
          "example": {
            "rewards": {
              "catalog": "At least one valid product required"
            }
          },
          "description": "Mirrors the request parameters structure, filled only with the (nested) properties that caused an error."
        }
      }
    }
  }
}
Load more schemas