Suppliers are configured by the platform, not by your account: the same set is visible to every
account, and enabledForAccount tells you which of them your account may source from.
Each supplier publishes availability for the stock items it has been mapped to, and the
availability endpoint answers how many units of a given set of stock items that one
supplier currently reports.
/accounts/{accountId}/stockSuppliers
Get the stock suppliers.
The suppliers are configured platform-wide rather than per account, so the same records are
returned whichever account is named in the path; enabledForAccount is the
per-account part of a record and is true when that account may source from the supplier.
Records are named stockSupplier inside the paged envelope.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account whose access is reported in enabledForAccount |
|
filterId |
query | |
optional id of a stored filter (see the Filter resource) to narrow the result | ||
page |
query | 0 |
int | zero-based page index | |
size |
query | 10 |
int | number of items per page |
| Code | Condition |
|---|---|
| 200 | the page of suppliers was returned |
<pagedData>
<records>...</records>
<totalElements>...</totalElements>
</pagedData>
{
"pagedData" : {
"records" : [ { }, { } ],
"totalElements" : 12345
}
}
/accounts/{accountId}/stockSuppliers/{supplierId}
Get a single stock supplier by its id.
Returns the same record the list endpoint returns, enabledForAccount included.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account whose access is reported in enabledForAccount |
|
supplierId |
required | path | int | the unique identifier of the stock supplier |
| Code | Condition |
|---|---|
| 200 | the supplier was returned |
| 404 | no supplier with the given id exists |
| Media Type | Data Type | Description |
|---|---|---|
application/json |
StockSupplier | |
application/xml |
StockSupplier |
<stockSupplier>
<id>...</id>
<ownerAccount>
<id>...</id>
<name>...</name>
<fullName>...</fullName>
<affiliateId>...</affiliateId>
<accountDataRetention>
<id>...</id>
<keepPersonalDataMonths>...</keepPersonalDataMonths>
<keepPrintDataMonths>...</keepPrintDataMonths>
</accountDataRetention>
<persitenceConfig>
<id>...</id>
<archiveDays>...</archiveDays>
<deleteDays>...</deleteDays>
</persitenceConfig>
</ownerAccount>
<name>...</name>
<description>...</description>
<logoPath>...</logoPath>
<deleted>...</deleted>
<enabled>...</enabled>
<enabledForAccount>...</enabledForAccount>
<type>...</type>
<lastError>...</lastError>
<lastRun>...</lastRun>
<lastSuccess>...</lastSuccess>
<version>...</version>
</stockSupplier>
{
"stockSupplier" : {
"id" : 12345,
"ownerAccount" : {
"id" : 12345,
"name" : "...",
"fullName" : "...",
"affiliateId" : "...",
"accountDataRetention" : {
"id" : 12345,
"keepPersonalDataMonths" : 12345,
"keepPrintDataMonths" : 12345
},
"persitenceConfig" : { }
},
"name" : "...",
"description" : "...",
"logoPath" : "...",
"deleted" : true,
"enabled" : true,
"enabledForAccount" : true,
"type" : "BRANDEX",
"lastError" : "...",
"lastRun" : 12345,
"lastSuccess" : 12345,
"version" : 12345
}
}
/accounts/{accountId}/stockSuppliers/{supplierId}/availability
Get one supplier's availability for a set of stock items.
A stock item is what a product's SKU points at — take the ids from the
stockId field of the product's SKUs — and this endpoint answers, for the one
supplier in the path, how many units of each it currently reports. Records are named
stockSupplierAvailability inside the paged envelope. Two properties of the answer
are worth knowing before you build against it:
totalElements is that count; there are no page or
size parameters, so send the whole set of ids in a single call.
On a returned record, availableInStock is the number of units the supplier reports
as on hand, and shortlyInStock / longerInStock are units it reports as
arriving later. Not every supplier's feed carries those two levels; where it does not, both are
0. supplierPlu is the supplier's own article number for the stock item.
| Name | In | Default | Constraints | Description | |
|---|---|---|---|---|---|
x-auth-token |
header | The authentication token | |||
accountId |
required | path | int | the unique identifier of the account | |
supplierId |
required | path | int | the unique identifier of the stock supplier whose stock is queried |
| Media Type | Data Type | Description |
|---|---|---|
application/json |
IntegerList | the stock item ids to ask about, carried in value — {"value": [101, 102]}. An empty list returns an empty page. |
application/xml |
IntegerList |
| Code | Condition |
|---|---|
| 200 | the availability records for those stock items this supplier has a record for |
<i----->
<value>...</value>
</i----->
{
"integerList" : {
"value" : [ 12345, 12345 ]
}
}
<pagedData>
<records>...</records>
<totalElements>...</totalElements>
</pagedData>
{
"pagedData" : {
"records" : [ { }, { } ],
"totalElements" : 12345
}
}