Vendors

Your suppliers. A vendor is the same underlying entity record as a client — the same company can be both — and carries payment terms, banking details, withholding-tax settings and a pricelist.

Use cases: Use this to sync your supplier list, keep withholding certificates current, and maintain per-vendor buying prices for the purchase flow.
GET/vendors

List vendors.

`sortBy` accepts "id", "name", "email", "taxId" or "type"; anything else falls back to "id".

Query Parameters

NameTypeDescription
search
stringFree-text search across name, tax id and email.
type
string"MURSHE", "COMPANY" or "PATOOR".
email
stringFilter by email.
taxId
stringFilter by tax id (ח.פ / ע.מ).
hasContacts
booleanOnly vendors that have (or have no) contacts attached.
sortBy
stringColumn to sort by.
sortOrder
string"asc" or "desc".
limit
numberItems per page. Default 50, clamped to 1-200.
offset
numberRow offset to start from (default 0).
page
number1-based page number (default 1). Converted to an offset; an explicit `offset` wins over it.
pageSize
numberAlias of `limit`. Wins over `limit` when both are sent.

Request

curl -X GET "https://api.glance.co.il/vendors" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "data": [
    {
      "id": 8801,
      "visibleId": "0a4c9b21-77d2-4f36-9c8e-1b2a3c4d5e6f",
      "name": "ספקי הצפון בע״מ",
      "taxId": "514789632",
      "type": "COMPANY",
      "email": "billing@north.co.il",
      "phoneNumber": "03-1234567",
      "paymentTermType": "CURRENT_PLUS_DAYS",
      "paymentTermDays": 30,
      "vendorInternalCode": 104,
      "withholdingTaxRate": 5,
      "companyId": 42,
      "address": {
        "id": 512,
        "city": "חיפה",
        "street": "הנמל 3"
      },
      "logoFile": null,
      "contacts": []
    }
  ],
  "pagination": {
    "total": 37,
    "limit": 50,
    "offset": 0,
    "hasMore": false,
    "page": 1,
    "pageSize": 50,
    "totalPages": 1
  }
}
GET/vendors/id/:visibleId

Get a single vendor.

Returned flat. A vendor that does not exist answers `200` with a body of `null`, not a 404.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe vendor's `visibleId`.

Request

curl -X GET "https://api.glance.co.il/vendors/id/:visibleId" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "id": 8801,
  "visibleId": "0a4c9b21-77d2-4f36-9c8e-1b2a3c4d5e6f",
  "name": "ספקי הצפון בע״מ",
  "taxId": "514789632",
  "type": "COMPANY",
  "email": "billing@north.co.il",
  "bankNumber": "12",
  "branchNumber": "345",
  "accountNumber": "678901",
  "paymentTermType": "CURRENT_PLUS_DAYS",
  "paymentTermDays": 30,
  "companyId": 42,
  "address": {
    "id": 512,
    "city": "חיפה",
    "street": "הנמל 3"
  },
  "logoFile": null,
  "contacts": [],
  "hashavshevetEntityAccountKey": "SUP0012"
}
POST/vendors/create

Create a vendor.

Banking details (`bankNumber`, `branchNumber`, `accountNumber`) cannot be set at creation — send them in a follow-up `PUT /vendors/edit/:visibleId`.

Body Parameters

NameTypeDescription
taxId
stringrequiredTax id (ח.פ / ע.מ).
name
stringrequiredVendor name.
type
stringrequired"MURSHE" (licensed dealer), "COMPANY" or "PATOOR" (exempt dealer).
email
stringVendor email.
phoneNumber
stringPhone number, up to 20 characters.
addressId
numberId of an existing address record — create it first via the Addresses API.
logoFileId
numberId of an uploaded logo.
paymentTermType
string"CURRENT_PLUS_DAYS" (end of month plus N days) or "DAYS_ONLY" (N days from the document date).
paymentTermDays
numberN, for whichever term type is set.
existingContactId
numberAttach an existing contact to the new vendor.
contact
objectCreate a contact together with the vendor. Ignored when `existingContactId` is given.
firstName
stringrequiredContact's first name.
lastName
stringContact's last name.
phoneNumber
stringContact's phone.
email
stringContact's email.
addressId
numberId of an existing address record.
hashavshevetEntityAccountKey
stringExternal bookkeeping account key, up to 8 characters. Saved only for a key whose role may map accounting exports.
taxDeductionsFileNumber
stringתיק ניכויים — the vendor's withholding file number.
withholdingTaxRate
numberניכוי מס במקור — the rate to withhold, 0–100. `null` (or omitting it) falls back to the company default.
withholdingCertificateNumber
stringCertificate number backing the rate.
withholdingValidFrom
stringDate the certificate takes effect (YYYY-MM-DD).
withholdingValidUntil
stringDate the certificate expires (YYYY-MM-DD).
withholdingBase
string"with_vat" or "without_vat" — whether the withholding is computed on the gross or the net amount.
withholdingFileId
numberId of an uploaded scan of the certificate.

Request

curl -X POST "https://api.glance.co.il/vendors/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "taxId": "example_taxId",
  "name": "example_name",
  "type": "example_type",
  "email": "example_email",
  "phoneNumber": "example_phoneNumber",
  "addressId": 0,
  "logoFileId": 0,
  "paymentTermType": "example_paymentTermType",
  "paymentTermDays": 0,
  "existingContactId": 0,
  "contact": {},
  "hashavshevetEntityAccountKey": "example_hashavshevetEntityAccountKey",
  "taxDeductionsFileNumber": "example_taxDeductionsFileNumber",
  "withholdingTaxRate": 0,
  "withholdingCertificateNumber": "example_withholdingCertificateNumber",
  "withholdingValidFrom": "example_withholdingValidFrom",
  "withholdingValidUntil": "example_withholdingValidUntil",
  "withholdingBase": "example_withholdingBase",
  "withholdingFileId": 0
}'

Response

Response
{
  "success": true,
  "vendorId": 8801
}
PUT/vendors/edit/:visibleId

Update a vendor. All fields are optional.

There is no delete endpoint for vendors — the entity is shared with clients and documents.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe vendor's `visibleId`.

Body Parameters

NameTypeDescription
taxId
stringTax id.
name
stringVendor name.
type
string"MURSHE", "COMPANY" or "PATOOR".
email
stringVendor email.
phoneNumber
stringPhone number.
addressId
numberId of an existing address record; `null` clears it.
logoFileId
numberId of an uploaded logo.
paymentTermType
string"CURRENT_PLUS_DAYS" or "DAYS_ONLY"; `null` clears the term and falls back to the company default.
paymentTermDays
numberN, for whichever term type is set.
bankNumber
stringBank number, for paying the vendor.
branchNumber
stringBranch number.
accountNumber
stringAccount number.
accountingCustomerNumber
stringThe vendor's number for you, in their system.
vendorInternalCode
numberYour internal running vendor code (קוד ספק). Send a number to set it, `null` or `""` to clear it, or omit it to leave it alone. Distinct from `hashavshevetEntityAccountKey`, which is the external bookkeeping key.
hashavshevetEntityAccountKey
stringExternal bookkeeping account key, up to 8 characters. An empty string leaves it unchanged.
specialVat
numberA VAT rate specific to this vendor, 0–100. `null` falls back to the company rate.
creditLimit
numberCredit limit for the vendor. `null` clears it.
roundDocumentTotal
string"use_default", "round" or "none" — how document totals for this vendor are rounded.
taxDeductionsFileNumber
stringתיק ניכויים — the vendor's withholding file number.
withholdingTaxRate
numberניכוי מס במקור — the rate to withhold, 0–100. `null` (or omitting it) falls back to the company default.
withholdingCertificateNumber
stringCertificate number backing the rate.
withholdingValidFrom
stringDate the certificate takes effect (YYYY-MM-DD).
withholdingValidUntil
stringDate the certificate expires (YYYY-MM-DD).
withholdingBase
string"with_vat" or "without_vat" — whether the withholding is computed on the gross or the net amount.
withholdingFileId
numberId of an uploaded scan of the certificate.

