services/companies/{cid}/pricelists

Gets the price lists for a specific client or supplier:

  • If cid is a client: Returns all price lists assigned to the client.
  • If cid is a supplier: Returns all the price lists of the specific supplier.
  • If cid is the master company ("My company"): Returns all the price lists of "My company" and which can be assigned to clients. A shortcut for this option is services/companies/master/pricelists

URL

(GET) /api/services/companies/{cid}/pricelists

PARAMETERS

URL parameters are:

id

A company ID. Either a client, a supplier or the master company ("My Company").

To find companies use: companies/list

Integer, Mandatory


RESULTS

The result is a JSON object:

default

The default price list for this company. It is one of the price lists listed below.

With My Company and suppliers, the default is the first item when sorted by code alphabetically.

int
items

The list of price lists with basic properties. See description below.

To get all properties use services/pricelists/{plid}

object[]


Each element in items represents a price list:

plid

The price list ID

int 
codeThe price list code. The default price lists (generally) has an empty string. This field can be set by the user in the UI.string
name

The name of the price list.

string
cid

The company which owns the price list, i.e. which provides the services in the price list.

  • Internal and client price lists are always owned by the master company ("My company"): The master company provides the services to clients!
  • Supplier price lists are always owned by supplier companies. The supplier companies provide services to the master company ("My company") and which then resells services to its clients.

In other words: A price lists is always owned by the company which provides the listed services.

Passing a client company to the API URL will return price lists owned by the master company. Hence be careful to understand the difference between the cid passed in the URL and cid of a price list. It is not necessarily the same!

int
enabled

Indicates if the price list is enabled or disabled. A disabled price list cannot be used for cost calculation.

bool
isDefault

True if this is the default price list for the company in the API URL.

bool
isDraft

Indicates if the price list is a draft. Wordbee Translator proposes price list drafting workflows that involve the supplier company. Please check out the online user guides for how this works.

bool
currencyA three letter currency code such as EUR or USD. See this method to get all currencies: settings/currencies/codesstring
currencytTitle of currency such as "Euro" or "US dollars"string
commentsInternal comments. Not accessible to external users. Empty string if none.string
contractnoInternal contract number assigned to this price list. This field is visible to internal users only. Empty string if none.string


EXAMPLES

The following example is for a manager user accessing a job which is proposed to him/her. As a manager, the user has management level actions as well.

{
    "default": 462,
    "items": [
        {
            "plid": 462,
            "code": "",
            "name": "Standard pricelist",
            "cid": 1308,
            "enabled": true,
            "isDefault": true,
            "isDraft": false,
            "currency": "EUR",
            "currencyt": "Euro",
            "comments": "comment (1)",
            "contractno": "contract 123"
        },
        {
            "plid": 463,
            "code": "technical",
            "name": "Technical services",
            "cid": 1308,
            "enabled": true,
            "isDefault": false,
            "isDraft": false,
            "currency": "EUR",
            "currencyt": "Euro",
            "comments": "Any technical services",
            "contractno": "S3328883"
        }
    ]
}


ACCESS RIGHTS

Access to price lists and services is strictly governed by the user's access rights profile. See Access Rights

Only administrators or internal managers (with the respective rights enabled) are authorized to access price information of all companies (clients, suppliers, master company).

Any other user can only see the information that he/she can also see in the web interface. Suppliers can only see their supplier price lists, and only if, the user's profile allows even that access.

Some fields are available for internal users only, such as internal comments, contract number etc.



Copyright Wordbee - Buzzin' Outside the Box since 2008