Self-serve contractor payments

Self Serve Get Invoice Details

Returns an invoice for admin review with display line items, USD equivalent, parties and payout read model.

GEThttps://api.toku.com/hris/self-serve-get-invoice-details

Required scope: invoices:read. It also needs banking:read, compensation:read.

curl --request GET \
  --url 'https://api.toku.com/hris/self-serve-get-invoice-details?invoiceID=%3CinvoiceID%3E' \
  --header 'Authorization: Bearer <token>'
200 response
{
  "invoice": {
    "invoicePaymentID": "string",
    "invoiceVersion": "string",
    "approvalRevision": 0,
    "invoiceNumber": "string",
    "invoiceDate": "string",
    "dueDate": "string",
    "totalAmount": "string",
    "currencyCode": "string",
    "status": "string",
    "contractorName": "string",
    "contractorEmail": "string",
    "submissionTimestamp": "string",
    "reason": "string",
    "rejectionReason": "string",
    "autoApproved": true,
    "lineItems": [
      {
        "invoicePaymentLineItemID": "string",
        "description": "string",
        "quantity": 0,
        "unitPrice": 0,
        "amount": 0,
        "taxAmount": 0,
        "discountAmount": 0,
        "total": 0,
        "category": "string",
        "paymentMethodType": "BANK_TRANSFER",
        "hrisBankAccountID": "string",
        "cryptoCurrency": "string",
        "cryptoNetwork": "string",
        "merchant": "string",
        "spentAmount": "string",
        "spentCurrencyCode": "string",
        "fxRate": "string",
        "expensedDate": "string"
      }
    ],
    "notes": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "approvalRouting": {
      "invoiceVersion": "string",
      "steps": [
        {
          "stepOrder": 0,
          "kind": "string",
          "approverName": "string",
          "fallsBackToAdmins": true,
          "state": "approved",
          "approvedByName": "string",
          "approvedByOverride": true
        }
      ],
      "currentStepOrder": 0,
      "requiredApprovals": 0,
      "approvalsCounted": 0,
      "waitingOn": "string"
    },
    "attachments": [
      {
        "id": "string",
        "fileName": "string",
        "fileKey": "string",
        "fileSize": 0,
        "mimeType": "string",
        "uploadedAt": "string"
      }
    ],
    "groupedTotals": {
      "bankTotals": [
        {
          "currencyCode": "string",
          "total": "string"
        }
      ],
      "cryptoTotals": [
        {
          "tokenSymbol": "string",
          "networkName": "string",
          "total": "string"
        }
      ]
    },
    "usdEquivalent": 0,
    "submissionConversion": {
      "sourceCurrencyCode": "string",
      "targetAmount": "string",
      "targetCurrencyCode": "string",
      "rate": "string",
      "rateSource": "string",
      "rateTimestamp": "string"
    },
    "isPaymentBatchEligible": true,
    "isTokuContractorCryptoInvoice": true,
    "billToName": "string",
    "billToAddressLines": [
      "string"
    ],
    "showTokuBranding": true,
    "billFrom": {
      "name": "string",
      "addressLines": [
        "string"
      ],
      "taxId": "string",
      "email": "string",
      "phone": "string"
    },
    "isLegacyInvoice": true,
    "duplicateCandidates": [
      {
        "invoicePaymentID": "string",
        "invoiceNumber": "string",
        "invoiceDate": "string",
        "totalAmount": "string",
        "currencyCode": "string",
        "status": "string",
        "matchType": "EXACT_AMOUNT"
      }
    ]
  },
  "payoutReadModel": {
    "source": "CANONICAL_PAYOUT",
    "payoutStatus": "NOT_PAID",
    "canonicalAvailable": true,
    "warnings": [
      "string"
    ],
    "legs": [
      {
        "legType": "FIAT",
        "status": "PENDING",
        "source": "string",
        "amount": "string",
        "expectedAmount": "string",
        "currencyCode": "string",
        "paidAt": "string",
        "proofReference": "string",
        "transactionHash": "string",
        "transactionLink": "string",
        "paymentRecordID": "string",
        "destinationName": "string",
        "destinationAddress": "string",
        "tokenSymbol": "string",
        "tokenAddress": "string",
        "networkName": "string"
      }
    ]
  }
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Query parameters

invoiceIDstring<uuid>required

Response

200Successful response
invoiceobjectrequired
Show child attributes
invoicePaymentIDstringrequired
invoiceVersionstringrequired
approvalRevisionnumber | null
invoiceNumberstring | null
invoiceDatestring | null
dueDatestring | null
totalAmountstring | null
currencyCodestring | null
statusstring | null
contractorNamestring | null
contractorEmailstring | null
submissionTimestampstring | null
reasonstring | null
rejectionReasonstring | null
autoApprovedboolean | null
lineItemsarray | null
Show child attributes
invoicePaymentLineItemIDstring | null
descriptionstring | null
quantitynumber | null
unitPricenumber | null
amountnumber | null
taxAmountnumber | null
discountAmountnumber | null
totalnumber | null
categorystring | null
paymentMethodTypestring | null

Available options: BANK_TRANSFER, CRYPTO_WALLET, null

hrisBankAccountIDstring | null
cryptoCurrencystring | null
cryptoNetworkstring | null
merchantstring | null
spentAmountstring | null
spentCurrencyCodestring | null
fxRatestring | null
expensedDatestring | null
billToSnapshotany
notesstring | null
createdAtstring | null
updatedAtstring | null
approvalRoutingobject | null
Show child attributes
invoiceVersionstring | null
stepsarray | null
Show child attributes
stepOrdernumber | null
kindstring | null
approverNamestring | null
fallsBackToAdminsboolean | null
statestring | null

Available options: approved, current, waiting, null

approvedByNamestring | null
approvedByOverrideboolean | null
currentStepOrdernumber | null
requiredApprovalsnumber | null
approvalsCountednumber | null
waitingOnstring | null
attachmentsarray | null
Show child attributes
idstring | null
fileNamestring | null
fileKeystring | null
fileSizenumber | null
mimeTypestring | null
uploadedAtstring | null
groupedTotalsobject | null
Show child attributes
bankTotalsarray | null
Show child attributes
currencyCodestring | null
totalstring | null
cryptoTotalsarray | null
Show child attributes
tokenSymbolstring | null
networkNamestring | null
totalstring | null
usdEquivalentnumber | null
submissionConversionobject | null
Show child attributes
sourceCurrencyCodestring | null
targetAmountstring | null
targetCurrencyCodestring | null
ratestring | null
rateSourcestring | null
rateTimestampstring | null
isPaymentBatchEligibleboolean | null
isTokuContractorCryptoInvoiceboolean | null
billToNamestring | null
billToAddressLinesarray | null
showTokuBrandingboolean | null
billFromobject | null
Show child attributes
namestring | null
addressLinesarray | null
taxIdstring | null
emailstring | null
phonestring | null
isLegacyInvoiceboolean | null
duplicateCandidatesarray | null
Show child attributes
invoicePaymentIDstring | null
invoiceNumberstring | null
invoiceDatestring | null
totalAmountstring | null
currencyCodestring | null
statusstring | null
matchTypestring | null

Available options: EXACT_AMOUNT, SIMILAR_AMOUNT, null

payoutReadModelobjectrequired
Show child attributes
sourcestringrequired

Available options: CANONICAL_PAYOUT, TOKEN_SETTLEMENT, LEGACY_CONTRACTOR_INVOICE, TRANSACTION_DETAILS, QUEUE_SETTLEMENT_REASON, STATUS_ONLY

payoutStatusstringrequired

Available options: NOT_PAID, PARTIALLY_PAID, PAID

canonicalAvailablebooleanrequired
warningsstring[]required
legsobject[]required
Show child attributes
legTypestringrequired

Available options: FIAT, CRYPTO

statusstringrequired

Available options: PENDING, PAID, FAILED, CANCELLED

sourcestringrequired
amountstring | null
expectedAmountstring | null
currencyCodestring | null
paidAtstring | null
proofReferencestring | null
transactionHashstring | null
transactionLinkstring | null
paymentRecordIDstring | null
destinationNamestring | null
destinationAddressstring | null
destinationSnapshotany
tokenSymbolstring | null
tokenAddressstring | null
networkNamestring | null
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits