object InvoicesGetAll500Response
{
  "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 InvoicesGetAllResponse
{
  "type": "object",
  "required": [
    "invoices",
    "total_count"
  ],
  "properties": {
    "invoices": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "amount",
          "status",
          "created_at",
          "paid_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "PPS-26873",
            "description": "The invoice number"
          },
          "amount": {
            "type": "number",
            "format": "double",
            "example": 50.35,
            "description": "Amount of the invoice in USD"
          },
          "orders": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}"
            },
            "example": [
              "ABC123456789",
              "DEF123456789"
            ],
            "description": "List of orders related to the invoice (it doesn't apply to prefunding)"
          },
          "status": {
            "enum": [
              "DELETED",
              "PAID",
              "OPEN",
              "MARKED_AS_PAID"
            ],
            "type": "string",
            "example": "PAID",
            "description": "Status of this invoice\n\n<table>\n  <thead>\n    <tr>\n      <th>Status</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>Invoice has been deleted by your organization</td>\n    </tr>\n    <tr>\n      <td><code>PAID</code></td>\n      <td>Invoice has been paid by your organization</td>\n    </tr>\n    <tr>\n      <td><code>OPEN</code></td>\n      <td>Invoice has been created by your organization but has not been paid, yet</td>\n    </tr>\n  </tbody>\n</table>\n"
          },
          "paid_at": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Timestamp of when the invoice has been paid.\n"
          },
          "rewards": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}"
            },
            "example": [
              "ABC123456789",
              "DEF123456789"
            ],
            "description": "List of rewards related to the invoice (it doesn't apply to prefunding)"
          },
          "po_number": {
            "type": "string",
            "example": "123-PO-EE",
            "nullable": true,
            "description": "Reference to the purchase order number within your organization"
          },
          "created_at": {
            "type": "string",
            "format": "date",
            "description": "Timestamp of when the invoice has been created.\n"
          }
        },
        "description": "Invoices are instruments to fund your Tremendous account's balance.\n\nInvoices can be created by your organization programatically.\nOnce we receive your payment, the invoice is marked as `PAID` and we add\nthe respective funds to your account's balance.\n"
      }
    },
    "total_count": {
      "type": "integer",
      "example": 1,
      "description": "The total number of invoices across all pages"
    }
  }
}
object InvoicesGetById401Response
{
  "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 InvoicesGetById404Response
{
  "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 InvoicesGetById429Response
{
  "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 InvoicesGetById500Response
{
  "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 InvoicesGetByIdResponse
{
  "type": "object",
  "required": [
    "invoice"
  ],
  "properties": {
    "invoice": {
      "type": "object",
      "required": [
        "id",
        "amount",
        "status",
        "created_at",
        "paid_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "PPS-26873",
          "description": "The invoice number"
        },
        "amount": {
          "type": "number",
          "format": "double",
          "example": 50.35,
          "description": "Amount of the invoice in USD"
        },
        "orders": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}"
          },
          "example": [
            "ABC123456789",
            "DEF123456789"
          ],
          "description": "List of orders related to the invoice (it doesn't apply to prefunding)"
        },
        "status": {
          "enum": [
            "DELETED",
            "PAID",
            "OPEN",
            "MARKED_AS_PAID"
          ],
          "type": "string",
          "example": "PAID",
          "description": "Status of this invoice\n\n<table>\n  <thead>\n    <tr>\n      <th>Status</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>Invoice has been deleted by your organization</td>\n    </tr>\n    <tr>\n      <td><code>PAID</code></td>\n      <td>Invoice has been paid by your organization</td>\n    </tr>\n    <tr>\n      <td><code>OPEN</code></td>\n      <td>Invoice has been created by your organization but has not been paid, yet</td>\n    </tr>\n  </tbody>\n</table>\n"
        },
        "paid_at": {
          "type": "string",
          "format": "date",
          "nullable": true,
          "description": "Timestamp of when the invoice has been paid.\n"
        },
        "rewards": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}"
          },
          "example": [
            "ABC123456789",
            "DEF123456789"
          ],
          "description": "List of rewards related to the invoice (it doesn't apply to prefunding)"
        },
        "po_number": {
          "type": "string",
          "example": "123-PO-EE",
          "nullable": true,
          "description": "Reference to the purchase order number within your organization"
        },
        "created_at": {
          "type": "string",
          "format": "date",
          "description": "Timestamp of when the invoice has been created.\n"
        }
      },
      "description": "Invoices are instruments to fund your Tremendous account's balance.\n\nInvoices can be created by your organization programatically.\nOnce we receive your payment, the invoice is marked as `PAID` and we add\nthe respective funds to your account's balance.\n"
    }
  }
}
object InvoicesGetCsv400Response
{
  "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 InvoicesGetCsv401Response
{
  "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 InvoicesGetCsv404Response
{
  "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 InvoicesGetCsv429Response
{
  "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 InvoicesGetCsv500Response
{
  "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."
        }
      }
    }
  }
}
string InvoicesGetCsvResponse
{
  "type": "string",
  "format": "text",
  "description": "The CSV text file"
}
object InvoicesGetPdf401Response
{
  "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 InvoicesGetPdf404Response
{
  "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 InvoicesGetPdf429Response
{
  "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 InvoicesGetPdf500Response
{
  "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."
        }
      }
    }
  }
}
string InvoicesGetPdfResponse
{
  "type": "string",
  "format": "binary",
  "description": "The PDF binary data"
}
object InvoicesRemoveInvoice401Response
{
  "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 InvoicesRemoveInvoice404Response
{
  "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 InvoicesRemoveInvoice429Response
{
  "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 InvoicesRemoveInvoice500Response
{
  "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 InvoicesRemoveInvoiceResponse
{
  "type": "object",
  "required": [
    "invoice"
  ],
  "properties": {
    "invoice": {
      "type": "object",
      "required": [
        "id",
        "amount",
        "status",
        "created_at",
        "paid_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "PPS-26873",
          "description": "The invoice number"
        },
        "amount": {
          "type": "number",
          "format": "double",
          "example": 50.35,
          "description": "Amount of the invoice in USD"
        },
        "orders": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}"
          },
          "example": [
            "ABC123456789",
            "DEF123456789"
          ],
          "description": "List of orders related to the invoice (it doesn't apply to prefunding)"
        },
        "status": {
          "enum": [
            "DELETED",
            "PAID",
            "OPEN",
            "MARKED_AS_PAID"
          ],
          "type": "string",
          "example": "PAID",
          "description": "Status of this invoice\n\n<table>\n  <thead>\n    <tr>\n      <th>Status</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>Invoice has been deleted by your organization</td>\n    </tr>\n    <tr>\n      <td><code>PAID</code></td>\n      <td>Invoice has been paid by your organization</td>\n    </tr>\n    <tr>\n      <td><code>OPEN</code></td>\n      <td>Invoice has been created by your organization but has not been paid, yet</td>\n    </tr>\n  </tbody>\n</table>\n"
        },
        "paid_at": {
          "type": "string",
          "format": "date",
          "nullable": true,
          "description": "Timestamp of when the invoice has been paid.\n"
        },
        "rewards": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}"
          },
          "example": [
            "ABC123456789",
            "DEF123456789"
          ],
          "description": "List of rewards related to the invoice (it doesn't apply to prefunding)"
        },
        "po_number": {
          "type": "string",
          "example": "123-PO-EE",
          "nullable": true,
          "description": "Reference to the purchase order number within your organization"
        },
        "created_at": {
          "type": "string",
          "format": "date",
          "description": "Timestamp of when the invoice has been created.\n"
        }
      },
      "description": "Invoices are instruments to fund your Tremendous account's balance.\n\nInvoices can be created by your organization programatically.\nOnce we receive your payment, the invoice is marked as `PAID` and we add\nthe respective funds to your account's balance.\n"
    }
  }
}
object Member
{
  "type": "object",
  "required": [
    "id",
    "name",
    "email",
    "role",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "example": "Jane Doe",
      "nullable": true,
      "description": "Full name of the member"
    },
    "role": {
      "enum": [
        "MEMBER",
        "ADMIN",
        "DELETED"
      ],
      "type": "string",
      "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>No longer a member of this organization.</td>\n    </tr>\n  <tbody>\n  </tbody>\n</table>\n"
    },
    "email": {
      "type": "string",
      "format": "email",
      "example": "jane@example.com",
      "description": "Email address of the member"
    },
    "status": {
      "enum": [
        "REGISTERED",
        "INVITED"
      ],
      "type": "string",
      "example": "INVITED",
      "readOnly": true,
      "description": "Current status of the member's account.\n\nWhen creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.\n"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2021-08-02T11:05:59Z",
      "readOnly": true,
      "description": "Timestamp when this member was created.\n\nThe `created_at` timestamp is **NOT** returned when retrieving a member (but is part of the response when listing or creating members).\n"
    },
    "last_login_at": {
      "type": "string",
      "format": "date-time",
      "example": "2021-08-02T11:05:59Z",
      "nullable": true,
      "readOnly": true,
      "description": "Timestamp when this member most recently logged into the dashboard of the organization associated with this API key.\n"
    }
  },
  "description": "Each organization has one or more users that can access and manage that organization. These users are called members.\n\nMembers can take actions via the Tremendous web dashboard directly.\n\nThese actions include adding funding sources to the organization, creating Campaigns, and more.\n"
}
object MemberBase
{
  "type": "object",
  "required": [
    "id",
    "name",
    "email",
    "role",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "example": "Jane Doe",
      "nullable": true,
      "description": "Full name of the member"
    },
    "role": {
      "enum": [
        "MEMBER",
        "ADMIN",
        "DELETED"
      ],
      "type": "string",
      "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>No longer a member of this organization.</td>\n    </tr>\n  <tbody>\n  </tbody>\n</table>\n"
    },
    "email": {
      "type": "string",
      "format": "email",
      "example": "jane@example.com",
      "description": "Email address of the member"
    },
    "status": {
      "enum": [
        "REGISTERED",
        "INVITED"
      ],
      "type": "string",
      "example": "INVITED",
      "readOnly": true,
      "description": "Current status of the member's account.\n\nWhen creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.\n"
    }
  },
  "description": "Each organization has one or more users that can access and manage that organization. These users are called members.\n\nMembers can take actions via the Tremendous web dashboard directly.\n\nThese actions include adding funding sources to the organization, creating Campaigns, and more.\n"
}
object MemberWithEvents
{
  "type": "object",
  "required": [
    "id",
    "name",
    "email",
    "role",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "example": "Jane Doe",
      "nullable": true,
      "description": "Full name of the member"
    },
    "role": {
      "enum": [
        "MEMBER",
        "ADMIN",
        "DELETED"
      ],
      "type": "string",
      "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>No longer a member of this organization.</td>\n    </tr>\n  <tbody>\n  </tbody>\n</table>\n"
    },
    "email": {
      "type": "string",
      "format": "email",
      "example": "jane@example.com",
      "description": "Email address of the member"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "created",
              "last_login"
            ],
            "type": "string",
            "example": "created",
            "description": "Event type"
          },
          "date_utc": {
            "type": "string",
            "format": "date-time",
            "example": "2021-08-02T11:05:59Z",
            "nullable": true,
            "description": "Timestamp when the event happened"
          }
        }
      },
      "readOnly": true,
      "description": "List of events related to the member."
    },
    "status": {
      "enum": [
        "REGISTERED",
        "INVITED"
      ],
      "type": "string",
      "example": "INVITED",
      "readOnly": true,
      "description": "Current status of the member's account.\n\nWhen creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.\n"
    }
  },
  "description": "Each organization has one or more users that can access and manage that organization. These users are called members.\n\nMembers can take actions via the Tremendous web dashboard directly.\n\nThese actions include adding funding sources to the organization, creating Campaigns, and more.\n"
}
object MemberWithoutEvents
{
  "type": "object",
  "required": [
    "id",
    "name",
    "email",
    "role",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "example": "Jane Doe",
      "nullable": true,
      "description": "Full name of the member"
    },
    "role": {
      "enum": [
        "MEMBER",
        "ADMIN",
        "DELETED"
      ],
      "type": "string",
      "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>No longer a member of this organization.</td>\n    </tr>\n  <tbody>\n  </tbody>\n</table>\n"
    },
    "email": {
      "type": "string",
      "format": "email",
      "example": "jane@example.com",
      "description": "Email address of the member"
    },
    "status": {
      "enum": [
        "REGISTERED",
        "INVITED"
      ],
      "type": "string",
      "example": "INVITED",
      "readOnly": true,
      "description": "Current status of the member's account.\n\nWhen creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.\n"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "example": "2021-08-02T11:05:59Z",
      "readOnly": true,
      "description": "Timestamp when this member was created.\n\nThe `created_at` timestamp is **NOT** returned when retrieving a member (but is part of the response when listing or creating members).\n"
    },
    "last_login_at": {
      "type": "string",
      "format": "date-time",
      "example": "2021-08-02T11:05:59Z",
      "nullable": true,
      "readOnly": true,
      "description": "Timestamp when this member most recently logged into the dashboard of the organization associated with this API key.\n"
    }
  },
  "description": "Each organization has one or more users that can access and manage that organization. These users are called members.\n\nMembers can take actions via the Tremendous web dashboard directly.\n\nThese actions include adding funding sources to the organization, creating Campaigns, and more.\n"
}
object MembersCreateNewMember400Response
{
  "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 MembersCreateNewMember401Response
{
  "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 MembersCreateNewMember429Response
{
  "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 MembersCreateNewMember500Response
{
  "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 MembersCreateNewMemberRequest
{
  "type": "object",
  "required": [
    "email",
    "name",
    "role"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "Jane Doe",
      "description": "Full name of the member"
    },
    "role": {
      "enum": [
        "MEMBER",
        "ADMIN"
      ],
      "type": "string",
      "example": "MEMBER",
      "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n  <tbody>\n</table>\n"
    },
    "email": {
      "type": "string",
      "format": "email",
      "example": "jane@example.com",
      "description": "Email address of the member"
    }
  }
}
object MembersCreateNewMemberResponse
{
  "type": "object",
  "required": [
    "member"
  ],
  "properties": {
    "member": {
      "type": "object",
      "required": [
        "id",
        "name",
        "email",
        "role",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}"
        },
        "name": {
          "type": "string",
          "example": "Jane Doe",
          "nullable": true,
          "description": "Full name of the member"
        },
        "role": {
          "enum": [
            "MEMBER",
            "ADMIN",
            "DELETED"
          ],
          "type": "string",
          "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>No longer a member of this organization.</td>\n    </tr>\n  <tbody>\n  </tbody>\n</table>\n"
        },
        "email": {
          "type": "string",
          "format": "email",
          "example": "jane@example.com",
          "description": "Email address of the member"
        },
        "status": {
          "enum": [
            "REGISTERED",
            "INVITED"
          ],
          "type": "string",
          "example": "INVITED",
          "description": "Current status of the member's account.\n\nWhen creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.\n"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "example": "2021-08-02T11:05:59Z",
          "description": "Timestamp when this member was created.\n\nThe `created_at` timestamp is **NOT** returned when retrieving a member (but is part of the response when listing or creating members).\n"
        },
        "last_login_at": {
          "type": "string",
          "format": "date-time",
          "example": "2021-08-02T11:05:59Z",
          "nullable": true,
          "description": "Timestamp when this member most recently logged into the dashboard of the organization associated with this API key.\n"
        }
      },
      "description": "Each organization has one or more users that can access and manage that organization. These users are called members.\n\nMembers can take actions via the Tremendous web dashboard directly.\n\nThese actions include adding funding sources to the organization, creating Campaigns, and more.\n"
    }
  }
}
object MembersGetMember401Response
{
  "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 MembersGetMember404Response
{
  "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 MembersGetMember429Response
{
  "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 MembersGetMember500Response
{
  "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 MembersGetMemberResponse
{
  "type": "object",
  "required": [
    "member"
  ],
  "properties": {
    "member": {
      "type": "object",
      "required": [
        "id",
        "name",
        "email",
        "role",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}"
        },
        "name": {
          "type": "string",
          "example": "Jane Doe",
          "nullable": true,
          "description": "Full name of the member"
        },
        "role": {
          "enum": [
            "MEMBER",
            "ADMIN",
            "DELETED"
          ],
          "type": "string",
          "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>No longer a member of this organization.</td>\n    </tr>\n  <tbody>\n  </tbody>\n</table>\n"
        },
        "email": {
          "type": "string",
          "format": "email",
          "example": "jane@example.com",
          "description": "Email address of the member"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "created",
                  "last_login"
                ],
                "type": "string",
                "example": "created",
                "description": "Event type"
              },
              "date_utc": {
                "type": "string",
                "format": "date-time",
                "example": "2021-08-02T11:05:59Z",
                "nullable": true,
                "description": "Timestamp when the event happened"
              }
            }
          },
          "description": "List of events related to the member."
        },
        "status": {
          "enum": [
            "REGISTERED",
            "INVITED"
          ],
          "type": "string",
          "example": "INVITED",
          "description": "Current status of the member's account.\n\nWhen creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.\n"
        }
      },
      "description": "Each organization has one or more users that can access and manage that organization. These users are called members.\n\nMembers can take actions via the Tremendous web dashboard directly.\n\nThese actions include adding funding sources to the organization, creating Campaigns, and more.\n"
    }
  }
}
object MembersListMembers401Response
{
  "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 MembersListMembers429Response
{
  "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 MembersListMembers500Response
{
  "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 MembersListMembersResponse
{
  "type": "object",
  "required": [
    "members"
  ],
  "properties": {
    "members": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "email",
          "role",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}"
          },
          "name": {
            "type": "string",
            "example": "Jane Doe",
            "nullable": true,
            "description": "Full name of the member"
          },
          "role": {
            "enum": [
              "MEMBER",
              "ADMIN",
              "DELETED"
            ],
            "type": "string",
            "description": "Role of the member within the organization.\n\n<table>\n  <thead>\n    <tr>\n      <th>Role</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tr>\n      <td><code>MEMBER</code></td>\n      <td>Limited permissions. Can view their own reward and order histories only.</td>\n    </tr>\n    <tr>\n      <td><code>ADMIN</code></td>\n      <td>Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.</td>\n    </tr>\n    <tr>\n      <td><code>DELETED</code></td>\n      <td>No longer a member of this organization.</td>\n    </tr>\n  <tbody>\n  </tbody>\n</table>\n"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "jane@example.com",
            "description": "Email address of the member"
          },
          "status": {
            "enum": [
              "REGISTERED",
              "INVITED"
            ],
            "type": "string",
            "example": "INVITED",
            "description": "Current status of the member's account.\n\nWhen creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`.\n"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2021-08-02T11:05:59Z",
            "description": "Timestamp when this member was created.\n\nThe `created_at` timestamp is **NOT** returned when retrieving a member (but is part of the response when listing or creating members).\n"
          },
          "last_login_at": {
            "type": "string",
            "format": "date-time",
            "example": "2021-08-02T11:05:59Z",
            "nullable": true,
            "description": "Timestamp when this member most recently logged into the dashboard of the organization associated with this API key.\n"
          }
        },
        "description": "Each organization has one or more users that can access and manage that organization. These users are called members.\n\nMembers can take actions via the Tremendous web dashboard directly.\n\nThese actions include adding funding sources to the organization, creating Campaigns, and more.\n"
      }
    }
  }
}
string NullableTremendousId
{
  "type": "string",
  "example": "SOMEIDSOMEID",
  "pattern": "[A-Z0-9]{4,20}",
  "nullable": true,
  "readOnly": true
}
object Order
{
  "type": "object",
  "required": [
    "id",
    "created_at",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true,
      "description": "Tremendous ID of the order"
    },
    "reward": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "readOnly": true,
          "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",
              "readOnly": true,
              "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}",
          "readOnly": true,
          "description": "Tremendous ID of the order this reward is part of."
        },
        "products": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}",
            "readOnly": false,
            "writeOnly": true
          },
          "minItems": 1,
          "writeOnly": true,
          "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"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "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."
        },
        "campaign_id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "readOnly": false,
          "writeOnly": 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}",
                "readOnly": false,
                "description": "Tremendous ID of the custom field"
              },
              "label": {
                "type": "string",
                "example": "harry_potter_house",
                "readOnly": false,
                "description": "Label of the custom field"
              },
              "value": {
                "type": "string",
                "example": "Hufflepuff",
                "nullable": true,
                "readOnly": false,
                "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",
      "readOnly": true,
      "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,
          "readOnly": true,
          "description": "Fees for the order (in USD)"
        },
        "total": {
          "type": "number",
          "format": "double",
          "example": 52.5,
          "minimum": 0,
          "readOnly": true,
          "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,
              "readOnly": true,
              "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,
          "readOnly": true,
          "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",
      "readOnly": true,
      "description": "Date the order has been created"
    },
    "invoice_id": {
      "type": "string",
      "example": "2E59A82B-0001",
      "readOnly": true,
      "description": "The ID for the invoice associated with this order"
    },
    "campaign_id": {
      "type": "string",
      "example": "IVM0I3WNJJL0",
      "pattern": "[A-Z0-9]{4,20}",
      "nullable": true,
      "readOnly": 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 OrderBase
{
  "type": "object",
  "required": [
    "id",
    "created_at",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true,
      "description": "Tremendous ID of the order"
    },
    "status": {
      "enum": [
        "CANCELED",
        "CART",
        "EXECUTED",
        "FAILED",
        "PENDING APPROVAL",
        "PENDING INTERNAL PAYMENT APPROVAL"
      ],
      "type": "string",
      "readOnly": true,
      "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,
          "readOnly": true,
          "description": "Fees for the order (in USD)"
        },
        "total": {
          "type": "number",
          "format": "double",
          "example": 52.5,
          "minimum": 0,
          "readOnly": true,
          "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,
              "readOnly": true,
              "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,
          "readOnly": true,
          "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",
      "readOnly": true,
      "description": "Date the order has been created"
    },
    "invoice_id": {
      "type": "string",
      "example": "2E59A82B-0001",
      "readOnly": true,
      "description": "The ID for the invoice associated with this order"
    },
    "campaign_id": {
      "type": "string",
      "example": "IVM0I3WNJJL0",
      "pattern": "[A-Z0-9]{4,20}",
      "nullable": true,
      "readOnly": 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 OrderForCreate
{
  "type": "object",
  "required": [
    "payment",
    "reward"
  ],
  "properties": {
    "reward": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "readOnly": true,
          "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",
          "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"
        },
        "order_id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "readOnly": true,
          "description": "Tremendous ID of the order this reward is part of."
        },
        "products": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}",
            "readOnly": false,
            "writeOnly": true
          },
          "minItems": 1,
          "writeOnly": true,
          "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"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "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."
        },
        "campaign_id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "readOnly": false,
          "writeOnly": 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}",
                "readOnly": false,
                "description": "Tremendous ID of the custom field"
              },
              "label": {
                "type": "string",
                "example": "harry_potter_house",
                "readOnly": false,
                "description": "Label of the custom field"
              },
              "value": {
                "type": "string",
                "example": "Hufflepuff",
                "nullable": true,
                "readOnly": false,
                "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"
    }
  }
}
string OrderStatus
{
  "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"
}
object OrderWithLink
{
  "type": "object",
  "required": [
    "id",
    "created_at",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true,
      "description": "Tremendous ID of the order"
    },
    "status": {
      "enum": [
        "CANCELED",
        "CART",
        "EXECUTED",
        "FAILED",
        "PENDING APPROVAL",
        "PENDING INTERNAL PAYMENT APPROVAL"
      ],
      "type": "string",
      "readOnly": true,
      "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,
          "readOnly": true,
          "description": "Fees for the order (in USD)"
        },
        "total": {
          "type": "number",
          "format": "double",
          "example": 52.5,
          "minimum": 0,
          "readOnly": true,
          "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,
              "readOnly": true,
              "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,
          "readOnly": true,
          "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}",
            "readOnly": true,
            "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",
                "readOnly": true,
                "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",
                "readOnly": true,
                "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}",
            "readOnly": true,
            "description": "Tremendous ID of the order this reward is part of."
          },
          "products": {
            "type": "array",
            "items": {
              "type": "string",
              "example": "SOMEIDSOMEID",
              "pattern": "[A-Z0-9]{4,20}",
              "readOnly": false,
              "writeOnly": true
            },
            "minItems": 1,
            "writeOnly": true,
            "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"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "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."
          },
          "campaign_id": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}",
            "nullable": true,
            "readOnly": false,
            "writeOnly": 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}",
                  "readOnly": false,
                  "description": "Tremendous ID of the custom field"
                },
                "label": {
                  "type": "string",
                  "example": "harry_potter_house",
                  "readOnly": false,
                  "description": "Label of the custom field"
                },
                "value": {
                  "type": "string",
                  "example": "Hufflepuff",
                  "nullable": true,
                  "readOnly": false,
                  "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",
      "readOnly": true,
      "description": "Date the order has been created"
    },
    "invoice_id": {
      "type": "string",
      "example": "2E59A82B-0001",
      "readOnly": true,
      "description": "The ID for the invoice associated with this order"
    },
    "campaign_id": {
      "type": "string",
      "example": "IVM0I3WNJJL0",
      "pattern": "[A-Z0-9]{4,20}",
      "nullable": true,
      "readOnly": 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 OrderWithoutLink
{
  "type": "object",
  "required": [
    "id",
    "created_at",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "SOMEIDSOMEID",
      "pattern": "[A-Z0-9]{4,20}",
      "readOnly": true,
      "description": "Tremendous ID of the order"
    },
    "reward": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "readOnly": true,
          "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",
              "readOnly": true,
              "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}",
          "readOnly": true,
          "description": "Tremendous ID of the order this reward is part of."
        },
        "products": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "SOMEIDSOMEID",
            "pattern": "[A-Z0-9]{4,20}",
            "readOnly": false,
            "writeOnly": true
          },
          "minItems": 1,
          "writeOnly": true,
          "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"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "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."
        },
        "campaign_id": {
          "type": "string",
          "example": "SOMEIDSOMEID",
          "pattern": "[A-Z0-9]{4,20}",
          "nullable": true,
          "readOnly": false,
          "writeOnly": 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}",
                "readOnly": false,
                "description": "Tremendous ID of the custom field"
              },
              "label": {
                "type": "string",
                "example": "harry_potter_house",
                "readOnly": false,
                "description": "Label of the custom field"
              },
              "value": {
                "type": "string",
                "example": "Hufflepuff",
                "nullable": true,
                "readOnly": false,
                "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",
      "readOnly": true,
      "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,
          "readOnly": true,
          "description": "Fees for the order (in USD)"
        },
        "total": {
          "type": "number",
          "format": "double",
          "example": 52.5,
          "minimum": 0,
          "readOnly": true,
          "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,
              "readOnly": true,
              "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,
          "readOnly": true,
          "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",
      "readOnly": true,
      "description": "Date the order has been created"
    },
    "invoice_id": {
      "type": "string",
      "example": "2E59A82B-0001",
      "readOnly": true,
      "description": "The ID for the invoice associated with this order"
    },
    "campaign_id": {
      "type": "string",
      "example": "IVM0I3WNJJL0",
      "pattern": "[A-Z0-9]{4,20}",
      "nullable": true,
      "readOnly": 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 OrdersApproveOrderById401Response
{
  "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