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
/vendorsList vendors.
`sortBy` accepts "id", "name", "email", "taxId" or "type"; anything else falls back to "id".
Query Parameters
| Name | Type | Description | |
|---|---|---|---|
search | string | Free-text search across name, tax id and email. | |
type | string | "MURSHE", "COMPANY" or "PATOOR". | |
email | string | Filter by email. | |
taxId | string | Filter by tax id (ח.פ / ע.מ). | |
hasContacts | boolean | Only vendors that have (or have no) contacts attached. | |
sortBy | string | Column to sort by. | |
sortOrder | string | "asc" or "desc". | |
limit | number | Items per page. Default 50, clamped to 1-200. | |
offset | number | Row offset to start from (default 0). | |
page | number | 1-based page number (default 1). Converted to an offset; an explicit `offset` wins over it. | |
pageSize | number | Alias 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/:visibleIdGet a single vendor.
Returned flat. A vendor that does not exist answers `200` with a body of `null`, not a 404.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The 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/createCreate a vendor.
Banking details (`bankNumber`, `branchNumber`, `accountNumber`) cannot be set at creation — send them in a follow-up `PUT /vendors/edit/:visibleId`.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
taxId | string | required | Tax id (ח.פ / ע.מ). |
name | string | required | Vendor name. |
type | string | required | "MURSHE" (licensed dealer), "COMPANY" or "PATOOR" (exempt dealer). |
email | string | Vendor email. | |
phoneNumber | string | Phone number, up to 20 characters. | |
addressId | number | Id of an existing address record — create it first via the Addresses API. | |
logoFileId | number | Id 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 | number | N, for whichever term type is set. | |
existingContactId | number | Attach an existing contact to the new vendor. | |
contact | object | Create a contact together with the vendor. Ignored when `existingContactId` is given. | |
firstName | string | required | Contact's first name. |
lastName | string | Contact's last name. | |
phoneNumber | string | Contact's phone. | |
email | string | Contact's email. | |
addressId | number | Id of an existing address record. | |
hashavshevetEntityAccountKey | string | External 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 | string | Certificate number backing the rate. | |
withholdingValidFrom | string | Date the certificate takes effect (YYYY-MM-DD). | |
withholdingValidUntil | string | Date 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 | number | Id 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/:visibleIdUpdate a vendor. All fields are optional.
There is no delete endpoint for vendors — the entity is shared with clients and documents.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The vendor's `visibleId`. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
taxId | string | Tax id. | |
name | string | Vendor name. | |
type | string | "MURSHE", "COMPANY" or "PATOOR". | |
email | string | Vendor email. | |
phoneNumber | string | Phone number. | |
addressId | number | Id of an existing address record; `null` clears it. | |
logoFileId | number | Id of an uploaded logo. | |
paymentTermType | string | "CURRENT_PLUS_DAYS" or "DAYS_ONLY"; `null` clears the term and falls back to the company default. | |
paymentTermDays | number | N, for whichever term type is set. | |
bankNumber | string | Bank number, for paying the vendor. | |
branchNumber | string | Branch number. | |
accountNumber | string | Account number. | |
accountingCustomerNumber | string | The vendor's number for you, in their system. | |
vendorInternalCode | number | Your 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 | string | External bookkeeping account key, up to 8 characters. An empty string leaves it unchanged. | |
specialVat | number | A VAT rate specific to this vendor, 0–100. `null` falls back to the company rate. | |
creditLimit | number | Credit 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 | string | Certificate number backing the rate. | |
withholdingValidFrom | string | Date the certificate takes effect (YYYY-MM-DD). | |
withholdingValidUntil | string | Date 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 | number | Id 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/pricelistGet 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
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The 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/pricelistReplace 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
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The vendor's `visibleId`. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
entries | object[] | required | The 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 | number | required | The product's numeric `id`. |
pricingMode | string | required | "default" (use the product's own buying price), "fixed" (`buyingPrice` below) or "tiers" (`priceTiers`). |
vendorSku | string | The vendor's own SKU for this product. | |
buyingPrice | number | Price 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 | number | Step size, when `tiersMode` is "quantity". | |
quantityStepPrice | number | Price 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
}