POST
/
v1
/
businesses
/
{businessId}
/
tags
Tag entities
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/tags \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key_values": [
    {
      "key": "Location",
      "value": "MainStreet"
    }
  ],
  "entity_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "entity_type": "CUSTOMER"
}'
{
  "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",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "deleted_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string<uuid>
required

The UUID of the business to tag entities for

Body

application/json
key_values
object[]
required

List of key-value pairs used to create new tags

entity_ids
string<uuid>[]
required

The entity IDs to create each new tag for.

entity_type
enum<string>
required

The type of entity to tag.

Available options:
CUSTOMER,
VENDOR,
BANK_TRANSACTION,
INVOICE,
INVOICE_PAYMENT,
INVOICE_PAYMENT_ALLOCATION,
INVOICE_WRITE_OFF,
BILL,
BILL_PAYMENT,
BILL_PAYMENT_ALLOCATION,
MANUAL_JOURNAL_ENTRY,
MANUAL_JOURNAL_ENTRY_LINE_ITEM,
CUSTOMER_PAYOUT,
VENDOR_PAYOUT,
PAYROLL,
PAYROLL_PAYMENT,
OPENING_BALANCE,
CUSTOMER_REFUND,
CUSTOMER_REFUND_PAYMENT,
CUSTOMER_REFUND_ALLOCATION,
CUSTOMER_REFUND_ALLOCATION_LINE_ITEM,
VENDOR_REFUND,
VENDOR_REFUND_PAYMENT,
VENDOR_REFUND_ALLOCATION,
VENDOR_REFUND_ALLOCATION_LINE_ITEM,
LEDGER_ENTRY,
QUICKBOOKS_LEDGER_ENTRY,
VENDOR_CREDIT,
CUSTOMER_CREDIT,
INVOICE_LINE_ITEM,
BILL_LINE_ITEM,
VENDOR_CREDIT_LINE_ITEM,
CUSTOMER_CREDIT_LINE_ITEM

Response

Tags successfully created

Contains a collection of tags as defined by the ApiTag schema. This structure is used to encapsulate multiple tags in API responses or requests.

tags
object[]
required

A list of tags associated with a taggable object.