Representing a partner of type Supplier
.
A Supplier can be connected to certain parts of an Order. The parts of an Order connected to a specific Supplier make up a Suborder.
Property | Type | Decription |
---|---|---|
uid | integer | The unique identifier of the supplier. |
company | string | Company name of supplier. |
firstName | string | First name of supplier contact. |
lastName | string | Last name of supplier contact. |
string | Email of supplier contact. | |
orderEmail | string | The email address to which order notifications will be sent. |
Takes a filter object and returns the number of suppliers found, as an integer.
A filter object specifying which suppliers to count. See Filter objects on the page List selection.
The request below returns the number of suppliers found where the company name starts with the characters Libre
.
Supplier.count({
"/name/en": {
"startsWith": "Libre"
}
})
Fetches a supplier object.
Parameter | Description |
---|---|
uid | The unique identifier of an article choice. |
query | Which info to return. See Query language. |
Supplier.get(12345, "orderEmail")
Fetches the JSON Schema which can be used for client-side validation.
The unique identifier of a supplier.
Fetches multiple suppliers as an array of supplier objects.
Parameter | Description |
---|---|
query | Which info to return. See sQuery language. |
selection | Which articles to list. See List selection. |
Retreives all Suborder objects matching a filter, giving a query for what to return.
Parameter | Description |
---|---|
filter | An object for filtering out which Suborder instances to return. |
query | An object specifying a get-query. See Query language for detailed documentation. |
offset | Offset to skip. Defaults to 0 . |
limit | Limit the number of Suborders. Default is set to 100 and max to 100 . |
The filtering object should match the following schema.
The request below prints the non-shipped suborder UIDs of the supplier.
Supplier.getSuborders(12345, {
"deliveryStatus": "Not shipped"
})
The request below prints the non-shipped suborder cost and order UID of the supplier.
Supplier.getSuborders(12345, {
"deliveryStatus": "Not shipped"
}, [
"uid",
"cost",
"order"
])