Request

curl -X PUT "https://api.glance.co.il/vendors/edit/:visibleId" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "taxId": "example_taxId",
  "name": "example_name",
  "type": "example_type",
  "email": "example_email",
  "phoneNumber": "example_phoneNumber",
  "addressId": 0,
  "logoFileId": 0,
  "paymentTermType": "example_paymentTermType",
  "paymentTermDays": 0,
  "bankNumber": "example_bankNumber",
  "branchNumber": "example_branchNumber",
  "accountNumber": "example_accountNumber",
  "accountingCustomerNumber": "example_accountingCustomerNumber",
  "vendorInternalCode": 0,
  "hashavshevetEntityAccountKey": "example_hashavshevetEntityAccountKey",
  "specialVat": 0,
  "creditLimit": 0,
  "roundDocumentTotal": "example_roundDocumentTotal",
  "taxDeductionsFileNumber": "example_taxDeductionsFileNumber",
  "withholdingTaxRate": 0,
  "withholdingCertificateNumber": "example_withholdingCertificateNumber",
  "withholdingValidFrom": "example_withholdingValidFrom",
  "withholdingValidUntil": "example_withholdingValidUntil",
  "withholdingBase": "example_withholdingBase",
  "withholdingFileId": 0
}'

Response

Response
{
  "success": true,
  "visibleId": "0a4c9b21-77d2-4f36-9c8e-1b2a3c4d5e6f"
}
GET/vendors/id/:visibleId/pricelist

Get a vendor's pricelist — the products they supply and what each costs from them.

`GET /vendors/pricelist?entityId=8801` is the same endpoint keyed by the vendor's numeric id, for callers that hold the id but not the `visibleId`. Only active products are listed.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe vendor's `visibleId`.

Request

curl -X GET "https://api.glance.co.il/vendors/id/:visibleId/pricelist" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "entries": [
    {
      "id": 3301,
      "productId": 4102,
      "productVisibleId": "7c1f0a52-59a1-4f0e-9a0b-2d3e4f5a6b7c",
      "productName": "Widget Pro",
      "productSku": "WDG-001",
      "productManufacturerSku": "NORTH-77",
      "productUnit": "יח'",
      "productBuyingPrice": 30,
      "vendorSku": "N-WDG-1",
      "pricingMode": "fixed",
      "buyingPrice": 28.5,
      "priceTiers": null,
      "tiersMode": null,
      "quantityStep": null,
      "quantityStepPrice": null
    }
  ]
}
PUT/vendors/id/:visibleId/pricelist

Replace a vendor's pricelist.

`entries` in the response is how many rows the vendor now has. Overlapping or malformed tiers answer 400 with the problem in `error`.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe vendor's `visibleId`.

Body Parameters

NameTypeDescription
entries
object[]requiredThe complete new pricelist. This is a replace, not a merge: any product missing from the array is dropped from the vendor, so send every product the vendor should still carry — an empty array clears the list.
productId
numberrequiredThe product's numeric `id`.
pricingMode
stringrequired"default" (use the product's own buying price), "fixed" (`buyingPrice` below) or "tiers" (`priceTiers`).
vendorSku
stringThe vendor's own SKU for this product.
buyingPrice
numberPrice from this vendor, when `pricingMode` is "fixed".
priceTiers
object[]Quantity breaks, when `pricingMode` is "tiers". Each tier has `from`, `to`, a `tierType` of "fixed", "percent" or "amount", and then `price`, `discountPercent` or `discountAmount` to match.
tiersMode
string"range" (price by quantity band) or "quantity" (price per step).
quantityStep
numberStep size, when `tiersMode` is "quantity".
quantityStepPrice
numberPrice per step.

Request

curl -X PUT "https://api.glance.co.il/vendors/id/:visibleId/pricelist" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "entries": "example_entries"
}'

Response

Response
{
  "success": true,
  "entries": 12
}

Last updated