{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "vc001",
    "vendor": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "external_id": "abc123",
      "individual_name": null,
      "company_name": "Vanguard Commercial Real Estate",
      "email": null,
      "mobile_phone": null,
      "office_phone": null,
      "address_string": null,
      "notes": null,
      "status": "ACTIVE",
      "transaction_tags": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "key": "ExampleTagKey",
          "value": "ExampleTagValue",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "deleted_at": null
        }
      ]
    },
    "received_at": "2023-11-07T05:31:56Z",
    "line_items": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "ledger_account": {
          "id": {
            "type": "AccountId",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          },
          "name": "Rent",
          "stable_name": {
            "type": "StableName",
            "stable_name": "RENT"
          },
          "normality": "DEBIT",
          "account_type": {
            "value": "EXPENSE",
            "display_name": "Expense"
          },
          "account_subtype": {
            "value": "OPERATING_EXPENSES",
            "display_name": "Operating Expenses"
          }
        },
        "amount": 123,
        "memo": null
      }
    ],
    "allocations": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "vendor_credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "amount": 123
      }
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": null,
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "value": "ExampleTagValue",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": null
      }
    ]
  }
}

A Vendor Credit represents a transaction that reduces accounts payable to a vendor, typically due to returned goods. Each vendor credit has one or more line items specifying credited expense accounts, and zero or more allocations applying portions of the credit to bills.

Attributes

id
string
required

Unique identifier for the vendor credit.

external_id
string

Unique ID of the vendor credit in your system for linking purposes. Idempotency key.

vendor
Vendor object
required

The Vendor associated with this credit.

received_at
ISO8601 timestamp
required

Time when the vendor credit was received.

line_items
array of VendorCreditLineItem objects
required

Line items included in this vendor credit. See Vendor Credit Line Item Object for details.

allocations
array of VendorCreditAllocation objects

Allocations of this vendor credit to bills. See Vendor Credit Allocation Object for details.

created_at
ISO8601 timestamp
required

Time when the vendor credit was created in Layer.

updated_at
ISO8601 timestamp
required

Time when the vendor credit was last updated in Layer.

deleted_at
ISO8601 timestamp

Time when the vendor credit was deleted, if applicable.

transaction_tags
Array of Tags

Tags associated with the vendor credit.

Vendor Credit Line Item Object

A Vendor Credit Line Item represents an individual expense account being credited by the Vendor Credit.

id
string
required

Unique identifier for the vendor credit line item.

ledger_account
SingleApiChartAccount object

Ledger account associated with this line item.

amount
integer
required

Amount for the line item in cents.

memo
string

Description or notes for the line item.

Vendor Credit Allocation Object

A Vendor Credit Allocation represents how a portion of a vendor credit is applied to a specific bill. By allocating vendor credits to bills, the amount owed to vendors can be reduced accordingly.

id
string
required

Unique identifier for the vendor credit allocation.

vendor_credit_id
string
required

ID of the vendor credit this allocation belongs to.

bill_id
string
required

ID of the bill this allocation is for.

amount
integer
required

Amount of the allocation in cents.

{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "vc001",
    "vendor": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "external_id": "abc123",
      "individual_name": null,
      "company_name": "Vanguard Commercial Real Estate",
      "email": null,
      "mobile_phone": null,
      "office_phone": null,
      "address_string": null,
      "notes": null,
      "status": "ACTIVE",
      "transaction_tags": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "key": "ExampleTagKey",
          "value": "ExampleTagValue",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "deleted_at": null
        }
      ]
    },
    "received_at": "2023-11-07T05:31:56Z",
    "line_items": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "ledger_account": {
          "id": {
            "type": "AccountId",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          },
          "name": "Rent",
          "stable_name": {
            "type": "StableName",
            "stable_name": "RENT"
          },
          "normality": "DEBIT",
          "account_type": {
            "value": "EXPENSE",
            "display_name": "Expense"
          },
          "account_subtype": {
            "value": "OPERATING_EXPENSES",
            "display_name": "Operating Expenses"
          }
        },
        "amount": 123,
        "memo": null
      }
    ],
    "allocations": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "vendor_credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "amount": 123
      }
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "deleted_at": null,
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "value": "ExampleTagValue",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "deleted_at": null
      }
    ]
  }
}