XETA API

Xe XETA API — a Swagger 2.0 definition published by XE.com on SwaggerHub covering 16 operations. The spec declares host xeta-api.xe.com/v1 (not publicly reachable at review time) and a Drupal-based authorizer security scheme; harvested verbatim from the provider's SwaggerHub organization.

OpenAPI Specification

xeta-api-openapi.json Raw ↑
{"swagger":"2.0","info":{"version":"v1.0.0","title":"XETA","description":"XE Travel API - Manage your trips and associated expenses."},"host":"xeta-api.xe.com","basePath":"/v1","schemes":["https"],"paths":{"/":{"get":{"responses":{"200":{"description":"200 response"}}}},"/budget-category":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BudgetCategoryList"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"BudgetCategory","required":true,"schema":{"$ref":"#/definitions/BudgetCategory"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BudgetCategory"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/budget-category/{budgetCategoryId}":{"get":{"produces":["application/json"],"parameters":[{"name":"budgetCategoryId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BudgetCategory"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"budgetCategoryId","in":"path","required":true,"type":"string"},{"in":"body","name":"BudgetCategory","required":true,"schema":{"$ref":"#/definitions/BudgetCategory"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BudgetCategory"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"delete":{"produces":["application/json"],"parameters":[{"name":"budgetCategoryId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response"},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/expense":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/ExpenseList"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"Expense","required":true,"schema":{"$ref":"#/definitions/Expense"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Expense"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/expense/{expenseId}":{"get":{"produces":["application/json"],"parameters":[{"name":"expenseId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Expense"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"expenseId","in":"path","required":true,"type":"string"},{"in":"body","name":"Expense","required":true,"schema":{"$ref":"#/definitions/Expense"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Expense"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"delete":{"produces":["application/json"],"parameters":[{"name":"expenseId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response"},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/friend":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/FriendList"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"Friend","required":true,"schema":{"$ref":"#/definitions/Friend"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Friend"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/friend/{friendId}":{"get":{"produces":["application/json"],"parameters":[{"name":"friendId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Friend"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"friendId","in":"path","required":true,"type":"string"},{"in":"body","name":"Friend","required":true,"schema":{"$ref":"#/definitions/Friend"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Friend"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"delete":{"produces":["application/json"],"parameters":[{"name":"friendId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response"},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/invitation":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","required":true,"type":"string"},{"in":"body","name":"ExpenseInvitation","required":true,"schema":{"$ref":"#/definitions/ExpenseInvitation"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/ExpenseInvitation"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/invitation/{invitationId}":{"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","required":true,"type":"string"},{"name":"invitationId","in":"path","required":true,"type":"string"},{"in":"body","name":"ExpenseInvitation","required":true,"schema":{"$ref":"#/definitions/ExpenseInvitation"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/ExpenseInvitation"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"delete":{"produces":["application/json"],"parameters":[{"name":"type","in":"query","required":true,"type":"string"},{"name":"invitationId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response"},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/trip":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/TripList"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"Trip","required":true,"schema":{"$ref":"#/definitions/Trip"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Trip"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/trip/{tripId}":{"get":{"produces":["application/json"],"parameters":[{"name":"tripId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Trip"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"put":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tripId","in":"path","required":true,"type":"string"},{"in":"body","name":"Trip","required":true,"schema":{"$ref":"#/definitions/Trip"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Trip"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"delete":{"produces":["application/json"],"parameters":[{"name":"tripId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response"},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/trip/{tripId}/expense":{"get":{"produces":["application/json"],"parameters":[{"name":"tripId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/ExpenseList"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/user":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/XetaUser"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"XetaUser","required":true,"schema":{"$ref":"#/definitions/XetaUser"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/XetaUser"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/user/login":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"User","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/User"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}}}},"/user/logout":{"get":{"produces":["application/json"],"responses":{"200":{"description":"200 response"},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}},"security":[{"xeta-drupal-authorizer":[]}]}},"/user/register":{"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"User","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/User"}},"400":{"description":"400 response","schema":{"$ref":"#/definitions/XetaError"}},"500":{"description":"500 response","schema":{"$ref":"#/definitions/XetaError"}}}}}},"securityDefinitions":{"xeta-drupal-authorizer":{"type":"apiKey","name":"Cookie","in":"header","x-amazon-apigateway-authtype":"custom"}},"definitions":{"ExpenseList":{"title":"ExpenseList","type":"array","description":"Expense List object","items":{"$ref":"#/definitions/Expense"}},"TripTripDestinationsItem":{"type":"object","required":["countryCode","id","lastModifiedDate","tripId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"tripId":{"type":"integer","description":"Id of the trip this destination belongs to."},"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code.","minLength":2,"maxLength":2,"pattern":"^.*\\S+.*$"}},"description":"An entity used to attach destinations to trips."},"Trip":{"type":"object","required":["budgetCurrencyCode","endDate","id","lastModifiedDate","name","startDate","usdMidMarketRate"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"name":{"type":"string","description":"Trip name.","minLength":1,"maxLength":191,"pattern":"^.*\\S+.*$"},"startDate":{"type":"integer","description":"Timestamp of when this trip was started."},"endDate":{"type":"integer","description":"Timestamp of when this trip was ended."},"budget":{"type":"number","description":"Budget amount allocated for this trip."},"usdMidMarketRate":{"type":"number","description":"Mid-market rate from the budget currency to USD."},"budgetCurrencyCode":{"type":"string","description":"ISO 4217 budget currency code.","minLength":3,"maxLength":3,"pattern":"^.*\\S+.*$"},"usedBudget":{"type":"number","description":"Amount spent on expenses associated with this trip."},"tripDestinations":{"type":"array","description":"List of destinations attached to this trip.","items":{"$ref":"#/definitions/TripTripDestinationsItem"}},"usdBudget":{"type":"number","description":"Budget amount allocated for this trip in USD."}},"title":"Trip","description":"An entity used to group expenses on a trip."},"XetaUserPhone":{"type":"object","properties":{"number":{"type":"string","description":"Number."},"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code."},"extension":{"type":"string","description":"Extension."}},"description":"An entity used to represent a phone number."},"User":{"type":"object","properties":{"id":{"type":"integer"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"company":{"type":"string"},"jobTitle":{"type":"string"},"dateOfBirth":{"type":"integer"},"email":{"type":"string"},"address":{"$ref":"#/definitions/UserAddress"},"password":{"type":"string"},"communicationsConsented":{"type":"boolean"},"phone":{"$ref":"#/definitions/UserPhone"},"xeid":{"type":"string"}},"title":"User"},"FriendList":{"title":"FriendList","type":"array","description":"Friend List object","items":{"$ref":"#/definitions/Friend"}},"ExpenseUserExpense":{"type":"object","required":["budgetCategoryId","expenseId","lastModifiedDate","userId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"userId":{"type":"integer","description":"Id of the user in this relationship."},"expenseId":{"type":"integer","description":"Id of the expense in this relationship."},"budgetCategoryId":{"type":"integer","description":"Id of the budget category the associated expense is categorized under."}},"description":"An entity used to associate an expense and a user."},"TripList":{"title":"TripList","type":"array","description":"Trip List object","items":{"$ref":"#/definitions/Trip"}},"UserAddress":{"type":"object","required":["countryCode"],"properties":{"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code."},"administrativeArea":{"type":"string","description":"Province."},"subAdministrativeArea":{"type":"string","description":"County / Region."},"locality":{"type":"string","description":"City."},"dependentLocality":{"type":"string","description":"Unused."},"postalCode":{"type":"string","description":"Postal Code / ZIP."},"thoroughfare":{"type":"string","description":"Street / Canal / River."},"premise":{"type":"string","description":"Unit / Suite / Apartment."},"subPremise":{"type":"string","description":"Unused."}},"description":"An entity used to represent an address."},"XetaUser":{"type":"object","required":["address","communicationsConsented","email","firstName","id","lastModifiedDate","lastName","password"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"address":{"$ref":"#/definitions/XetaUserAddress"},"id":{"type":"integer","description":"Unique identifier."},"lastName":{"type":"string","description":"Last name."},"password":{"type":"string","description":"Password."},"email":{"type":"string","description":"E-mail address."},"firstName":{"type":"string","description":"First name."},"communicationsConsented":{"type":"boolean","description":"Communications consent."},"phone":{"$ref":"#/definitions/XetaUserPhone"},"middleName":{"type":"string","description":"Middle name."},"company":{"type":"string","description":"Company."},"jobTitle":{"type":"string"},"dateOfBirth":{"type":"integer"},"xeid":{"type":"string"}},"title":"Xeta User","description":"An entity used to represent a user."},"FriendExpenseInvitationsItem":{"type":"object","required":["amount","expenseId","friendId","id","lastModifiedDate","userId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"invitationStatusName":{"type":"string","description":"Status of the invitation.","enum":["ACCEPTED","PENDING","REJECTED","DELETED"]},"userId":{"type":"integer","description":"Id of the user who sent this invitation."},"friendId":{"type":"integer","description":"Id of the user the expense was shared with."},"expenseId":{"type":"integer","description":"Id of the expense that was shared."},"amount":{"type":"number","description":"The amount of the expense that was split with the friend."}},"description":"An entity used to share expenses with other users."},"ExpenseExpenseInvitationsItem":{"type":"object","required":["amount","expenseId","friendId","id","lastModifiedDate","userId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"invitationStatusName":{"type":"string","description":"Status of the invitation.","enum":["ACCEPTED","PENDING","REJECTED","DELETED"]},"userId":{"type":"integer","description":"Id of the user who sent this invitation."},"friendId":{"type":"integer","description":"Id of the user the expense was shared with."},"expenseId":{"type":"integer","description":"Id of the expense that was shared."},"amount":{"type":"number","description":"The amount of the expense that was split with the friend."}},"description":"An entity used to share expenses with other users."},"ExpenseTripExpense":{"type":"object","required":["expenseId","lastModifiedDate","tripId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"tripId":{"type":"integer","description":"Id of the trip in this relationship."},"expenseId":{"type":"integer","description":"Id of the expense in this relationship."}},"description":"An entity used to associate an expense and a trip."},"BudgetCategoryList":{"title":"BudgetCategoryList","type":"array","description":"BudgetCategory List object","items":{"$ref":"#/definitions/BudgetCategory"}},"XetaUserAddress":{"type":"object","required":["countryCode"],"properties":{"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code."},"administrativeArea":{"type":"string","description":"Province."},"subAdministrativeArea":{"type":"string","description":"County / Region."},"locality":{"type":"string","description":"City."},"dependentLocality":{"type":"string","description":"Unused."},"postalCode":{"type":"string","description":"Postal Code / ZIP."},"thoroughfare":{"type":"string","description":"Street / Canal / River."},"premise":{"type":"string","description":"Unit / Suite / Apartment."},"subPremise":{"type":"string","description":"Unused."}},"description":"An entity used to represent an address."},"BudgetCategory":{"type":"object","required":["id","lastModifiedDate","name","userId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"userId":{"type":"integer","description":"Id of the user who owns this budget category."},"name":{"type":"string","description":"Unique name.","minLength":1,"maxLength":191,"pattern":"^.*\\S+.*$"}},"title":"Budget Category","description":"An entity used to categorize expenses."},"Friend":{"type":"object","required":["email","id","lastModifiedDate","name","userId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"userId":{"type":"integer","description":"Id of the user who owns this friend relationship."},"name":{"type":"string","description":"Friend name.","minLength":1,"maxLength":191,"pattern":"^.*\\S+.*$"},"email":{"type":"string","description":"Friend's email address."},"expenseInvitations":{"type":"array","description":"List of invitations sent to share an expense with this friend.","items":{"$ref":"#/definitions/FriendExpenseInvitationsItem"}}},"title":"Friend","description":"An entity used to represent friendship with other users."},"XetaErrorValidationErrorsItem":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Unique error code.","enum":["SIZE","NULL","DIGIT","REQUIRED","UNEXPECTED","TRIP","EXPENSE","EMAIL"]},"message":{"type":"string","description":"Verbose error description."},"field":{"type":"string","description":"Field that triggered the validation error."}},"description":"An entity used to represent validation errors."},"UserPhone":{"type":"object","properties":{"number":{"type":"string","description":"Number."},"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code."},"extension":{"type":"string","description":"Extension."}},"description":"An entity used to represent a phone number."},"Expense":{"type":"object","required":["fromAmount","fromCurrencyCode","id","incurredDate","lastModifiedDate","margin","midMarketRate","name","rate","toCurrencyCode","tripExpense","usdMidMarketRate","userExpense"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"name":{"type":"string","description":"Expense name.","minLength":1,"maxLength":191,"pattern":"^.*\\S+.*$"},"fromAmount":{"type":"number","description":"Foreign amount spent."},"toAmount":{"type":"number","description":"Local amount spent."},"usdToAmount":{"type":"number","description":"Local amount spent in USD."},"splitAmount":{"type":"number","description":"Local amount shared."},"paymentMethodName":{"type":"string","description":"Method used to pay for the expense.","enum":["BANK_TRANSFER","CASH","CREDIT_CARD","DEBIT_CARD","MOBILE_PAYMENT","TRAVELERS_CHEQUE"]},"merchant":{"type":"string","description":"Name of the merchant the expense was made made at.","maxLength":191},"fromCurrencyCode":{"type":"string","description":"ISO 4217 foreign currency code.","minLength":3,"maxLength":3,"pattern":"^.*\\S+.*$"},"toCurrencyCode":{"type":"string","description":"ISO 4217 local currency code.","minLength":3,"maxLength":3,"pattern":"^.*\\S+.*$"},"midMarketRate":{"type":"number","description":"Mid-market rate from the foreign currency to the local currency."},"rate":{"type":"number","description":"Overriden rate from the foreign currency to the local currency."},"usdMidMarketRate":{"type":"number","description":"Mid-market rate from the local currency to USD."},"margin":{"type":"number","description":"Percentage increase in rate."},"note":{"type":"string","description":"Arbitrary notes attached to an expense.","maxLength":65535},"incurredDate":{"type":"integer","description":"Timestamp of when this expense was incurred."},"userExpense":{"$ref":"#/definitions/ExpenseUserExpense"},"tripExpense":{"$ref":"#/definitions/ExpenseTripExpense"},"expenseInvitations":{"type":"array","description":"List of invitations sent to share this expense.","items":{"$ref":"#/definitions/ExpenseExpenseInvitationsItem"}}},"title":"Expense","description":"An entity used to record expenses."},"XetaError":{"type":"object","properties":{"code":{"type":"string","description":"Unique error code.","enum":["OPTIMISTIC_LOCK","ENTITY_NOT_FOUND","ROUTE_NOT_FOUND","JSON","VALIDATION","UNAUTHORIZED","FORBIDDEN","UNEXPECTED","ENTITY_EXISTS","TOO_MANY_REQUESTS"]},"message":{"type":"string","description":"Verbose error description."},"validationErrors":{"type":"array","description":"Verbose validation errors.","items":{"$ref":"#/definitions/XetaErrorValidationErrorsItem"}}},"title":"Xeta Error","description":"An entity used to represent all errors."},"ExpenseInvitation":{"type":"object","required":["amount","expenseId","friendId","id","lastModifiedDate","userId"],"properties":{"createdBy":{"type":"integer","description":"Id of the user who created this entity."},"createdDate":{"type":"integer","description":"Timestamp of when this entity was created."},"lastModifiedBy":{"type":"integer","description":"Id of the user who last modified this entity."},"lastModifiedDate":{"type":"integer","description":"Timestamp of when this entity was last modified."},"id":{"type":"integer","description":"Unique identifier."},"invitationStatusName":{"type":"string","description":"Status of the invitation.","enum":["ACCEPTED","PENDING","REJECTED","DELETED"]},"userId":{"type":"integer","description":"Id of the user who sent this invitation."},"friendId":{"type":"integer","description":"Id of the user the expense was shared with."},"expenseId":{"type":"integer","description":"Id of the expense that was shared."},"amount":{"type":"number","description":"The amount of the expense that was split with the friend."}},"title":"Expense Invitation","description":"An entity used to share expenses with other users."}}}