{"openapi":"3.0.1","info":{"title":"NeoMiners Partner API","description":"The **NeoMiners Partner API** lets a partner register its customers, buy **fractional hashrate** for them and follow the machines that result, programmatically. Everything is scoped to the partner that owns the API key: a partner can only ever see and change its own customers, orders and machines.\n\n## Authentication\nSend your partner key on **every** request:\n\n```\nX-Partner-Key: <your key>\n```\n\nKeys are issued by NeoMiners and are shown once at creation. A missing, wrong or deactivated key is rejected with **HTTP 403**. Keep the key on your server; never ship it in a browser or mobile app.\n\n## Typical integration flow\n1. **Register a customer** - `POST /api/partner/customers`. Send the customer's **email** (they will use it to sign in to your customer portal) and, if you have it, the BTC `payoutAddress`. A rewards account is created for the customer straight away. Store the returned `id` (a UUID); it identifies the customer in every later call.\n2. **Look up what you can buy** - `GET /api/partner/hosting-plans`, then `GET /api/partner/prices/fractional`.\n3. **Place an order** - `POST /api/partner/orders` with `machineType` `FRACTIONAL` and the `hashRateQty` you want per machine. The machines are created and assigned to the customer immediately.\n4. **Start the machine** - `POST /api/partner/machines/configure` with status `ON`. `workerId` can be left out: it is created from the customer's rewards account.\n5. **Follow it** - `GET /api/partner/orders/{orderReference}`, `GET /api/partner/customers/{customerId}/machines`.\n\n## Customers and rewards\n- `PUT /api/partner/customers/{customerId}/payout-address` sets or changes the BTC address rewards are paid to. Rewards are paid to the address that is current when the payout runs.\n- `PUT /api/partner/customers/{customerId}/portal-access` switches a customer's access to your customer portal on or off.\n- `POST /api/partner/customers/{customerId}/pool-sync` retries the rewards account setup if it is not READY.\n\n## Conventions\n- Amounts are in **USD**. Identifiers for customers are **UUID strings**.\n- Errors from validation, conflicts and payment failures are JSON: `{\"error\": \"message\"}`.\n- `404` responses have an empty body: the resource does not exist **or does not belong to your partner account** (the two are deliberately indistinguishable).\n- Use the `orderReference` idempotency key on orders and retry safely on network errors.\n","contact":{"name":"NeoMiners Partner Support"},"version":"1.0.0"},"servers":[{"url":"/","description":"NeoMiners API"}],"security":[{"partnerKeyHeader":[]}],"tags":[{"name":"Pricing","description":"Fractional prices and the hosting plans assigned to the partner"},{"name":"Account","description":"Partner balance and ledger"},{"name":"Orders","description":"Fractional hashrate orders and order status"},{"name":"Machines","description":"The machines bought, and starting or stopping them"},{"name":"Customers","description":"Customers, their rewards accounts, payout addresses and portal access"}],"paths":{"/api/partner/customers/{customerId}":{"get":{"tags":["Customers"],"summary":"Get a partner customer","description":"Includes `poolProvisioning`, `payoutStatus` and `payoutAddress`, so you can see whether the customer's rewards account and payout address are ready.","operationId":"getCustomer","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"}}},"put":{"tags":["Customers"],"summary":"Update a partner customer","operationId":"updateCustomer","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCustomerRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"},"400":{"description":"Invalid or incomplete request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}}}}},"/api/partner/customers/{customerId}/portal-access":{"put":{"tags":["Customers"],"summary":"Allow or stop a customer's access to the Customer API","description":"`enabled: false` stops the customer from using the Customer API at once, even with a sign-in that is still valid. `enabled: true` allows it again.","operationId":"setPortalAccess","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalAccessRequest"}}},"required":true},"responses":{"400":{"description":"`enabled` is missing","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}},"200":{"description":"Updated; see `portalAccess`","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomer"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"}}}},"/api/partner/customers/{customerId}/payout-address":{"put":{"tags":["Customers"],"summary":"Set a customer's BTC payout address","description":"Sets or changes the mainnet BTC address (legacy, native SegWit or Taproot) the customer's rewards are paid to. Intended for support use: customers cannot change it themselves. Sending the address that is already set changes nothing.\n\nRewards are paid to the address that is current when the payout runs, so changing it also redirects rewards that were earned but not yet paid. Rewards earned before any address existed are paid once one is set.\n\nIf the pool is slow or unavailable `payoutStatus` is `PENDING_SYNC` and the address is written automatically within about a minute.","operationId":"setPayoutAddress","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutAddressRequest"}}},"required":true},"responses":{"200":{"description":"Address saved; see `payoutStatus`","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomer"}}}},"409":{"description":"Rewards accounts are not enabled for this partner","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}},"400":{"description":"Missing address, or not a valid mainnet BTC address","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"}}}},"/api/partner/orders":{"get":{"tags":["Orders"],"summary":"List partner orders","operationId":"getOrders","parameters":[{"name":"status","in":"query","description":"Filter by order status","required":false,"schema":{"type":"string","enum":["PENDING","COMPLETED","FAILED"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"}}},"post":{"tags":["Orders"],"summary":"Place a fractional hashrate order","description":"Buys fractional hashrate for one of your customers. Every line needs `machineType` `FRACTIONAL`, the `hashRateQty` per machine and the `customerId`. The machines are created and assigned to the customer straight away; start them with `POST /api/partner/machines/configure`.","operationId":"placeOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOrderRequest"}}},"required":true},"responses":{"200":{"description":"Order accepted","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerOrderResponse"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"400":{"description":"Invalid or incomplete request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}}}}},"/api/partner/machines/configure":{"post":{"tags":["Machines"],"summary":"Configure partner machines","description":"Batch-updates worker IDs and ON/OFF state for machines owned by the authenticated Partner. SEGMENT and SEG_POOL are applied automatically. Each item is processed independently and reports success or failure in the response.","operationId":"configureMachines","requestBody":{"description":"Machine configuration changes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartnerMachineConfigureRequest"}}}},"required":true},"responses":{"200":{"description":"One configuration result per request item","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartnerMachineConfigureResult"}}}}},"400":{"description":"Missing or invalid batch request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}},"403":{"description":"Missing or invalid X-Partner-Key"}}}},"/api/partner/customers":{"get":{"tags":["Customers"],"summary":"Search partner customers","description":"Lists customers belonging to the authenticated Partner. Each result includes wallet balance, miner counts, rated hashrate totals grouped by unit, and order count.","operationId":"searchCustomers","parameters":[{"name":"key","in":"query","description":"Optional case-insensitive text matched against name, email, or phone number","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Matching Partner Customers","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartnerCustomer"}}}}},"403":{"description":"Missing or invalid X-Partner-Key"}}},"post":{"tags":["Customers"],"summary":"Create a partner customer","description":"Registers a customer under the authenticated Partner. `name` is required; `email` and `phoneNumber` are optional (the email is required for partners whose customers sign in to the Customer API, and must be unique per partner: to find an existing customer by email use `GET /api/partner/customers?key=<email>`). Store the returned `id` (UUID): it identifies the customer in every later call.\n\nFor partners with rewards accounts enabled, a rewards account in the mining pool is created for the customer straight away, and `payoutAddress` (optional) is set as the BTC address rewards are paid to. If the pool is slow or unavailable the customer is still created and `poolProvisioning` is `PENDING`; it is retried automatically about once a minute.","operationId":"createCustomer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCustomerRequest"}}},"required":true},"responses":{"201":{"description":"Customer created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomer"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"400":{"description":"Invalid or incomplete request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}}}}},"/api/partner/customers/{customerId}/pool-sync":{"post":{"tags":["Customers"],"summary":"Retry a customer's rewards account setup","description":"Use when `poolProvisioning` or `payoutStatus` is `FAILED`, after the cause is fixed (for a refused address, send a new one with PUT .../payout-address instead). Moves FAILED back to pending and tries again immediately.","operationId":"retryPoolSync","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Retried; see `poolProvisioning` and `payoutStatus`","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomer"}}}},"409":{"description":"Rewards accounts are not enabled for this partner","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"},"400":{"description":"Invalid or incomplete request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}}}}},"/api/partner/customers/{customerId}/finance/report/worker":{"post":{"tags":["Customers"],"summary":"Get a partner customer's worker financial report","description":"Returns the Cminer worker financial report restricted to machines currently allocated to the specified Partner Customer. fromTime and toTime use yyyy-MM-dd; pagination is one-based and size is limited to 500. customerIds, resellerIds, and segmentsUserId from the shared finance request are ignored, so they cannot widen the customer scope.","operationId":"getCustomerWorkerFinanceReport","parameters":[{"name":"customerId","in":"path","description":"Partner Customer UUID","required":true,"schema":{"type":"string"},"example":"46b9e4c1-06e8-4ac4-a2b7-9b17ce34fc76"}],"requestBody":{"description":"Finance filters. Required: fromTime, toTime, page, and size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceSearchRequestDto"}}},"required":true},"responses":{"403":{"description":"Missing or invalid X-Partner-Key"},"404":{"description":"Customer does not exist or does not belong to the authenticated Partner"},"400":{"description":"Invalid dates, pagination, grouping, sorting, or filters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PartnerCustomerWalletApiError"}}}},"200":{"description":"Scoped worker financial report","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FinanceSearchResponseDto"}}}}}}},"/api/partner/prices/fractional":{"get":{"tags":["Pricing"],"summary":"List fractional machine prices","operationId":"getFractionalPrices","parameters":[{"name":"hostingRate","in":"query","required":false,"schema":{"type":"number","format":"double"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"}}}},"/api/partner/orders/{orderReference}":{"get":{"tags":["Orders"],"summary":"Get an order by reference","operationId":"getOrder","parameters":[{"name":"orderReference","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"}}}},"/api/partner/machines":{"get":{"tags":["Machines"],"summary":"List partner machines","operationId":"getMachines","parameters":[{"name":"status","in":"query","description":"Filter by machine status","required":false,"schema":{"type":"string","enum":["NEW","ON","OFF"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"}}}},"/api/partner/ledger":{"get":{"tags":["Account"],"summary":"Get partner ledger","operationId":"getLedger","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"}}}},"/api/partner/hosting-plans":{"get":{"tags":["Pricing"],"summary":"List assigned hosting plans","description":"Returns the authenticated Partner's active assigned hosting rates in ascending order. Each value is a USD/kWh rate that may be supplied as hostingRate when querying prices.","operationId":"getAssignedHostingPlans","responses":{"200":{"description":"Assigned hosting rates, or an empty array","content":{"*/*":{"schema":{"type":"array","items":{"type":"number","format":"double","example":0.058}}}}},"403":{"description":"Missing or invalid X-Partner-Key"}}}},"/api/partner/customers/{customerId}/orders":{"get":{"tags":["Orders"],"summary":"List a customer's orders","operationId":"getCustomerOrders","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"}}}},"/api/partner/customers/{customerId}/machines":{"get":{"tags":["Machines"],"summary":"List a customer's machines","operationId":"getCustomerMachines","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"},"404":{"description":"Not found, or not owned by the authenticated partner"}}}},"/api/partner/balance":{"get":{"tags":["Account"],"summary":"Get partner balance","operationId":"getBalance","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Missing, invalid or deactivated X-Partner-Key"}}}}},"components":{"schemas":{"PartnerCustomerRequest":{"required":["name"],"type":"object","properties":{"name":{"type":"string","example":"Example Customer"},"email":{"type":"string","example":"customer@example.com"},"phoneNumber":{"type":"string","example":"+971501234567"},"isActive":{"type":"boolean","description":"Whether this Partner Customer may be used for new operations","example":true},"payoutAddress":{"type":"string","description":"Optional. Mainnet BTC address the customer's rewards are paid to (legacy, native SegWit or Taproot). Only for partners with rewards accounts enabled. Create only: to change it later use PUT /api/partner/customers/{customerId}/payout-address.","example":"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"}}},"PortalAccessRequest":{"required":["enabled"],"type":"object","properties":{"enabled":{"type":"boolean","description":"false stops the customer from using the Customer API at once; true allows it again","example":true}}},"PartnerCustomerWalletApiError":{"type":"object","properties":{"error":{"type":"string","example":"amountUsd must be positive."},"balanceUsd":{"type":"number","description":"Current source-wallet balance; returned for insufficient-funds responses.","example":125.0}}},"PartnerCustomer":{"type":"object","properties":{"id":{"type":"string","example":"46b9e4c1-06e8-4ac4-a2b7-9b17ce34fc76"},"name":{"type":"string","example":"Example Customer"},"email":{"type":"string","example":"customer@example.com"},"phoneNumber":{"type":"string","example":"+971501234567"},"isActive":{"type":"boolean"},"poolProvisioning":{"type":"string","description":"State of the customer's rewards account in the mining pool. NONE: the partner does not use rewards accounts. PENDING: being set up, retried automatically. READY: usable. FAILED: refused, see POST /api/partner/customers/{customerId}/pool-sync.","example":"READY","enum":["NONE","PENDING","READY","FAILED"]},"portalAccess":{"type":"string","description":"Whether the customer may sign in to the Customer API. Only meaningful for partners with the customer portal enabled.","example":"ENABLED","enum":["ENABLED","DISABLED"]},"payoutAddress":{"type":"string","description":"BTC address the customer's rewards are paid to","nullable":true},"payoutStatus":{"type":"string","description":"NONE: no address. PENDING_SYNC: saved, being written to the pool, retried automatically. SET: the pool pays this address. FAILED: the pool refused it; send a new address.","example":"SET","enum":["NONE","PENDING_SYNC","SET","FAILED"]},"lastLoginAt":{"type":"string","description":"Last time the customer signed in to the Customer API","format":"date-time","nullable":true},"totalMiners":{"type":"integer","description":"Assigned machine count. Populated by GET /api/partner/customers.","format":"int64","nullable":true},"minersOnline":{"type":"integer","description":"Assigned machines currently ON with an active pool. Populated by GET /api/partner/customers.","format":"int64","nullable":true},"totalHashrate":{"type":"object","additionalProperties":{"type":"number","description":"Rated hashrate totals keyed by unit, such as TH or PH. Populated by GET /api/partner/customers.","format":"double","nullable":true},"description":"Rated hashrate totals keyed by unit, such as TH or PH. Populated by GET /api/partner/customers.","nullable":true,"example":{"TH":238.0}},"totalOrderCount":{"type":"integer","description":"Completed orders for this customer. Populated by GET /api/partner/customers.","format":"int64","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"PayoutAddressRequest":{"required":["address"],"type":"object","properties":{"address":{"type":"string","description":"Mainnet BTC address (legacy, native SegWit or Taproot). Testnet addresses are rejected.","example":"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"}}},"PartnerOrderLine":{"type":"object","properties":{"machineModelId":{"type":"integer","description":"Machine model id from GET /api/partner/prices/fractional","format":"int32","example":42},"count":{"type":"integer","description":"Number of machines","format":"int32","example":2},"machineType":{"type":"string","description":"Required. Always FRACTIONAL.","example":"FRACTIONAL","enum":["FRACTIONAL"]},"hashRateQty":{"type":"number","description":"Required. Hash rate PER MACHINE, in the model's hash unit.","format":"double","example":500},"hostingRate":{"type":"number","description":"Hosting rate; must be one of the partner's configured tiers","format":"double","example":0.065},"billingScheme":{"type":"string","description":"Required. How hosting is billed: MONTHLY or AUTO_SETTLEMENT.","example":"MONTHLY","enum":["MONTHLY","AUTO_SETTLEMENT"]},"customerId":{"type":"string","description":"Required. Id of one of the partner's own customers (see /api/partner/customers)."}}},"PartnerOrderRequest":{"type":"object","properties":{"orderReference":{"type":"string","description":"Idempotency key, unique per partner. Retrying with the same payload replays the original response; reuse with a different payload is rejected.","example":"PARTNER-ORD-123"},"expectedTotalUsd":{"type":"number","description":"Expected tax-inclusive grand total, as computed from GET /api/partner/prices/fractional. The order is rejected with 409 if the server-side total differs.","example":12345.67},"lines":{"type":"array","items":{"$ref":"#/components/schemas/PartnerOrderLine"}}}},"OrderInvoiceResult":{"type":"object","properties":{"invoiceId":{"type":"integer","format":"int32"},"invoiceType":{"type":"string"},"prepaidPromotionVersion":{"type":"integer","format":"int64"},"prepaidPromotionCreditUsd":{"type":"number"},"machineIds":{"type":"array","items":{"type":"integer","format":"int32"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/PartnerOrderItem"}}}},"PartnerOrderItem":{"type":"object","properties":{"machineModelId":{"type":"integer","format":"int32"},"modelName":{"type":"string"},"machineType":{"type":"string","description":"PHYSICAL or FRACTIONAL"},"qty":{"type":"integer","format":"int32"},"hashRateQty":{"type":"number","format":"double"},"hostingRate":{"type":"number","format":"double"},"customerHostingRate":{"type":"number","format":"double"},"billingScheme":{"type":"string"},"customerId":{"type":"string"},"customerName":{"type":"string"},"unitPriceUsd":{"type":"number"},"lineTotalUsd":{"type":"number"},"prepaidPromotionCreditPerMachineUsd":{"type":"number"},"machineIds":{"type":"array","items":{"type":"integer","format":"int32"}}}},"PartnerOrderResponse":{"type":"object","properties":{"orderReference":{"type":"string"},"status":{"type":"string"},"subtotalUsd":{"type":"number"},"taxUsd":{"type":"number"},"debitedUsd":{"type":"number"},"balanceUsd":{"type":"number"},"prepaidPromotionVersion":{"type":"integer","format":"int64"},"prepaidPromotionCreditUsd":{"type":"number"},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/OrderInvoiceResult"}}}},"PartnerMachineConfigureRequest":{"required":["machineId","status"],"type":"object","properties":{"machineId":{"type":"integer","description":"Id of a machine owned by the Partner (see GET /api/partner/machines)","format":"int32","example":100},"workerId":{"type":"string","description":"Worker id; required (non-empty) when turning a machine ON. Optional for partners with rewards accounts enabled: the machine keeps the worker id it already has, otherwise one is created from the assigned customer's rewards account (that account must be READY).","example":"worker-001"},"status":{"type":"string","description":"Requested machine state","example":"ON","enum":["ON","OFF"]}}},"PartnerMachineConfigureResult":{"type":"object","properties":{"machineId":{"type":"integer","format":"int32","example":100},"workerId":{"type":"string","example":"worker-001"},"status":{"type":"string","description":"Machine status after the update","enum":["ON","OFF"]},"success":{"type":"boolean","description":"Whether this item was applied successfully","example":true},"reason":{"type":"string","description":"Failure explanation for this item; null on success","example":"Machine does not belong to this partner"}}},"FinanceSearchRequestDto":{"type":"object","properties":{"customerIds":{"type":"array","items":{"type":"integer","format":"int32"}},"modelIds":{"type":"array","items":{"type":"integer","format":"int32"}},"resellerIds":{"type":"array","items":{"type":"integer","format":"int32"}},"fromTime":{"type":"string"},"toTime":{"type":"string"},"searchKey":{"type":"string"},"host":{"type":"string"},"dummy":{"type":"boolean"},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"type":"object","additionalProperties":{"type":"string","enum":["ASC","DESC"]}},"groupBy":{"type":"array","items":{"type":"string"}},"invoiceType":{"type":"string"},"segmentsUserId":{"type":"string"},"billingScheme":{"type":"string"},"machineType":{"type":"string"}}},"FinanceGroupResultDto":{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"machineId":{"type":"integer","format":"int32"},"machineConfig":{"type":"integer","format":"int32"},"machineModelName":{"type":"string"},"currency":{"type":"string"},"spend":{"type":"number","format":"double"},"expenseDate":{"type":"string","format":"date-time"},"workerEngine":{"type":"string"},"uptimeInHours":{"type":"integer","format":"int32"},"hostingRate":{"type":"number","format":"double"},"power":{"type":"number","format":"double"},"totalCharge":{"type":"number","format":"double"},"customerId":{"type":"integer","format":"int32"},"resellerId":{"type":"integer","format":"int32"},"spendInUsd":{"type":"number","format":"double"},"spendInBtc":{"type":"number","format":"double"},"totalChargeInBtc":{"type":"number","format":"double"},"markup":{"type":"number","format":"double"},"dummy":{"type":"boolean"},"hostingBillingScheme":{"type":"string"},"machineType":{"type":"string"},"hashRate":{"type":"number","format":"double"},"hashUnit":{"type":"string"}}},"FinanceSearchResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FinanceGroupResultDto"}},"currentPage":{"type":"integer","format":"int32"},"totalItems":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"fields":{"type":"array","items":{"type":"string"}},"sort":{"type":"object","additionalProperties":{"type":"string","enum":["ASC","DESC"]}},"groups":{"type":"array","items":{"type":"string"}},"btc":{"type":"number","format":"double"},"total":{"type":"object","additionalProperties":{"type":"string"}},"request":{"$ref":"#/components/schemas/FinanceSearchRequestDto"}}}},"securitySchemes":{"partnerKeyHeader":{"type":"apiKey","description":"Partner API key header","name":"X-Partner-Key","in":"header"}}}}