@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Finances API
@base https://apiz.ebay.com/sell/finances/v1
@version v1.19.0
@auth OAuth2
@endpoints 11
@toc order_earnings(2), order_earnings_summary(1), payout(2), payout_summary(1), seller_funds_summary(1), transaction(1), transaction_summary(1), transfer(1), billing_activity(1)

@group order_earnings
@endpoint GET /order_earnings
@required {X-EBAY-C-MARKETPLACE-ID: str}
@optional {filter: str, limit: str, offset: str, sort: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), orders: [map], prev: str, total: int(int32)}
@errors {400, 500}

@endpoint GET /order_earnings/{order_id}
@required {X-EBAY-C-MARKETPLACE-ID: str, order_id: str}
@returns(200) {buyer: map{userId: str, username: str}, orderCreationDate: str, orderEarningsSummary: map{expenses: map{currency: str, donations: [map], marketplaceFees: [map], shippingLabels: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, value: str}, grossAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, orderEarnings: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, refunds: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}}, orderId: str, orderLastModifiedDate: str, orderSummary: map{discounts: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, itemSubtotal: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, sellerCollectedTaxes: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, shippingAndHandlingCosts: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}}}
@errors {400, 404, 500}

@endgroup

@group order_earnings_summary
@endpoint GET /order_earnings_summary
@required {X-EBAY-C-MARKETPLACE-ID: str}
@optional {filter: str}
@returns(200) {expenses: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, grossAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, orderCount: map, orderEarnings: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, refunds: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}}
@errors {400, 500}

@endgroup

@group payout
@endpoint GET /payout/{payout_Id}
@required {X-EBAY-C-MARKETPLACE-ID: str, payout_Id: str}
@returns(200) {amount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, bankReference: str, lastAttemptedPayoutDate: str, payoutDate: str, payoutId: str, payoutInstrument: map{accountLastFourDigits: str, instrumentType: str, nickname: str, payoutPercentage: str}, payoutMemo: str, payoutReference: str, payoutStatus: str, payoutStatusDescription: str, totalAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, totalFee: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, totalFeeDetails: [map], transactionCount: int(int32)}
@errors {400, 404, 500}

@endpoint GET /payout
@required {X-EBAY-C-MARKETPLACE-ID: str}
@optional {filter: str, limit: str, offset: str, sort: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), payouts: [map], prev: str, total: int(int32)}
@returns(204)
@errors {400, 500}

@endgroup

@group payout_summary
@endpoint GET /payout_summary
@required {X-EBAY-C-MARKETPLACE-ID: str}
@optional {filter: str}
@returns(200) {amount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, payoutCount: int(int32), transactionCount: int(int32)}
@errors {400, 500}

@endgroup

@group seller_funds_summary
@endpoint GET /seller_funds_summary
@required {X-EBAY-C-MARKETPLACE-ID: str}
@returns(200) {availableFunds: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, fundsOnHold: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, processingFunds: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, totalFunds: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}}
@returns(204)
@errors {500}

@endgroup

@group transaction
@endpoint GET /transaction
@required {X-EBAY-C-MARKETPLACE-ID: str}
@optional {filter: str, limit: str, offset: str, sort: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32), transactions: [map]}
@returns(204)
@errors {400, 500}

@endgroup

@group transaction_summary
@endpoint GET /transaction_summary
@required {X-EBAY-C-MARKETPLACE-ID: str}
@optional {filter: str}
@returns(200) {adjustmentAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, adjustmentBookingEntry: str, adjustmentCount: int(int32), balanceTransferAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, balanceTransferBookingEntry: str, balanceTransferCount: int(int32), creditAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, creditBookingEntry: str, creditCount: int(int32), disputeAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, disputeBookingEntry: str, disputeCount: int(int32), loanRepaymentAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, loanRepaymentBookingEntry: str, loanRepaymentCount: int(int32), nonSaleChargeAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, nonSaleChargeBookingEntry: str, nonSaleChargeCount: int(int32), onHoldAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, onHoldBookingEntry: str, onHoldCount: int(int32), purchaseAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, purchaseBookingEntry: str, purchaseCount: int(int32), refundAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, refundBookingEntry: str, refundCount: int(int32), shippingLabelAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, shippingLabelBookingEntry: str, shippingLabelCount: int(int32), transferAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, transferBookingEntry: str, transferCount: int(int32), withdrawalAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, withdrawalBookingEntry: str, withdrawalCount: int(int32)}
@errors {400, 500}

@endgroup

@group transfer
@endpoint GET /transfer/{transfer_Id}
@required {X-EBAY-C-MARKETPLACE-ID: str, transfer_Id: str}
@returns(200) {fundingSource: map{brand: str, memo: str, type: str}, transactionDate: str, transferAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, transferDetail: map{balanceAdjustment: map{adjustmentAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}, adjustmentType: str}, charges: [map], totalChargeNetAmount: map{convertedFromCurrency: str, convertedFromValue: str, convertedToCurrency: str, convertedToValue: str, currency: str, exchangeRate: str, value: str}}, transferId: str}
@errors {400, 404, 500}

@endgroup

@group billing_activity
@endpoint GET /billing_activity
@optional {Accept-Language: str, filter: str, limit: str, offset: str, sort: str}
@returns(200) {billingActivities: [map], count: int(int32), limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 500}

@endgroup

@end
