openapi: 3.2.0 info: title: FISĀ® Accounting Data as a Serviceā„¢ Order API description: What's changed in our API version: v2 contact: {} servers: - url: https://api.railz.ai description: Main (production) API server tags: - name: Order paths: /commerce/orders: get: description: Gets a list of orders for a business. operationId: order parameters: - name: businessName required: true in: query description: Unique business name identifier. schema: example: Railz type: string - name: serviceName required: true in: query description: Name of commerce service. schema: example: shopify type: string enum: - shopify - square - name: offset required: false in: query description: The offset is the position in the dataset of a particular record. schema: format: integer type: number - name: limit required: false in: query description: 'This is the size of the results set you would like (default: 100).' schema: format: integer example: 100 type: number - name: orderBy required: false in: query schema: type: string - name: id required: false in: query schema: example: '12345' type: string - name: fulfillmentStatus required: false in: query schema: example: fulfilled type: string enum: - fulfilled - partial - unfulfilled - cancelled - unknown - name: paymentStatus required: false in: query schema: example: approved type: string enum: - pending - approved - paid - failed - cancelled - refunded - unknown - name: status required: false in: query schema: example: cancelled type: string enum: - open - closed - cancelled - unknown - draft - name: startDate required: false in: query schema: example: '2014-04-25' type: string - name: endDate required: false in: query schema: example: '2014-04-25' type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/GetOrderResponseDto' '202': description: Data in pending state content: application/json: schema: $ref: '#/components/schemas/GetOrderResponseDto' '204': description: No data available '400': description: Bad Request Error - Thrown if fields sent via query does not follow specifications content: application/json: schema: $ref: '#/components/schemas/Error400ResponseDto' '401': description: Unauthorized - Not logged in or log in expired content: application/json: schema: $ref: '#/components/schemas/Error401ResponseDto' '403': description: Forbidden - Not enough permission content: application/json: schema: $ref: '#/components/schemas/Error403ResponseDto' '500': description: Server Error content: application/json: schema: $ref: '#/components/schemas/Error500ResponseDto' security: - bearer: [] summary: Order tags: - Order x-summary-source: derived components: schemas: Balance: type: object properties: amount: type: string example: 2.2 format: float date: format: date-time type: string example: '2022-03-11T11:29:03-05:00' Error401Dto: type: object properties: statusCode: type: number readOnly: true example: 401 message: readOnly: true example: - Unauthorized type: array items: type: string error: type: string readOnly: true example: Unauthorized required: - statusCode - message - error BasicStartEndDateReportMetaData: type: object properties: reportId: readOnly: true example: - 5fad8a342a88364234392fb5 type: array items: type: string serviceName: type: string readOnly: true example: xero enum: - freshbooks - quickbooks - quickbooksDesktop - xero - oracleNetsuite - sageBusinessCloud - sageIntacct - dynamicsBusinessCentral - dynamics365Finance - wave - myob - zohoBooks - byod businessName: type: string readOnly: true example: Railz createdAt: type: string readOnly: true example: '2020-11-25T01:02:03Z' format: date-time updatedAt: type: string example: '2020-11-30T01:02:03Z' format: date-time readOnly: false startDate: type: string readOnly: true example: '2020-11-25T01:02:03Z' format: date-time endDate: type: string readOnly: true example: '2020-11-30T01:02:03Z' format: date-time required: - reportId - serviceName - businessName - createdAt - updatedAt - startDate - endDate OrderTransactionSourceRefs: type: object properties: id: type: string example: '699519475' type: type: string example: payment enum: - failedPayout - payment - paymentFee - paymentFeeRefund - payout - refund - transfer - dispute - order - other - unknown totalAmount: type: number example: '50.00' format: float required: - id - totalAmount Lines: type: object properties: id: type: string example: '466157049' balances: type: array items: $ref: '#/components/schemas/Balance' accountRef: $ref: '#/components/schemas/AccountRef' customerRef: $ref: '#/components/schemas/AccountRef' trackingCategoryRefs: type: array items: $ref: '#/components/schemas/TrackingCategoryResponse' Error400ResponseDto: type: object properties: error: readOnly: true allOf: - $ref: '#/components/schemas/Error400Dto' payload: type: object readOnly: true required: - error - payload Error401ResponseDto: type: object properties: error: readOnly: true allOf: - $ref: '#/components/schemas/Error401Dto' payload: type: object readOnly: true example: {} required: - error - payload GetOrderData: type: object properties: id: type: string example: '450789469' orderNumber: type: string example: '1001' fulfillmentRefs: type: array items: $ref: '#/components/schemas/FulfillmentRefs' lines: type: array items: $ref: '#/components/schemas/Lines' refundRefs: type: array items: $ref: '#/components/schemas/RefundRefs' transactionSourceRefs: type: array items: $ref: '#/components/schemas/OrderTransactionSourceRefs' shippingAddress: $ref: '#/components/schemas/ShippingAddress' billingAddress: $ref: '#/components/schemas/BillingAddress' customerRef: $ref: '#/components/schemas/OrderCustomerRef' currencyRef: $ref: '#/components/schemas/CommerceCurrencyRef' totalShippingAmount: type: number example: 30 format: float totalGratuityAmount: type: number example: 4.87 format: float totalDiscountAmount: type: number example: 0 format: float totalTaxAmount: type: number example: 11.94 format: float totalAmount: type: number example: 598.94 format: float createdDate: format: date-time type: string example: '2022-03-11T11:29:03-05:00' sourceModifiedDate: format: date-time type: string example: '2022-03-11T11:29:03-05:00' status: type: string enum: - open - closed - cancelled - unknown - draft paymentStatus: type: string enum: - pending - approved - paid - failed - cancelled - refunded - unknown fulfillmentStatus: type: string enum: - fulfilled - partial - unfulfilled - cancelled - unknown required: - id - totalTaxAmount - totalAmount - createdDate - sourceModifiedDate - status - paymentStatus - fulfillmentStatus ShippingAddress: type: object properties: line1: type: string example: 1234 Park Street line2: type: string example: Suite 1000 city: type: string example: Toronto region: type: string example: 'ON' country: type: string example: CAN postalCode: type: string example: A0B1C2 Error400Dto: type: object properties: statusCode: type: number readOnly: true example: 400 message: readOnly: true example: - businessName cannot be null type: array items: type: string error: type: string readOnly: true example: Bad Request required: - statusCode - message - error GetOrderResponseDto: type: object properties: pagination: $ref: '#/components/schemas/PaginationMetaData' data: type: array items: $ref: '#/components/schemas/GetOrderData' count: type: number readOnly: true example: 1 format: integer meta: $ref: '#/components/schemas/BasicStartEndDateReportMetaData' required: - pagination - data - count - meta PaginationMetaData: type: object properties: offset: type: number readOnly: true limit: type: number readOnly: true count: type: number readOnly: true required: - offset - limit - count CommerceCurrencyRef: type: object properties: id: type: string symbol: type: string example: CAD name: type: string example: Canadian Dollar required: - symbol - name Error403ResponseDto: type: object properties: error: readOnly: true allOf: - $ref: '#/components/schemas/Error403Dto' payload: type: object readOnly: true example: {} required: - error - payload TrackingCategoryResponse: type: object properties: id: type: string example: '4040' readOnly: false name: type: string readOnly: false example: Region type: type: string example: class enum: - class - department - location - unknown RefundRefs: type: object properties: id: type: string example: 2 totalAmount: type: number example: 2 format: float required: - id - totalAmount OrderCustomerRef: type: object properties: id: type: string example: '207119551' customerName: type: string example: Amelia Earhart email: type: string example: Amelia.Earhart@example.com required: - id Error500Dto: type: object properties: error: type: string readOnly: true example: Internal Server Error message: readOnly: true example: - INTERNAL_ERROR type: array items: type: string statusCode: type: number readOnly: true example: 500 required: - error - message - statusCode FulfillmentRefs: type: object properties: carrier: type: string example: USPS trackingNumber: type: string example: 1Z2345 service: type: string example: manual trackingUrl: type: string example: https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=1Z2345 Error403Dto: type: object properties: statusCode: type: number readOnly: true example: 403 message: readOnly: true example: - Forbidden resource type: array items: type: string error: type: string readOnly: true example: Forbidden required: - statusCode - message - error BillingAddress: type: object properties: line1: type: string example: 1234 Park Street line2: type: string example: Suite 1000 city: type: string example: Toronto region: type: string example: 'ON' country: type: string example: CAN postalCode: type: string example: A0B1C2 AccountRef: type: object properties: id: type: string example: '145' name: type: string example: Example account required: - id Error500ResponseDto: type: object properties: error: readOnly: true allOf: - $ref: '#/components/schemas/Error500Dto' payload: type: object readOnly: true required: - error - payload securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http