Reject expense report
Reject an expense report.
curl --request POST \
--url https://api.slash.com/expense-report/{expenseReportId}/reject \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reviewedByUserId": "<string>",
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reviewedByUserId: '<string>', reason: '<string>'})
};
fetch('https://api.slash.com/expense-report/{expenseReportId}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.slash.com/expense-report/{expenseReportId}/reject"
payload = {
"reviewedByUserId": "<string>",
"reason": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.slash.com/expense-report/{expenseReportId}/reject"
payload := strings.NewReader("{\n \"reviewedByUserId\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"expenseReport": {
"id": "<string>",
"legalEntityId": "<string>",
"submittedByUserId": "<string>",
"amountCents": 123,
"currency": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"destinationId": "<string>",
"submittedAt": "2023-11-07T05:31:56Z",
"status": "pending_review",
"timestamp": "2023-11-07T05:31:56Z",
"merchantV2Id": "<string>",
"customMerchantId": "<string>",
"memo": "<string>",
"fxRateToUsd": "<string>",
"fxRateUpdatedAt": "2023-11-07T05:31:56Z",
"noReceiptReason": "<string>",
"merchant": {
"type": "merchantV2",
"merchantV2": {
"$entity": "merchant_v2",
"id": "<string>",
"name": "<string>",
"isLive": true,
"isInstantCashback": true,
"metadata": {
"timestamp": "2023-11-07T05:31:56Z"
},
"heronId": "<string>",
"iconUrl": "<string>",
"logoUrl": "<string>",
"url": "<string>",
"merchantCategoryId": "<string>"
}
},
"documents": [
{
"document": {
"$entity": "document",
"id": "<string>",
"accountType": "legalEntity",
"accountId": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"status": "uploaded",
"accessLevel": "<string>",
"documentType": "business_entity",
"category": "document",
"timestamp": "<string>",
"filename": "<string>",
"error": "<string>",
"checksum": "<string>",
"tags": [
"<string>"
],
"documentSource": "uploaded",
"fileMetadata": {
"size": 123,
"type": "<string>"
}
},
"url": "<string>"
}
],
"aggregatedTransaction": {
"id": "<string>",
"date": "<string>",
"amount": {
"amount_cents": 123,
"currency": "USD"
},
"status": "pending"
},
"destination": {
"id": "<string>",
"accountName": "<string>",
"institution": {
"id": "<string>",
"name": "<string>"
},
"mask": "<string>",
"institutionLogo": "<string>"
},
"submittedByUser": {
"id": "<string>",
"name": {
"first": "<string>",
"last": "<string>",
"full": "<string>"
}
},
"reviewedByUser": {
"id": "<string>",
"name": {
"first": "<string>",
"last": "<string>",
"full": "<string>"
}
},
"review": {
"id": "<string>",
"expenseReportId": "<string>",
"decision": "approved",
"reviewedByUserId": "<string>",
"reviewedAt": "2023-11-07T05:31:56Z",
"timestamp": "2023-11-07T05:31:56Z",
"rejectionReason": "<string>"
}
}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}Authorizations
API key authentication for public API requests.
Keys come in two flavors:
- Legal-entity-scoped keys are pinned to a single legal entity. Minted via the dashboard under a specific entity; every request acts on that entity.
- User-scoped keys are pinned to a user and span every legal
entity that user has access to. Every request made with a
user-scoped key (except
GET /legal-entity, which lists the legal entities the user can access) must include anx-legal-entityheader naming the legal entity the request is operating on. Requests without the header are rejected with400. The authenticated user must have an active permission role on the supplied legal entity, otherwise the request is rejected with403.
Path Parameters
Body
Response
OK
An expense report with enriched metadata, stripped for public API consumption
Hide child attributes
Hide child attributes
The unique ID of the expense report
^expense_report_[a-z0-9]*The ID of the legal entity this expense report belongs to
^le_[a-z0-9]*The ID of the user who submitted this expense report
^u_[a-z0-9]*The expense amount in cents
ISO currency code (e.g., 'USD')
The date of the transaction being reimbursed
The user's bank account ID for payout
^ub_[a-z0-9]*When the expense report was submitted
Current status of the expense report
pending_review, cancelled, rejected, payment_processing, payment_completed, payment_failed Metadata timestamp
Reference to MerchantV2 registry (mutually exclusive with customMerchantId)
Reference to custom merchant (mutually exclusive with merchantV2Id)
^custom_merchant_[a-z0-9]*Description or notes for the expense
FX rate at submission time in format "1 USD = X foreign" (e.g., "7.0286" for CNY means 100 CNY / 7.0286 = $14.23 USD)
When the FX rate was captured
Reason for not having a receipt. Should only be set when this report has no receipt (expense report documents) associated with it.
The merchant associated with this expense (enriched from merchantV2Id or customMerchantId)
- ExpenseReportMerchant
- ExpenseReportMerchant
Hide child attributes
Hide child attributes
merchantV2 Hide child attributes
Hide child attributes
merchant_v2 Documents/receipts attached to this expense report with presigned URLs
Hide child attributes
Hide child attributes
The document metadata
Hide child attributes
Hide child attributes
document legalEntity, slashAccount, slashAccountGroup, loan, card, dispute, productApplication, ach, wire, adminNote, businessIdentity, subaccount, atomicInvestSleeve, atomicInvestAccount, accountingEntry, slashWalletAccount, slashWallet, affiliatePayoutProfile, user, resendEmail, notification, expenseReport, globalUsdAch, globalUsdWire, globalUsdSwift, globalUsdCrypto, featureAnnouncement uploaded, uploading, not_generated, generating, generated, error, deleted business_entity, user_identity, admin, affiliate_tax_document, transaction_monitoring_incident, document_translation, slash_statement, wire_ach, wire_ach_instruction, wire_ach_receipt, international_wire_receipt, sepa_instruction, fps_instruction, spei_instruction, bre_b_instruction, pay_by_slash_avatar, transaction_receipt, acquiring_dispute_policy, acquiring_dispute_evidence, bank_letter, transactions_export, dispute_form, accounting_receipt, reimbursement_receipt, bill_invoice, carrier_payment_confirmation, approval_policy_document, legal_entity_contact_tax_document, atomic_invest_document, custom_question, personal_bank_or_brokerage_statement, balance_sheet, cash_flow_statement, ar_ap_aging, tax_return, debt_schedule, other_supporting_document, beneficial_ownership_certificate, invoice, invoice_logo, brand_logo, column_customer_file, feature_announcement_image, proof_of_tax_residence, sms_attachment, venezuela_mercantile_registry, venezuela_rif_certificate, compliance_review, rfi_response, articles_of_incorporation, certificate_of_incorporation, bank_statement, certificate_of_good_standing, commercial_contract, domain_ownership_proof, ein_letter_proof, ein_pending_proof, entity_formation, financial_statements, invoice, licensing_information, operating_agreement, profit_loss_statement, receipt, ubo_involvement_proof, utility_bill, check_deposit_front, check_deposit_back, dba_proof, business_plan, pitch_deck, prospectus, marketing_materials, government_id_front, government_id_back, selfie, address_proof, admin_note document, statement uploaded, generated Presigned S3 URL for accessing the document
Minimal transaction summary for the payout
Hide child attributes
Hide child attributes
pending, pending_approval, pending_destination, settled, failed, refund, declined, dispute, canceled, returned, reversed, scheduled, in_review Minimal bank account info for the reimbursement destination
Hide child attributes
Hide child attributes
Base64 encoded institution logo
The user who submitted the expense report
Hide child attributes
Hide child attributes
The admin who reviewed the expense report
The review decision for this expense report (if reviewed)
Hide child attributes
Hide child attributes
The unique ID of the expense report review
^expense_report_review_[a-z0-9]*The ID of the expense report being reviewed
^expense_report_[a-z0-9]*The admin's decision on the expense report
approved, rejected The ID of the user who reviewed the expense report
^u_[a-z0-9]*When the review was made
Metadata timestamp
Reason for rejection (only set when decision is 'rejected')
curl --request POST \
--url https://api.slash.com/expense-report/{expenseReportId}/reject \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reviewedByUserId": "<string>",
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reviewedByUserId: '<string>', reason: '<string>'})
};
fetch('https://api.slash.com/expense-report/{expenseReportId}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.slash.com/expense-report/{expenseReportId}/reject"
payload = {
"reviewedByUserId": "<string>",
"reason": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.slash.com/expense-report/{expenseReportId}/reject"
payload := strings.NewReader("{\n \"reviewedByUserId\": \"<string>\",\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"expenseReport": {
"id": "<string>",
"legalEntityId": "<string>",
"submittedByUserId": "<string>",
"amountCents": 123,
"currency": "<string>",
"transactionDate": "2023-11-07T05:31:56Z",
"destinationId": "<string>",
"submittedAt": "2023-11-07T05:31:56Z",
"status": "pending_review",
"timestamp": "2023-11-07T05:31:56Z",
"merchantV2Id": "<string>",
"customMerchantId": "<string>",
"memo": "<string>",
"fxRateToUsd": "<string>",
"fxRateUpdatedAt": "2023-11-07T05:31:56Z",
"noReceiptReason": "<string>",
"merchant": {
"type": "merchantV2",
"merchantV2": {
"$entity": "merchant_v2",
"id": "<string>",
"name": "<string>",
"isLive": true,
"isInstantCashback": true,
"metadata": {
"timestamp": "2023-11-07T05:31:56Z"
},
"heronId": "<string>",
"iconUrl": "<string>",
"logoUrl": "<string>",
"url": "<string>",
"merchantCategoryId": "<string>"
}
},
"documents": [
{
"document": {
"$entity": "document",
"id": "<string>",
"accountType": "legalEntity",
"accountId": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"status": "uploaded",
"accessLevel": "<string>",
"documentType": "business_entity",
"category": "document",
"timestamp": "<string>",
"filename": "<string>",
"error": "<string>",
"checksum": "<string>",
"tags": [
"<string>"
],
"documentSource": "uploaded",
"fileMetadata": {
"size": 123,
"type": "<string>"
}
},
"url": "<string>"
}
],
"aggregatedTransaction": {
"id": "<string>",
"date": "<string>",
"amount": {
"amount_cents": 123,
"currency": "USD"
},
"status": "pending"
},
"destination": {
"id": "<string>",
"accountName": "<string>",
"institution": {
"id": "<string>",
"name": "<string>"
},
"mask": "<string>",
"institutionLogo": "<string>"
},
"submittedByUser": {
"id": "<string>",
"name": {
"first": "<string>",
"last": "<string>",
"full": "<string>"
}
},
"reviewedByUser": {
"id": "<string>",
"name": {
"first": "<string>",
"last": "<string>",
"full": "<string>"
}
},
"review": {
"id": "<string>",
"expenseReportId": "<string>",
"decision": "approved",
"reviewedByUserId": "<string>",
"reviewedAt": "2023-11-07T05:31:56Z",
"timestamp": "2023-11-07T05:31:56Z",
"rejectionReason": "<string>"
}
}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}{
"message": "<string>",
"name": "<string>",
"identifier": "<string>",
"rawStatus": 123,
"meta": {}
}