curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/bills/vendor-credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"received_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"amount": 123,
"expense_account_identifier": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>",
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
]
}
],
"external_id": "<string>",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_external_id": "<string>",
"allocations": [
{
"amount": 123,
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
],
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"status": "ACTIVE",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
]
},
"received_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"ledger_account": {
"id": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"name": "Current Assets",
"account_number": "4000",
"stable_name": {
"type": "StableName",
"stable_name": "CURRENT_ASSETS"
},
"normality": "CREDIT",
"account_type": {
"value": "ASSET",
"display_name": "Asset"
},
"account_subtype": {
"value": "BANK_ACCOUNTS",
"display_name": "Current Assets"
}
},
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
]
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
],
"external_id": "<string>",
"allocations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"deleted_at": "2023-11-07T05:31:56Z",
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>"
}Creates a new vendor credit for a business.
curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/bills/vendor-credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"received_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"amount": 123,
"expense_account_identifier": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>",
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
]
}
],
"external_id": "<string>",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_external_id": "<string>",
"allocations": [
{
"amount": 123,
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
],
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"individual_name": "<string>",
"company_name": "<string>",
"email": "<string>",
"mobile_phone": "<string>",
"office_phone": "<string>",
"address_string": "<string>",
"memo": "<string>",
"status": "ACTIVE",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
]
},
"received_at": "2023-11-07T05:31:56Z",
"line_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"ledger_account": {
"id": {
"type": "AccountId",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"name": "Current Assets",
"account_number": "4000",
"stable_name": {
"type": "StableName",
"stable_name": "CURRENT_ASSETS"
},
"normality": "CREDIT",
"account_type": {
"value": "ASSET",
"display_name": "Asset"
},
"account_subtype": {
"value": "BANK_ACCOUNTS",
"display_name": "Current Assets"
}
},
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
]
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"transaction_tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "ExampleTagKey",
"value": "ExampleTagValue",
"dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dimension_display_name": "<string>",
"value_display_name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}
],
"external_id": "<string>",
"allocations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"deleted_at": "2023-11-07T05:31:56Z",
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The UUID of the business to create the vendor credit for
Timestamp when the vendor credit was received
List of line items for this vendor credit
Show child attributes
Amount for the line item in cents.
Identifier for the expense account for the vendor credit line item. It is suggested but not required that this should point to an expense account (as opposed to revenue/asset/liability/equity)
Description for the line item
Arbitrary custom metadata in JSON format with a size limit of 1KB
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}Any (typically user-visible) identifier you would like to associate with the vendor credit line item.
List of tags associated with this vendor credit line item
Show child attributes
The tag dimension key (e.g., "department", "project", "location")
"department"
The tag value (e.g., "sales", "marketing", "engineering")
"sales"
If the TagDimension doesn't exist, providing this value specifies the display name upon database insertion. Otherwise, it is left as null on the TagDimension.
"Department"
If the TagValueDefinition doesn't exist, providing this value specifies the display name upon database insertion. Otherwise, it is left as null on the TagValueDefinition.
"Sales Department"
External identifier for the vendor credit
UUID of the vendor this credit is associated with
External identifier of the vendor this credit is associated with
List of tags associated with this vendor credit
Show child attributes
The tag dimension key (e.g., "department", "project", "location")
"department"
The tag value (e.g., "sales", "marketing", "engineering")
"sales"
If the TagDimension doesn't exist, providing this value specifies the display name upon database insertion. Otherwise, it is left as null on the TagDimension.
"Department"
If the TagValueDefinition doesn't exist, providing this value specifies the display name upon database insertion. Otherwise, it is left as null on the TagValueDefinition.
"Sales Department"
Memo for any text you would like to associate with the vendor credit (for example, to display to end users).
Arbitrary custom metadata in JSON format with a size limit of 1KB
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}Any (typically user-visible) identifier you would like to associate with the vendor credit. Can be used to filter when listing vendor credits.
Existing vendor credit found or updated
Unique identifier for the vendor credit
The vendor associated with this credit
Show child attributes
Unique identifier for the vendor.
Unique ID of the vendor in your system for linking purposes. Idempotency key.
Full name of the individual vendor or contact at a corporate vendor.
Name of the company vendor.
Email address of the vendor.
Mobile phone number of the vendor.
Office phone number of the vendor.
Address of the vendor.
Memo for any text you would like to associate with the vendor (for example, to display to end users).
Status of the vendor.
ACTIVE, ARCHIVED Show child attributes
ID for the tag
Key for the tag
"ExampleTagKey"
Value for the tag
"ExampleTagValue"
ID of the tag dimension this tag belongs to
ID of the tag value definition
Display name for the tag dimension
Display name for the tag value definition
When the tag was archived
Timestamp when the vendor credit was received
List of line items for this vendor credit
Show child attributes
Unique identifier for the vendor credit line item
Amount for the line item in cents
Ledger account for this line item
Show child attributes
Name of the account
"Current Assets"
Account number if configured
"4000"
CREDIT, DEBIT Show child attributes
BANK_ACCOUNTS, ACCOUNTS_RECEIVABLE, INVENTORY, PAYMENT_PROCESSOR_CLEARING_ACCOUNT, FIXED_ASSET, ACCUMULATED_DEPRECIATION, CASH, UNDEPOSITED_FUNDS, CURRENT_ASSET, NON_CURRENT_ASSET, PREPAID_EXPENSES, DEVELOPMENT_COSTS, LOANS_RECEIVABLE, INTANGIBLE_ASSET, ACCOUNTS_PAYABLE, CREDIT_CARD, TAXES_PAYABLE, INCOME_TAXES_PAYABLE, SALES_TAXES_PAYABLE, OTHER_TAXES_PAYABLE, PAYROLL_TAXES_PAYABLE, UNEARNED_REVENUE, PAYROLL_LIABILITY, PAYROLL_CLEARING, LINE_OF_CREDIT, TIPS, REFUND_LIABILITIES, UNDEPOSITED_OUTFLOWS, OUTGOING_PAYMENT_CLEARING_ACCOUNT, OTHER_CURRENT_LIABILITY, LOANS_PAYABLE, NOTES_PAYABLE, SHAREHOLDER_LOAN, NON_CURRENT_LIABILITY, CONTRIBUTIONS, DISTRIBUTIONS, COMMON_STOCK, PREFERRED_STOCK, ADDITIONAL_PAID_IN_CAPITAL, RETAINED_EARNINGS, ACCUMULATED_ADJUSTMENTS, OPENING_BALANCE_EQUITY, OTHER_EQUITY, SALES, UNCATEGORIZED_REVENUE, RETURNS_ALLOWANCES, DIVIDEND_INCOME, INTEREST_INCOME, OTHER_INCOME, COGS, OPERATING_EXPENSES, PAYROLL, TAXES_LICENSES, UNCATEGORIZED_EXPENSE, CHARITABLE_CONTRIBUTIONS, LOAN_EXPENSES, FINANCE_COSTS, INTEREST_EXPENSES, DEPRECIATION, AMORTIZATION, BAD_DEBT, OTHER_EXPENSES Display name of the account subtype
"Current Assets"
Description for the line item
Arbitrary custom metadata in JSON format with a size limit of 1KB
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}Any (typically user-visible) identifier you would like to associate with the vendor credit line item.
List of tags associated with this vendor credit line item
Show child attributes
ID for the tag
Key for the tag
"ExampleTagKey"
Value for the tag
"ExampleTagValue"
ID of the tag dimension this tag belongs to
ID of the tag value definition
Display name for the tag dimension
Display name for the tag value definition
When the tag was archived
Timestamp when the vendor credit was created
Timestamp when the vendor credit was last updated
List of tags associated with this vendor credit
Show child attributes
ID for the tag
Key for the tag
"ExampleTagKey"
Value for the tag
"ExampleTagValue"
ID of the tag dimension this tag belongs to
ID of the tag value definition
Display name for the tag dimension
Display name for the tag value definition
When the tag was archived
External identifier for the vendor credit
List of allocations for this vendor credit
Show child attributes
Unique identifier for the vendor credit allocation
UUID of the vendor credit this allocation belongs to
Amount for the allocation in cents
UUID of the bill this allocation is for
Timestamp when the vendor credit was deleted, if applicable
Memo for any text you would like to associate with the vendor credit (for example, to display to end users).
Arbitrary custom metadata in JSON format with a size limit of 1KB
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}Any (typically user-visible) identifier you would like to associate with the vendor credit. Can be used to filter when listing vendor credits.